v5.0
ジェネレータ オペレータが入力から読み取るスタック位置を変更します。 ジェネレータは、任意のコンストラクション モードのマーカより上を読み取ります。 使用できるジェネレータ オペレータのリストについては、「ジェネレータおよびコンバータ オペレータ」を参照してください。
ChangeGeneratorInputReadPosition( Operator, ReadPosition, [UnTransferShapesAndEnvelopes] ); |
| パラメータ | タイプ | 説明 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Operator | 文字列 | 修正するジェネレータ オペレータを指定します。 | ||||||||
| ReadPosition | siConstructionMode | ジェネレータを再接続する位置。 任意のコンストラクション モード マーカの上に配置できます。 | ||||||||
| UnTransferShapesAndEnvelopes | Integer |
シェイプ コンストラクション モード/アニメーション コンストラクション モードでジェネレータにコマンドを再接続する場合に、転送するシェイプおよびエンベロープのウェイト プロパティを処理します。 通常、重複するデフォーメーションが存在する可能性があるため(エンベロープは入力オブジェクトと生成オブジェクトの両方に適用されます)、これらの転送の取り消しは優先されます。
デフォルト値: 2
|
/*
This example creates a generator operator and then moves
its read positions across various construction modes.
*/
NewScene(null, null);
Sphere = CreatePrim("Sphere", "MeshSurface", null, null);
//Create a twist operator in modeling construction mode
TwistOp = ApplyOp("Twist", Sphere, 3, siPersistentOperation, null, 0);
//Envelope the shere with a Null (animation construction mode),
//and move the Null so we can see the difference:
NullObject = GetPrim("Null", null, null, null);
EnvOp = ApplyFlexEnv(Sphere + ";" + NullObject, false, 2);
Translate(NullObject, 4, 0, 0, siRelative, siView, siObj, siXYZ, null, null, null, null,
null, null, null, null, null, 0);
//Generate a subdivided sphere from this one
MeshSubdivideWithCenter(null, "sphere", null, siPersistentOperation, siKeepGenOpInputs);
GeneratorOp = GetValue("polymsh.polymsh.MeshSubdivideWithCenter");
logmessage( "Construction region after generator creation: " +
GetGeneratorInputReadPosition( GeneratorOp ) );
//Currently, the generated sphere inherits from the animated (result)
//position, since by default it connects in secondary shape construction mode.
//We will now move the read point over the modeling marker so it has
//has twisted but not enveloped positions:
ChangeGeneratorInputReadPosition( GeneratorOp, siConstructionModeModeling, 0 );
logmessage( "Construction region after moving in modeling: " +
GetGeneratorInputReadPosition( GeneratorOp ) );
//Transfer the envelope operator onto the generated sphere:
TransferClusterPropertiesAcrossGenOp("polymsh.polymsh.MeshSubdivideWithCenter", "polymsh",
"sphere.polymsh.cls.EnvelopWeightCls.Envelope_Weights", "Envelope_Weights", true);
//Move the read position to animation mode, but specify to untransfer
//the envelope in order to avoid the double deformation:
ChangeGeneratorInputReadPosition( GeneratorOp, siConstructionModeSecondaryShape, 0 );
logmessage( "Construction region after moving back in secondary shape: " +
GetGeneratorInputReadPosition( GeneratorOp ) );
//Output:
// INFO : Construction region after generator creation: 3
// INFO : Construction region after moving in modeling: 0
// INFO : Construction region after moving back in secondary shape: 3 |