CopyClipToTrack

Introduced

v1.5

Categories

animmixer

Description

Copies a Clip within one Track, or to another track of the same type within a Model.

Scripting Syntax

oReturn = CopyClipToTrack( Model, Clip, [Compound], Track, [Time] );

Return Value

Returns a Clip object).

Parameters

Parameter Type Description
Model String The model owning the clip.
Clip String Source clip to copy.
Compound String The compound container (track owner) to copy the clip to.
Track String The track to copy the clip to.
Time Double Frame to copy the clip to.

Default Value: Current frame.

Examples

VBScript Example

'
' This example makes a couple of shape keys and instantiates them on the mixer,
' transitioning between them.  Then it copies 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 copy one of the clips into it.
set oTrackCpd = AddTrack( "Scene_Root", , 1, "ForCompound" )
CopyClipToTrack "Scene_Root", oClipShape2, , oTrackCpd 
' Delete the temporary track
DeleteObj oTrackTemp

See Also

MoveClipToTrack AddClip AddTrack