v1.5
operator
スタック内で、項目を別の項目の後に移動します。
MoveOperatorBefore( Object, OperatorToMove, OperatorReference ); |
パラメータ | タイプ | 詳細 |
---|---|---|
オブジェクト | 文字列 | オペレータを接続するオブジェクトを指定します。 |
OperatorToMove | 文字列 | 移動するオペレータを指定します。 |
OperatorReference | 文字列 | どのオペレータの前に移動するかを指定します。 |
/* 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 // |