CopyAnimationAcrossGenerator

導入

v5.0

詳細

ジェネレータ オペレータの入力のシェイプおよびエンベロープを生成したオブジェクトにコピーします。 これには、エンベロープおよびシェイプ コンバイナ オペレータを生成されたプリミティブおよびシェイプ アニメーション(トラックとクリップ)のコピーにインストールすることも含まれます。

モデリング マーカを経由してジェネレータが接続されている場合、その接続はモデリング コンストラクション モードで自動的に再接続します。

コマンドの実行前に入力プリミティブのエンベロープ ウェイト プロパティおよびシェイプ キー プロパティが何も転送されなかった場合は、アニメーションがコピーされる前に自動的にそれらすべてが転送されます。 ただし、コマンドを実行する前に何らかの入力プリミティブのエンベロープ ウェイト プロパティおよびシェイプ キー プロパティが転送された場合は、TransferRemainingShapesAndEnvelopes 引数に従って残りのプロパティを転送するかどうかが決定されます。

スクリプト構文

CopyAnimationAcrossGenerator( Operator, [ReadPosition], [TransferRemainingShapesAndEnvelopes] );

パラメータ

パラメータ タイプ 説明
Operator 文字列 修正するジェネレータ オペレータを指定します。
ReadPosition siConstructionMode 読み取るコンストラクション スタックを指定します。

デフォルト値: siConstructionModeModeling

TransferRemainingShapesAndEnvelopes Integer シェイプ コンストラクション モード/アニメーション コンストラクション モードでジェネレータにコマンドを再接続する場合に、転送するシェイプおよびエンベロープのウェイト プロパティを処理します。 通常、重複するデフォーメーションが存在する可能性があるため(エンベロープは入力オブジェクトと生成オブジェクトの両方に適用されます)、これらの転送の取り消しは優先されます。

デフォルト値: 2

指定可能な値:

説明:

0
1 不可
2 ユーザが指定

JScript の例

/*

	This example creates 2 spheres with animation (shapes and envelopes), merges them and manually transfers 

	only one of the envelopes. Then, using CopyAnimationAcrossGenerator, it copies the animation with 

	TransferRemainingShapesAndEnvelopes = 1, and then TransferRemainingShapesAndEnvelopes = 0.

*/

NewScene(null, null);

//Create an enveloped sphere that has an applied shape key

Sphere1 = CreatePrim("Sphere", "MeshSurface", null, null);

NullPrim1 = GetPrim("Null", null, null, null);

SetSelFilter("Vertex");

SelectGeometryComponents("sphere.pnt[44-50]");

Translate(null, 0, 0, -4.83347471775276, siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 1);

StoreShapeKey("sphere.pnt[44-50]", "", siShapeObjectReferenceMode, 1, 0, 0, siShapeContentPrimaryShape);

ApplyFlexEnv(Sphere1 + ";" + NullPrim1, false, 2);

SelectObj(NullPrim1, null, true);

Translate(null, -3.20599401067148, 0, 0, siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 0);

//Create a second enveloped sphere

Sphere2 = CreatePrim("Sphere", "MeshSurface", null, null);

NullPrim2 = GetPrim("Null", null, null, null);

ApplyFlexEnv(Sphere2 + ";" + NullPrim2, false, 2);

SelectObj(NullPrim2, null, null);

Translate(null, 6.77561899920499, 0, -1.00435838290967, siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 2);

//Generate a new object from the merge of the two spheres

SetValue("Context.constructionmode", 0, null);

ApplyGenOp("MeshMerge", "", Sphere1 + "," + Sphere2, 3, siPersistentOperation, siKeepGenOpInputs, null);

Translate(null, 5.54342092599887, 0, 8.39090426346892, siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 2);

//Transfer manually only one of the envelope weight props of the input spheres

TransferClusterPropertiesAcrossGenOp("polymsh.polymsh.mergemesh", "polymsh", "sphere.polymsh.cls.EnvelopWeightCls.Envelope_Weights", "Envelope_Weights", true);

//Copy the animation without transfering the envelope weight props that were not transfered

CopyAnimationAcrossGenerator("polymsh.polymsh.mergemesh", 0, 1 /*don't transfer remaining envelopes*/);

//Copy the animation and transfer the envelope weight props that were not transfered

CopyAnimationAcrossGenerator("polymsh.polymsh.mergemesh", 0, 0 /*transfer remaining envelopes*/);

関連項目

TransferPropertiesAcrossGenOp TransferPropertiesAcrossGenOp TransferClusterPropertiesAcrossGenOp TransferAllPropertiesAcrossGenOp