ResetSelectedEffectCurves

Introduced

1.5

Description

Resets the effect curves for the selected object(s) in the selected action clips This will only be called (for now) from the effect contextual menu.

Note: The object where the action clip is defined must be selected before calling this command.

 

Scripting Syntax

ResetSelectedEffectCurves( Clip )

Parameters

Parameter

Type

Description

Clip

String

Selected Clips

Default Value: Current selection

Examples

VBScript Example

'
' This example shows how to create an offset clip effect.
' First, an animation is created on the sphere, and 
' a CreateOffsetEffect is created on the action clip.
' Then, offset keys are added to the Fcurve of the clip effect.
' 
' At the end, ResetSelectedEffectCurves will be called to reset all infos
' on the effect of the current selected object, 
' but keeping the effect.
'

NewScene
CreatePrim "Sphere", "NurbsSurface", "MySphere"

SetValue "PlayControl.Out", 40

' Setting a key frame on XPos at frame 1
SaveKey "MySphere.kine.local.posx", 1, -9.0
' Setting a key frame on XPos at frame 10
SaveKey "MySphere.kine.local.posx", 10, 3.0
' Setting a key frame on XPos at frame 30
SaveKey "MySphere.kine.local.posx", 30,-3.0
' Setting a key frame on XPos at frame 40
SaveKey "MySphere.kine.local.posx", 40, 9.0

' Return to frame 1
SetValue "PlayControl.Current", 1

' Store fcurve into source Actions
StoreAction "MySphere", "MySphere.kine.local.posX", 2, "XPosAction" , True, 1, 40, True, False

' Add a track into the mixer, and add action clip to it.
AddTrack "Scene_Root", "Scene_Root", 0
AddClip "Scene_Root", "Sources.Animation.XPosAction", , "Mixer.Mixer_Anim_Track", 0

' Create an Offset Effect on XPosActionClip
CreateOffsetEffect "Mixer.Mixer_Anim_Track.XPosAction_Clip"

' Goto Frame 15 and set the XPos of the sphere to -3.75.
' When calling cmd SaveOffsetKeys, the system will save
' into the fcurve of offset clip effect the difference
' between the XPos value in the clip, and -3.75
SetValue "PlayControl.Current", 15
Translate "MySphere", -3.75, 0, 0, siAbsolute, siParent, siObj, siX
SaveOffsetKeys "Mixer.Mixer_Anim_Track.XPosAction_Clip",siAllParamsInClip , 15

' Create another offset key (key on the fcurve of the clip effect)
' at frame 30
SetValue "PlayControl.Current", 30
Translate "MySphere", 2, 0, 0, siAbsolute, siParent, siObj, siX
SaveOffsetKeys "Mixer.Mixer_Anim_Track.XPosAction_Clip", siAllParamsInClip, 30

SelectObj "MySphere"

' Now reset the offset effect curve created.
ResetSelectedEffectCurves "Mixer.Mixer_Anim_Track.XPosAction_Clip"

''''''''''''''''''''''''''''''''''''''''''''''''''''''
' To see the result, go to the animation mixer, 
' right-click the XPosAction_Clip, and select Animation Editor
''''''''''''''''''''''''''''''''''''''''''''''''''''''

See Also

CreateOffsetEffect

CreateScaleEffect

RemoveEffect

ResetAllEffectCurves

ResetEffectAtFrame

 

 

 



Autodesk Softimage v7.5