Introduced
3.5
Deprecated
7.5 (replaced by PlotAndApplyActions)
Description
Creates a new Action by plotting values from consecutive frames of an animation into the action, then optionally applies the Action back onto the model and optionally deletes the Action.
Note: There are two ways to specify where (under which model) you want to store the plotted action:
(1) Leave the first parameter ('Model') blank. The command will use the model owner of the object specified in the second parameter ('InputObj') as the model under which to store the action.
(2) If you want to store the action under a different model than what you are plotting, specify a 3D Object in the first parameter ('Model') that is owned by the model where you want to store the action.
Scripting Syntax
PlotAndApplyAction( [Model], [InputObj], [Name], [StartFrame], [EndFrame], [StepFrame], [FCurve Kind], [DefaultSegKind], [Fit FCurve], [Fit Tolerance], [ProcessContRots], [Apply], [Paste], [Delete] )
Parameters
|
Parameter |
Type |
Description |
|
Model |
Object owned by the model on which to put the new action. Default Value: If nothing is specified for this parameter, the action is stored under the model owner of the InputObj.
|
|
|
InputObj |
List of parameters to plot into the action. Default Value: Marked values in current selection |
|
|
Name [in/out] |
Name for the action Default Value: PlottedAction |
|
|
StartFrame [in/out] |
First frame to plot Default Value: 0 |
|
|
EndFrame [in/out] |
Last frame to plot Default Value: 0 |
|
|
StepFrame [in/out] |
Step between frames Default Value: 1 |
|
|
FCurve Kind [in/out] |
What kind of fcurve do we want to plot to? Default Value: 20 Possible Values: • 10: BOOLEAN (value true or false) • 15: INTEGER (staircase-like fcurve with integer values) • 20: STANDARD (fcurve with spline/linear/constant interpolation) • 30: RAWDATA (linear fcurve: less storage than a standard fcurve but with linear interpolation only) |
|
|
DefaultSegKind [in/out] |
What kind of interpolation do we want for the resulting fcurves? Default Value: 3 Possible Values: • 1: CONSTANT • 2: LINEAR • 3: CUBIC |
|
|
Fit FCurve [in/out] |
Do we want to fit an fcurve through the plotted values? Default Value: False |
|
|
Fit Tolerance [in/out] |
What tolerance do we want for the fit? Default Value: 0.01 |
|
|
ProcessContRots [in/out] |
Do we want to process rotation curves to ensure their continuity? Default Value: True |
|
|
Apply [in/out] |
Do we want to apply the Action after plotting it? Default Value: True |
|
|
Paste [in/out] |
If applying, should it be applied using paste (merging with existing fcurves on parameters)? Default Value: False |
|
|
Delete [in/out] |
After plotting and applying, do we want to delete the Action? Only valid if Apply is specified. Default Value: False |
Return Value
Returns the action (an ActionSource object). Returns nothing if you chose the Delete option.
Examples
VBScript Example
NewScene , False ' Create an object for this example. set oObj = CreatePrim( "Sphere", "MeshSurface" ) ' Set some keys at frames 1 and 100 with it moving diagonally. Translate oObj, -6, 3, 0, siAbsolute, siView, siObj, siXYZ SaveKey oObj & "/kine.local.pos", 1 Translate oObj, 6, -3, 0, siAbsolute, siView, siObj, siXYZ SaveKey oObj & "/kine.local.pos", 100 ' Now plot from frames 40 to 60 with a step of 2. ' Use standard curves with cubic interpolation. Don't fit ' the curve, don't care about continuous rotations since ' we're plotting positions. ' After plotting to an Action, apply the plotted animation ' back onto the sphere using "paste" so existing keys ' outside the plot range are not affected. Don't delete ' the Action after applying it. PlotAndApplyAction , oObj & "/kine.local.pos", "plot", _ 40, 60, 2, _ 20, 3, False, , , _ True, True, False
See Also
Autodesk Softimage v7.5