v5.0
オペレータを上下に移動したり、指定オブジェクトのオペレータ スタックの最上部に移動したります。
MoveOperator( Object, OperatorToMove, MoveAction, [OperatorReference], [MoveDirection] ); |
| パラメータ | タイプ | 説明 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Object | 文字列 | 変更するオブジェクトを指定します。 | ||||||||
| OperatorToMove | 文字列 | 移動するオペレータを指定します。 | ||||||||
| MoveAction | Integer |
移動するオペレータを指定します。オペレータを最上部に移動するのか、またはリファレンス オペレータの直前/直後に移動するのかを指定します。 注: オブジェクトに書き込まれるオペレータは最上部に移動できません(最上部は読み取り専用です)。 デフォルト値: 0
|
||||||||
| OperatorReference | 文字列 | リファレンス オペレータを指定します。 MoveTargetType=0 の場合、このパラメータは無視されます。 | ||||||||
| MoveDirection | Integer |
オペレータがオペレータ スタック内を移動できる方向(上や下など)を指定します。 デフォルト値: 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*/); |