AddClipRelation

導入

v4.0

詳細

2 つのクリップの間にマスタとスレーブのリレーションを作成します。デフォルトでは、このリレーションにより、2 つの Clip オブジェクトに対し、TimeControl オブジェクトの Start Offset、Clip In、および Clip Out がバインドされます。

スクリプト構文

oReturn = AddClipRelation( [From], [To], [Name] );

戻り値

リレーション(ClipRelationオブジェクト)を戻します。

パラメータ

パラメータ タイプ 説明
From クリップ オブジェクト自体またはそのオブジェクト名 リレーションにおけるマスタ クリップ

デフォルト値: 現在選択されている値何も選択されていない場合には、選択セッションを開始します。

To クリップ オブジェクト自体またはそのオブジェクト名 リレーションにおけるスレーブ クリップ

デフォルト値: 現在選択されている値何も選択されていない場合には、選択セッションを開始します。

Name 文字列 ClipRelation の新しい名前。

デフォルト値: "Relation"

JScript の例

/*

	This example shows how to create a ClipRelation using the AddClipRelation command.

*/

NewScene(null, false);

// Set up the scene with a cone and then store its translation as a static pose

CreatePrim("Cone", "MeshSurface", null, null);

Translate(null, 5.57429595406375, 0.195303936039821, -1.95303936039821E-02, 

	siRelative, siView, siObj, siXYZ, null, null, siXYZ, 

	null, null, null, null, null, null, 0);

var sParams = "cone.kine.local.sclx,cone.kine.local.scly,cone.kine.local.sclz"

	+ ",cone.kine.local.rotx,cone.kine.local.roty,cone.kine.local.rotz"

	+ ",cone.kine.local.posx,cone.kine.local.posy,cone.kine.local.posz";

StoreAction(null, sParams, 1, "StoredStaticPose", true, 1, 5, false, false);

SelectObj("cone", null, true);

// Set up the mixer with two tracks and add the pose to both tracks at different frames

AddTrack("Scene_Root", "Scene_Root", 0, null, null);

AddTrack("Scene_Root", "Scene_Root", 0, null, null);

AddClip("Scene_Root", "Sources.Scene_Root.StoredStaticPose", null, 

	"Mixer.Mixer_Anim_Track", 19, null, null, null, null);

AddClip("Scene_Root", "Sources.Scene_Root.StoredStaticPose", null, 

	"Mixer.Mixer_Anim_Track1", 47, null, null, null, null);

// Set up a master-slave relation between the two clips

AddClipRelation("Mixer.Mixer_Anim_Track.StoredStaticPose_Clip", 

	"Mixer.Mixer_Anim_Track1.StoredStaticPose_Clip1", null);