v1.5
Freezes the input clips by plotting them into a new source action.
oString = FreezeClips( [InputObj], [Name], [IgnoreInactiveChannels], [StepFrame], [FCurve Kind], [DefaultSegKind], [Fit FCurve], [Fit Tolerance], [ProcessContRots] ); |
Returns the fullname of the action as a String.
Parameter | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
InputObj | String |
List of clips Default Value: Current selection |
||||||||||
Name | String |
Name of the frozen action. Default Value: "FrozenAction" |
||||||||||
IgnoreInactiveChannels | Boolean |
Ignore inactive channels when freezing. If set to True,
inactive items will not be added in the frozen action. Default Value: True |
||||||||||
StepFrame | Double |
Step between frames Default Value: 1 |
||||||||||
FCurve Kind | Integer |
What kind of fcurve do we want to plot to? Default Value: 30
|
||||||||||
DefaultSegKind | Integer |
What kind of interpolation do we want for the resulting fcurves? Note: Only relevant when FCurveKind is 20 (Standard). Default Value: 3
|
||||||||||
Fit FCurve | Boolean |
Do we want to fit an fcurve through the plotted values? Default Value: False |
||||||||||
Fit Tolerance | Double |
What tolerance do we want for the fit? Default Value: 0.01 |
||||||||||
ProcessContRots | Boolean |
Do we want to process rotation curves to ensure their continuity? Default Value: True |
' ' This example sets up two action clips for a sphere (one on the ' X-position and one on the Y-position), stores the actions, and ' then freezes the clips, creating a new (uninstantiated) source Action. ' ' Set up the scene Set oRoot = ActiveSceneRoot Set oSphere = CreatePrim( "Sphere", "NurbsSurface", "MySphere" ) ' Setting key frames on XPos and YPos at various frames SaveKey oSphere.posx, 1, -9.0 SaveKey oSphere.posx, 10, 3.0 SaveKey oSphere.posx, 30,-3.0 SaveKey oSphere.posx, 40, 9.0 SaveKey oSphere.posy, 1, -2.0 SaveKey oSphere.posy, 30, 2.0 ' Store fcurve into source Actions Set oAct1 = StoreAction( oSphere, oSphere.posX, 2, "PlotXPosAction" , _ True, 1, 40, True, False ) Set oAct2 = StoreAction( oSphere, oSphere.posy, 2, "PlotYPosAction" , _ True, 1, 30, True, False ) ' Add 2 tracks into the animation mixer, and add action clip with ' the 2 sources action in tracks Set oClip1 = AddClip( oRoot, oAct1, , , 1 ) Set oClip2 = AddClip( oRoot, oAct2, , , 1 ) ' Create an XSICollection containing the 2 action clips Set oInputClips = CreateObject( "XSI.Collection" ) oInputClips.Add oClip1 oInputClips.Add oClip2 ' Freeze action clips to create a new source Action. ' If you want to instantiate it at the same time and replace ' the existing clips, use FreezeAndReplaceClips. oFrozen = FreezeClips( oInputClips, "FreezeXYPosAction", True, 1, _ 30, 3, False, 0.01, True ) LogMessage "Froze source: " & oFrozen |