DeleteAnimationLayer

導入

v6.0

詳細

指定されたアニメーション レイヤを削除します。

注: このコマンドではベースアニメーションを削除できないため、レイヤの 0(ゼロ)という値は無視されます。

スクリプト構文

DeleteAnimationLayer( [InputObjs], [Layer] );

パラメータ

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

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

Layer Long 削除するアニメーション レイヤ。 0 より大きいレイヤだけを削除できます。

デフォルト値:現在のアニメーションレイヤ(-1)

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

' and removed.

'

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 

' Delete animation layer

DeleteAnimationLayer

' Play the animation

PlayForwardsFromStart

関連項目

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