移動先: 概要 戻り値 関連項目. フラグ. Python 例.

概要

autoKeyframe([characterOption=string], [state=boolean])

注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。

autoKeyframe は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。

フラグがない場合、このコマンドは、「autoKeyframe -state on」コマンドの発行後に変更された、すべてのアトリビュートにキーフレームを設定します。修正されたアトリビュートの追跡を中止する場合、「autoKeyframe -state off」を使用してください。

autoKeyframe では、新しいアニメーション カーブは作成しません。アトリビュートは(setKeyframe コマンドで)キーフレーム設定され、修正されたアトリビュートに autoKeyframe で新しいキーフレームを追加する必要があります。

「autoKeyframe -query -state」で、autoKeyframing のカレントの状態を照会することもできます。

戻り値

intキーフレーム セットの数。

戻り値の型は照会モードでは照会フラグが基になります。

関連項目

findKeyframe, setDrivenKeyframe, setKeyPath, setKeyframe

フラグ

characterOption, state
ロング ネーム(ショート ネーム) 引数型 プロパティ
state(st) boolean createqueryedit
修正されたアトリビュートの記憶のオン/オフを指定します。
characterOption(co) string createqueryedit
有効なオプションは、「standard」、「all」です。キャラクタのキーを自動設定する場合に、Auto Key が標準設定どおりに動作するか(「standard」)、キャラクタ アトリビュートすべてにキーを設定するか(「all」)を指定します。デフォルトは「standard」です。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : タプルまたはリストとして渡された複数の引数を持てるフラグ

Python 例

import maya.cmds as cmds

# Start remembering attributes that have changed
#
cmds.autoKeyframe( state=True )

# Set a keyframe for all attributes that have changed
# since the last "autoKeyframe( state=True )
#
cmds.autoKeyframe()

# Stop remembering attributes that have changed.
# Note that Subsequent "autoKeyframe" commands
# (with no flags) will have no effect until an
# autoKeyframe( state=True ) command is executed.
#
cmds.autoKeyframe( state=False )

# When auto-keying, key all character attributes, not just
# those that have changed.
#
cmds.autoKeyframe( characterOption="all" )