ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.
bakeSimulation(
objects
, [animation=string], [attribute=string], [bakeOnOverrideLayer=boolean], [controlPoints=boolean], [destinationLayer=string], [disableImplicitControl=boolean], [float=floatrange], [hierarchy=string], [includeUpperBound=boolean], [index=uint], [minimizeRotation=boolean], [preserveOutsideKeys=boolean], [removeBakedAnimFromLayer=boolean], [removeBakedAttributeFromLayer=boolean], [resolveWithoutLayer=string], [sampleBy=time], [shape=boolean], [simulation=boolean], [smart=[[, boolean, float, ]]], [sparseAnimCurveBake=boolean], [time=timerange])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
bakeSimulation は、取り消し可能、照会可能、および編集可能です。
このコマンドは、キーセット上に作用します。キーセットは、1 つまたは複数のアニメーション カーブ上の指定したタイム レンジ内のキー グループとして定義されます。
キーセットを構成するアニメーション カーブは、「-animation」フラグの値に依存します。
-
keysOrObjects:
- コマンド ラインにターゲット オブジェクトまたは -attribute フラグが表示されていない場合は任意のアクティブ キー
- アクティブ キーが存在しない場合は、コマンド ラインの targetList として指定されているオブジェクトのキーフレーム可能なすべてのアトリビュートに接続されたすべてのアニメーション カーブ
-
keys: アクティブなキーまたは接線のみに作用します。アクティブなキーまたは接線がない場合は、何も行いません。
-
objects: 指定したオブジェクトのみに作用します。オブジェクトが指定されていない場合は、何も行いません。
-animation フラグを使用して、「translateX」など attributeName という形式の引数を取る、多目的な -attribute フラグによって固有に識別されるカーブをオーバーライドすることができます。
アニメーション カーブ上の各キーは、カーブの時間値またはインデックスによって識別されます。時間とインデックスは、単独にあるいはリストの一部または範囲として指定することができます(例を参照)。
bakeSimulation コマンドはサポートされていません。代わりに「bakeResults -simulation true」を使用してください。bakeSimulation コマンドは、「bakeResults -simulation true」との下位互換性を保つために残してあります。
このコマンドによって、一連のディペンデンシー ノード、またはジョイントと IK ハンドル間などのインプリシット リレーションシップを置き換えることができます。これらは、単一のアニメーション カーブのアトリビュート値を定義します。また、このコマンドによって、サンプリングの範囲と頻度を指定することもできます。bakeResults コマンドと違って、このコマンドは時間をシーンの開始時に設定しなおす前に、すべての時間、シーケンス内、指定した時間間隔内に現在のシーンの時間を実際に設定します。これで、シーンを修正することができます。
なし
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
bakeClip, bakeResults
animation, attribute, bakeOnOverrideLayer, controlPoints, destinationLayer, disableImplicitControl, float, hierarchy, includeUpperBound, index, minimizeRotation, preserveOutsideKeys, removeBakedAnimFromLayer, removeBakedAttributeFromLayer, resolveWithoutLayer, sampleBy, shape, simulation, smart, sparseAnimCurveBake, time
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
# Keys on animation curves are identified by either
# their time values or their indices. Times and indices can
# be given as a range or list of ranges.
# time=('10pal','10pal') means the key at frame 10 (PAL format).
# time=[('1.0sec','1.0sec'),('15ntsc','15ntsc'),(20,20)] means the keys at time 1.0 second, frame 15 (in NTSC format), and time 20 (in the currently defined global time unit).
# time=(10,20) means all keys in the range from 10 to 20, inclusive, in the current time unit.
# Omitting one end of a range means "go to infinity", as in the following examples:
# time=(10,None) means all keys from time 10 (in the current time unit) onwards.
# time=(10,) means the same as (10,10)
# time=(0,10) means all keys up to (and including) time 10 (in the current time unit).
# time=(None,None) is a short form to specify all keys.
# index=(0,0) means the first key of each animation curve. (Indices are 0-based.)
# index=[(2,2),(5,5),(7,7)] means the 3rd, 6th, and 8th keys.
# index=(1,5) means the 2nd, 3rd, 4th, 5th, and 6th keys of each animation curve.
# To replace the animation driven by an ik handle of joints,
# starting from joint1, with separate animCurves, within the
# time interval 5-44, with a sampling frequency of 2 timeUnits,
# use the following command:
#
cmds.bakeSimulation( 'joint1', t=(5,44), sb=2, at=["rx","ry","rz"], hi="below" )