Redo

Introduced

4.2

Description

Redoes the last command that was undone in the command stack. This is the scripting equivalent of selecting Redo from the main Edit menu or pressing Ctrl+Y in the user interface.

Note: Redo is only available after an Undo operation.

Scripting Syntax

Redo( [Repetitions] )

Parameters

Parameter

Type

Description

Repetitions [in/out]

Integer

Number of times to redo. May stop earlier if there are no more commands to redo.

Default Value: 1

Examples

JScript Example

/*
   This example demonstrates how to use the Redo option in scripting by 
   using the DataRepository (internal object database) to see whether
   the object exists in the scene at each step (creating the object, 
   deleting, undoing, and then redoing the DeleteObj call)
*/

NewScene( null, false );
var odb = XSIUtils.DataRepository;
var object2kill = CreatePrim( "Cone", "MeshSurface" )
obj_id = odb.GetIdentifier( object2kill )

LogMessage( odb.HasData(obj_id) );
//INFO : True

DeleteObj( object2kill );
LogMessage( odb.HasData(obj_id) );
//INFO : False

Undo();
LogMessage( odb.HasData(obj_id) );
//INFO : True

Redo();
LogMessage( odb.HasData(obj_id) );
//INFO : False

See Also

Undo



SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index