v6.0
Creates a new animation layer above the current animation layer and makes it the current animation layer for the specified objects.
AddAnimationLayer( [InputObjs], [Name], [MakeCurrent] ); |
Parameter | Type | Description |
---|---|---|
InputObjs | String |
List of objects. Default Value: Currently selected objects |
Name | String | Name for the new layer. |
MakeCurrent | Boolean |
Make the new layer the current animation layer Default Value: True |
' ' In this example, an FCurve is created on the XPos param ' of the sphere. Then, two keys are created (at frame 1, ' XPos = -2; at frame 30, XPos = 5). A layer is then added ' to adjust the end frame position. (frame 30, XPos = 8) ' NewScene CreatePrim "Sphere", "NurbsSurface", "MySphere" ' Add a posx fcurve AddFCurve "MySphere.kine.local.posx" ' Add two keys, at frame 1 and 30 SaveKey "MySphere.kine.local.posx", 1, -2 SaveKey "MySphere.kine.local.posx", 30, 5 ' Create a new animation layer and make it current AddAnimationLayer ' Add two layer keys, at frame 1 and 30 SaveKey "MySphere.kine.local.posx", 1, 0 SaveKey "MySphere.kine.local.posx", 30, 3 ' Set back to layer 0 SetCurrentAnimationLayer ,0 ' Play the animation PlayForwardsFromStart |