Introduced
5.0
Description
Moves an operator up, down, or to the top of the specified object's operator stack.
Scripting Syntax
MoveOperator( Object, OperatorToMove, MoveAction, [OperatorReference], [MoveDirection] )
Parameters
|
Parameter |
Type |
Description |
|
Object |
Specifies the object to be modified |
|
|
OperatorToMove |
Specifies the operator to be moved |
|
|
MoveAction |
Specifies where the operator will be moved: on top, or before/after the reference operator. Note: Operators writing to the object cannot be moved on top (top is read only). Default Value: 0 Possible Values: • 0: Move to the top of the operator stack, above all operators. • 1: Move just before the reference operator. • 2: Move just after the reference operator. |
|
|
OperatorReference |
Specifies the reference operator. This parameter is ignored if MoveTargetType=0. |
|
|
MoveDirection |
Specifies which direction the operator is allowed to move: up, down, or in any direction within the object's operator stack. Default Value: 0 Possible Values: • 0: Move the operator in any operator stack direction, up or down. • 1: Move the operator only upward in the operator stack. • 2: Move the operator only downward in the operator stack. |
Examples
JScript Example
/* This JScript example creates several operators and then moves them in the stack using the several options of MoveOperator. */ NewScene(null, null); Sphere = CreatePrim("Sphere", "MeshSurface", null, null); //Generate a subdivided sphere from this one MeshSubdivideWithCenter(null, "sphere", null, siPersistentOperation, siKeepGenOpInputs); GeneratorOp = GetValue("polymsh.polymsh.MeshSubdivideWithCenter"); //Create a twist operator in modeling construction mode TwistOp = ApplyOp("Twist", Sphere, 3, siPersistentOperation, null, 0); //Create a bend operator in animation construction mode BendOp = ApplyOp("Bend", Sphere, 3, siPersistentOperation, null, 2); SpherePrim = Sphere.ActivePrimitive; //Move the twist operator after the bend operator. //If we restrict the movement to "downward" only, it will do nothing, //since the bendop is over the twistop in the stack: MoveOperator(SpherePrim, TwistOp, 2 /*after*/, BendOp, 2/*downward only*/); //If we restrict the movement to "upward", however, it is fine: MoveOperator(SpherePrim, TwistOp, 2 /*after*/, BendOp, 1/*upward only*/); //Move the generator at the top of the stack, so the //generated object inherits from deforms that are in the //animation region of the input sphere: MoveOperator(SpherePrim, GeneratorOp, 0 /*on top*/, "", 0/*any direction*/);
See Also
Autodesk Softimage v7.5