v1.5
operator
スタック内で、項目を別の項目の後に移動します。
MoveOperatorAfter( 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 twist operator after the bend operator. MoveOperatorBefore("sphere.polymsh", "sphere.polymsh.twistop", "sphere.polymsh.bendop"); Application.LogMessage("Construction History Before After"); 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 Before After //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 |