MoveOperatorBefore
 
 
 

MoveOperatorBefore

Introduced

v1.5

Description

Moves an item after another in the stack.

Scripting Syntax

MoveOperatorBefore( Object, OperatorToMove, OperatorReference );

Parameters

Parameter Type Description
Object String Specifies the object to which the operators are connected.
OperatorToMove String Specifies the operator to be moved
OperatorReference String Specifies the operator to be moved before

Examples

JScript Example

/*
        This example creates several operators and then moves them in 
        the stack using the several options of MoveOperatorBefore.
*/
NewScene(null, null);
var oSphere = CreatePrim("Sphere", "MeshSurface", null, null);
//Create a twist operator in modeling construction mode
ApplyOp("Twist", oSphere, 3, siPersistentOperation, null, 0);
//Create a bend operator in animation construction mode
ApplyOp("Bend", oSphere, 3, siPersistentOperation, null, 2);
Application.LogMessage("Construction History Before Move");
var eOperators = new Enumerator( oSphere.ActivePrimitive.ConstructionHistory ); 
for (;!eOperators.atEnd();eOperators.moveNext())            
{ 
        var oOperator = eOperators.item();
        logmessage( "\t"+oOperator.fullname );
} 
//Move the bend operator before the twist operator.
MoveOperatorBefore("sphere.polymsh", "sphere.polymsh.bendop", "sphere.polymsh.twistop" );
Application.LogMessage("Construction History After Move");
eOperators = new Enumerator( oSphere.ActivePrimitive.ConstructionHistory ); 
for (;!eOperators.atEnd();eOperators.moveNext())            
{ 
        var oOperator = eOperators.item();
        logmessage( "\t"+oOperator.fullname );
} 
//INFO : Construction History Before Move
//INFO :        sphere.polymsh.secondaryshapemarker
//INFO :        sphere.polymsh.animationmarker
//INFO :        sphere.polymsh.bendop
//INFO :        sphere.polymsh.shapemarker
//INFO :        sphere.polymsh.modelingmarker
//INFO :        sphere.polymsh.twistop
//INFO :        sphere.polymsh.geom
//INFO : Construction History After Move
//INFO :        sphere.polymsh.secondaryshapemarker
//INFO :        sphere.polymsh.animationmarker
//INFO :        sphere.polymsh.shapemarker
//INFO :        sphere.polymsh.modelingmarker
//INFO :        sphere.polymsh.twistop
//INFO :        sphere.polymsh.bendop
//INFO :        sphere.polymsh.geom
//

See Also

MoveOperatorAfter MoveOperator ChangeGeneratorInputReadPosition