Clip.Relations

Introduced

v4.0

Description

Returns a ClipRelationCollection containing each ClipRelation objects which is directly affecting this clip.

Note: To get the collection of ClipRelation objects nested under a ClipContainer or the Mixer, use ClipContainer.NestedRelations.

C# Syntax

// get accessor
ClipRelationCollection rtn = Clip.Relations;

Examples

JScript Example

/*
	This example shows how to create a ClipRelation 
*/
NewScene(null, false);
// Set up the scene with a cone and translate it in X, Y and Z.
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);
// Store the transformation parameter values as a static pose
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);
// Set up the Mixer with 2 tracks, using the same clip but 
// beginning at different frames
SelectObj("cone", null, true);
AddTrack("Scene_Root", "Scene_Root", 0, null, null);
AddTrack("Scene_Root", "Scene_Root", 0, null, null);
var myClip  = AddClip("Scene_Root", "Sources.Scene_Root.StoredStaticPose", 
	null, "Mixer.Mixer_Anim_Track", 19, null, null, null, null);
var myClip1  = AddClip("Scene_Root", "Sources.Scene_Root.StoredStaticPose", 
	null, "Mixer.Mixer_Anim_Track1", 47, null, null, null, null);
// Create a clip relation between the clips on the different tracks
var oRootMixer = ActiveSceneRoot.Mixer;
var myClipRelation = oRootMixer.AddRelation(myClip, myClip1 , "myRelation");
var myRelations = myClip.Relations;
LogMessage( "The number of clip relations nested affecting myClip is: " + myRelations.count );
//INFO : The number of clip relations nested affecting myClip is: 1