AnimationSourceItem.Active
 
 
 

AnimationSourceItem.Active

Description

Sets or returns whether the source item is active or not as a Boolean (true = active; false = muted).

C# Syntax

// get accessor
Boolean rtn = AnimationSourceItem.Active;
// set accessor
AnimationSourceItem.Active = Boolean;

Examples

VBScript Example

'
' This example illustrates how to create a simple actionsource, access the actionsource 
' from the model and mute one of the source items. The modified actionsource is then used 
' to create an action clip.
'
NewScene , false
set oRoot = Application.ActiveProject.ActiveScene.Root
' These commands were cut and pasted from scripting history
' and modified to work in a script.
' The commands create a simple actionsource from some animation on
' the nulls position
set oNull = GetPrim( "Null" )
strPosParams = oNull & ".kine.local.posx," & oNull & ".kine.local.posy," & oNull & ".kine.local.posz"
Translate oNull, -8.153, 7.015, -0.702, siRelative, siView, siObj, siXYZ
SaveKey strPosParams, 1.000
Translate oNull, 8.350, -8.935, 0.894, siRelative, siView, siObj, siXYZ
SaveKey strPosParams, 50.000
Translate oNull, 9.413, 8.935, -0.894, siRelative, siView, siObj, siXYZ
SaveKey strPosParams, 100.000
StoreAction oRoot, strPosParams, 2, "StoredFcvAction", True, 1, 100
' Get the actionsource from the model
set oActionSource = oRoot.Sources("StoredFcvAction")
' Find animation source item with posx and mute it
for each oSourceItem in oActionSource.SourceItems
        if InStr(1,CStr(oSourceItem.Target),"posx",vbTextCompare)<>0 then
                LogMessage "muting " & oSourceItem.Target
                oSourceItem.Active = False
                exit for
        end if
next
' Apply actionsource with muted posx
ApplyAction oActionSource, oNull
' Output of above script:
'INFO : muting null.kine.local.posx