v1.0
animmixer
MoveClipToTrack( Model, Clip, [Compound], [Track], [Time] ); |
Parameter | Type | Description |
---|---|---|
Model | String | The model owning the clip. |
Clip | String | The clip to move. |
Compound | String | The compound container (track owner) to move the clip to. |
Track | String | The track to move the clip to (NULL == move within the same track). |
Time | Double | Frame to move the clip to.
Default Value: Current frame. |
' ' This example makes a couple of shape keys and instantiates them on the mixer, ' transitioning between them. Then it moves one of the clips into a compound ' clip container. ' ' Create the object for our example. set oSphere = CreatePrim( "Sphere", "MeshSurface" ) ' Store a couple of shape keys (we use the temporarily-applied bulge ' just to have an interesting shape for the second key. set oSourceShape1 = StoreShapeKey( oSphere, , siShapeLocalReferenceMode ) set oBulge = ApplyOp( "Bulge", oSphere, 3, siPersistentOperation, , 1 ) set oSourceShape2 = StoreShapeKey( oSphere, , siShapeLocalReferenceMode ) DeleteObj oBulge ' Create a temporary track to put the clips onto. set oTrackTemp = AddTrack( oSphere, , 1 ) ' Instantiate the shape sources onto the track. set oClipShape1 = AddClip( "Scene_Root", oSourceShape1, , oTrackTemp, 1 ) set oClipShape2 = AddClip( "Scene_Root", oSourceShape2, , oTrackTemp, 90 ) ' Put a transition between the two clips. AddTransition oClipShape1, oClipShape2, 0 ' Create a track for a shape compound, then move one of the clips into it. set oTrackCpd = AddTrack( "Scene_Root", , 1, "ForCompound" ) MoveClipToTrack "Scene_Root", oClipShape2, , oTrackCpd ' Delete the temporary track DeleteObj oTrackTemp |