ジャンプ先: 概要. 戻り値. フラグ. Python 例.
flow(
objects
, [divisions=[uint, uint, uint]], [localCompute=boolean], [localDivisions=[uint, uint, uint]], [objectCentered=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
flow は、取り消し可能、照会可能、および編集可能です。
flow コマンドは、モーション パス アニメーションのカーブに沿ってアニメートされるオブジェクトを「ベンドする」デフォメーション ラティスを作成します。モーション パス アニメーションには、オンに設定するための追従オプションがなければなりません。
| string[] | 作成されたフロー ノードと関連するラティス ノードの名前です。 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
divisions, localCompute, localDivisions, objectCentered
| ロング ネーム(ショート ネーム) |
引数タイプ |
プロパティ |
|
divisions(dv)
|
[uint, uint, uint]
|
|
|
このフラグは x、y、z におけるラティス スライスの数を指定します。 既定値は 2 5 2 です。 照会すると、uint32_t uint32_t uint32_t を返します。
|
|
localCompute(lc)
|
boolean
|
|
|
このフラグは、オブジェクト デフォメーションにローカル コントロールを持たせるかどうかを指定します。 既定値: ラティスがカーブの周りにあるときはオンで、オブジェクトの周りにあるときはオフです。 照会すると boolean を返します。
|
|
localDivisions(ld)
|
[uint, uint, uint]
|
|
|
このフラグは影響範囲を指定します。 既定値は 2 2 2 です。 照会すると、uint32_t uint32_t uint32_t を返します。
|
|
objectCentered(oc)
|
boolean
|
|
|
このフラグは選択したオブジェクトの中心の周りにラティスを作成するか、またはカーブの周りにラティスを作成するかを指定します。 既定は true です。 照会すると boolean を返します。
|
|
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
# Create a simple motion path animation
# create a path, e,g, a curve
path = cmds.curve(d=3,p=[(-10, 0, 0),(-6, 0, 10),(-3, 0, -10),(10, 0, 0)],k=[0, 0, 0, 1, 1, 1])
# create an object, e.g. a sphere
object = cmds.sphere()
cmds.scale( 0.5, 2.0, 0.2 )
# animate the object using a motion path with follow on for 30 frames
cmds.pathAnimation( object[0], f=1, stu=0, etu=30, c=path )
# select only the animated object
cmds.select( object[0], r=True )
# Create flow deformation on the selected object with default values:
cmds.flow()
# Create flow deformation on the selected object with
# the lattice around the path, and lattice division of 3,20,2:
cmds.flow( oc=False, dv=(3, 20, 2) )
# Create flow deformation on the selected object with
# lattice subdivisions 4, 7, and 3:
cmds.flow( dv=(4, 7, 3) )
# When the object is not currently selected, the name of the object
# has to be specified in the command line (note: $object[0] has to
# have a motion path animation):
cmds.flow( object[0], dv=(4, 7, 3) )