v5.0
operator
Moves an operator up, down, or to the top of the specified object's operator stack.
MoveOperator( Object, OperatorToMove, MoveAction, [OperatorReference], [MoveDirection] ); |
Parameter | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Object | String | Specifies the object to be modified | ||||||||
OperatorToMove | String | Specifies the operator to be moved | ||||||||
MoveAction | Integer | 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
|
||||||||
OperatorReference | String | Specifies the reference operator. This parameter is ignored if MoveTargetType=0. | ||||||||
MoveDirection | Integer | Specifies which direction the operator is allowed to move: up,
down, or in any direction within the object's operator stack.
Default Value: 0
|
/* 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*/); |