ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.
autoKeyframe([addAttr=name], [characterOption=string], [listAttr=boolean], [noReset=boolean], [state=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
autoKeyframe は、取り消し可能、照会可能、および編集可能です。
フラグがない場合、このコマンドは、「autoKeyframe -state on」コマンドの発行後に変更された、すべてのアトリビュートにキーフレームを設定します。修正されたアトリビュートの追跡を中止する場合は、「autoKeyframe -state off」を使用します。
autoKeyframe は新しいアニメーション カーブを作成しません。アトリビュートは(setKeyframe コマンドで)キーフレーム設定され、修正されたアトリビュートに autoKeyframe で新しいキーフレームを追加する必要があります。
「autoKeyframe -query -state」で、autoKeyframing の現在の状態を照会することもできます。
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
findKeyframe, setDrivenKeyframe, setKeyPath, setKeyframe
addAttr, characterOption, listAttr, noReset, state
ロング ネーム(ショート ネーム) |
引数タイプ |
プロパティ |
|
addAttr(aa)
|
name
|
|
|
autoKeyframe が現在自動キー設定を検討しているプラグのリスト(node.attribute)に追加します。このリストは一時的なもので、存続期間は短時間です。autoKeyframe によりキーフレームが設定されるか、設定するキーフレームがないと判断された場合は、次のアトリビュート設定の完了時にリセットされます。
|
|
characterOption(co)
|
string
|
 
|
|
有効なオプションは、「standard」、「all」です。キャラクタのキーを自動設定する場合に、Auto Key が標準設定どおりに動作するか(「standard」)、キャラクタ アトリビュートすべてにキーを設定するか(「all」)を指定します。既定は「standard」です。
|
|
listAttr(lsa)
|
boolean
|
|
|
autoKeyframe が現在自動キー設定を検討しているプラグのリスト(node.attribute)を返します。このリストは一時的なもので、存続期間は短時間です。autoKeyframe によりキーフレームが設定されるか、設定するキーフレームがないと判断された場合は、次のアトリビュート設定の完了時にリセットされます。
|
|
noReset(nr)
|
boolean
|

|
|
state/st フラグと一緒に使用する必要があります。noReset/nr を指定すると、状態が変化したときに自動キー設定するプラグのリストがクリアされません。
|
|
state(st)
|
boolean
|
 
|
|
修正されたアトリビュートの記憶のオン/オフを指定します。
|
|
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
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 )
# List the plugs that will be considered to add a key on completion of the
# next set attribute.
cmds.autoKeyframe(query=True, listAttr=True)
# Add to the list the plugs that will be considered to add a key on
# completion of the next set attribute.
cmds.autoKeyframe(edit=True, addAttr='myNode.myAttr')
# When auto-keying, key all character attributes, not just
# those that have changed.
#
cmds.autoKeyframe( characterOption="all" )