Introduced
1.0
Description
Plots the shapes for objects with shape animations.
Note: This command uses output arguments. C# and some scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference so you need to use the best workaround for your situation:
For scripting languages this command returns an ISIVTCollection which you can use to get the output arguments.
For C# you can use the XSIApplication.ExecuteCommand method to call this command. ExecuteCommand packs the output arguments into a C# System.Object containing an Array of the output arguments (see Calling Commands from C#).
Scripting Syntax
PlotShape( [InputObj], [Name], [StartFrame], [EndFrame], [StepFrame], [ApplyKeys], [Mode], [Content], [RefMode], [SingleSource], [KeyList], [ClipList] )
Parameters
|
Parameter |
Type |
Description |
|
InputObj |
List of objects whose shapes are plotted. Default Value: Current Selection |
|
|
Name |
Prefix for shape source names. |
|
|
StartFrame |
First frame to plot |
|
|
EndFrame |
Last frame to plot |
|
|
StepFrame |
Step between each keys |
|
|
ApplyKeys |
True to apply the plotted keys to the object |
|
|
Mode |
Determines how the shape is to be instantiated. Default Value: siShapeBlendedWeightMode |
|
|
Content |
Determines which deformations should get stored in the shape. Default Value: siShapeContentUseConstructionMode |
|
|
RefMode |
The reference mode of the shape key created Default Value: siShapeLocalReferenceMode |
|
|
SingleSource |
If true, the deformation will be stored into a single shape source. Default Value: True |
|
|
KeyList [out] |
List of created shape keys |
|
|
ClipList [out] |
List of created shape clips |
Examples
VBScript Example
' ' This example creates an animated deformation (twist on a torus). ' Then, it replaces the animation by 4 shapes, placed at regular ' intervals. The twist op is completely replaced by shapes, ' with a similar result. ' ' The shapes created by the plotting operation are written to the log. ' ' Set up a twist deformation on a torus NewScene , false CreatePrim "Torus", "MeshSurface" SetValue "torus.polymsh.geom.subdivu", 24 SetValue "torus.polymsh.geom.subdivu", 40 SetValue "torus.polymsh.geom.subdivv", 24 ApplyOp "Twist", "torus", 3, siPersistentOperation SaveKey "torus.polymsh.twistop.angle", 1, 90 SetValue "PlayControl.Key", 50 SetValue "PlayControl.Current", 50 SetValue "torus.polymsh.twistop.angle", -90 SaveKey "torus.polymsh.twistop.angle", 50, -90 SetValue "PlayControl.Current", 1 ' Plot the animation in shapes, from frame 0 to 50, in steps of 10 frames Dim CreatedClips, CreatedShapes PlotShape "torus", "twisted", 1, 50, 10, True, siShapeMixedWeightMode, siShapeContentAllDeforms, _ siShapeAbsoluteReferenceMode, false, CreatedShapes, CreatedClips ' We can now delete the twist, and we will still have a similar result from the 5 shapes DeleteObj "torus.polymsh.twistop" for i = 0 to CreatedClips.Count-1 Application.LogMessage "Created shape: " & CreatedShapes(i) next 'This example outputs the following information to the Script Editor in Softimage: ' ''INFO : Created shape: torus.polymsh.cls.twisted.twisted1 'INFO : Created shape: torus.polymsh.cls.twisted.twisted2 'INFO : Created shape: torus.polymsh.cls.twisted.twisted3 'INFO : Created shape: torus.polymsh.cls.twisted.twisted4 'INFO : Created shape: torus.polymsh.cls.twisted.twisted5
Autodesk Softimage v7.5