SwapRelationMasterAndSlaveClip

Introduced

v4.0

Description

This will swap the master and slave clip of a ClipRelation and recompute the offset between the new slave and master clip ClipRelation objects.

Scripting Syntax

SwapRelationMasterAndSlaveClip( [Relation] );

Parameters

Parameter Type Description
Relation ClipRelation The relation.

Default Value: Current selection, if empty: pick session

Examples

JScript Example

// This example shows how to create a ClipRelation between two clip object and exchange the

// the master and slave clip.

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);

StoreAction(null, "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", 1, "StoredStaticPose", true, 1, 5, false, false);

SelectObj("cone", null, true);

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);

var myClipRelation = AddClipRelation("Mixer.Mixer_Anim_Track.StoredStaticPose_Clip", "Mixer.Mixer_Anim_Track1.StoredStaticPose_Clip1", null);

SwapRelationMasterAndSlaveClip( myClipRelation );