GetDrivingActions

Introduced

v1.5

Categories

animmixer

Description

Gets the actions that drive the specified objects in the scene.

Scripting Syntax

oReturn = GetDrivingActions( [InputObjs], [Consider Time], [Time], [Keep Compound Actions], [Keep Inactive Actions] );

Return Value

Returns the actions that are driving the objects (a XSICollection object).

Parameters

Parameter Type Description
InputObjs String List of objects

Default Value: Current selection

Consider Time Boolean Whether to only return actions active at supplied time

Default Value: False

Time Double Frame number

Default Value: Current frame.

Keep Compound Actions Boolean Whether to return compound actions

Default Value: True

Keep Inactive Actions Boolean Whether to return inactive actions

Default Value: False

Examples

VBScript Example

'
'       This example demonstrates how to use the GetDrivingActions() command.
'
'Create a little sample scene with a simple animated sphere
NewScene , false
'Make sure we are in Mixed Weight Mode
SetUserPref "ShapeInstancingMode", 1
set oSphere = ActiveSceneRoot.AddGeometry( "Sphere", "MeshSurface" )
SaveShapeKey "sphere", , , 1, , , , , siShapeLocalReferenceMode
'Move a vertice and record that as the shape at frame 20
SelectGeometryComponents "sphere.pnt[33]"
Translate , 3, 0, 0, siRelative, siView, siObj, siXYZ
SaveShapeKey oSphere & ".pnt[33]", , , 20, , , , , siShapeLocalReferenceMode
'Move another point as shape for frame 30
SelectGeometryComponents "sphere.pnt[1]"
Translate , 0, 3, 0, siRelative, siView, siObj, siXYZ
SaveShapeKey oSphere & ".pnt[1]", , , 30, , , , , siShapeLocalReferenceMode
'Access the ShapeClips which have been created on the object
set oClips = GetDrivingActions( oSphere, False, , False, False )
LogMessage oSphere & " is driven by these Shape Clips"
for each oClip in oClips        
        LogMessage oClip
next

See Also

SelectActionsFromObjects SelectObjectsFromAction ShapeClip