AddLayerClip
 
 
 

AddLayerClip

Introduced

v6.0

Description

Creates a Layer Clip and adds it to the Mixer of the specified Model. An empty source is added for the new layer clip.

Scripting Syntax

oReturn = AddLayerClip( Model, [Track], [Name] );

Return Value

Returns a layer Clip object.

Parameters

Parameter Type Description
Model String Model to add the clip to.
Track String Track to add this clip to. Must be a layer track.
Name String Name for the new clip.

Examples

VBScript Example

'
' This example creates a simple Action and instantiates it
' on two different objects using a connection mapping template.
' It shows very basic mixer scripting -- creating Actions, tracks
' and clips, as well as a simple mapping template.
'
' Create objects for our example.
set oSphere = CreatePrim( "Sphere", "MeshSurface" )
posParams = "/kine.local.posx,kine.local.posy,kine.local.posz"
' Make an Action with it moving diagonally over 20 frames.
SetPositionKey oSphere, 1, -5, -5, 0
SetPositionKey oSphere, 20, 5, 5, 0
' Create a layer track and instantiate the Action onto it
set oTrack = AddTrack( "Scene_Root", , 5 )
set oClip = AddLayerClip( "Scene_Root", oTrack )
'==================================================
' Helper method to key an object somewhere at a given frame.
'==================================================
sub SetPositionKey( in_oObj, in_frame, in_posX, in_posY, in_posZ )
        Translate in_oObj, in_posX, in_posY, in_posZ, siAbsolute, siParent, siObj, siXYZ
        SaveKey in_oObj & posParams, in_frame
end sub

See Also

AddTrack Clip