v1.5
Gets the actions that drive the specified objects in the scene.
oReturn = GetDrivingActions( [InputObjs], [Consider Time], [Time], [Keep Compound Actions], [Keep Inactive Actions] ); |
Returns the actions that are driving the objects (a XSICollection object).
| 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 |
'
' 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
|