SetCurrentAnimationLayer

導入

v6.0

カテゴリ

アニメーション

詳細

指定されたオブジェクトに現在のアニメーション レイヤを設定します。 現在のレイヤは、有効なレイヤのみに設定できます。

スクリプト構文

SetCurrentAnimationLayer( [InputObjs], Layer, [CreateLayer] );

パラメータ

パラメータ タイプ 詳細
InputObjs 文字列 オブジェクトのリスト

デフォルト値:現在選択されているオブジェクト

レイヤ Long キーの設定先アニメーション レイヤ
CreateLayer ブール レイヤを作成します(レイヤが存在しない場合)。

デフォルト値: False

VBScript の例

' 
' 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 
' Set to layer 1
SetCurrentAnimationLayer ,1,True
' 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

関連項目

GetCurrentAnimationLayer GetNumberOfAnimationLayers AddAnimationLayer DeleteAnimationLayer DuplicateAnimationLayer RemoveAnimation RemoveAllAnimation SaveKey RemoveKey PrevKey FirstKey LastKey Parameter.AddFCurve