移動先: 概要 戻り値 フラグ. Python 例.
reorder(
[objects...]
, [back=boolean], [front=boolean], [relative=int])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
reorder は 「元に戻す」が可能、「照会」が不可能、「編集」が不可能 です。
このコマンドは、兄弟オブジェクトに対するオブジェクトの順序を変更(移動)します。
相対的に移動するには、正または負の数を指定します。正の数はオブジェクトを兄弟オブジェクトの中で前方に、負の数は後方に移動します。オブジェクトが兄弟オブジェクトのリストの最後(最初)にある場合、
相対的に 1(-1)移動すると、オブジェクトは
リストの最初(最後)に移動します。つまり、必要な場合、相対的な移動はラップします。
シェイプが指定され、それが唯一の子であれば、
その親の順序が変更されます。
なし
back, front, relative
ロング ネーム(ショート ネーム) |
引数型 |
プロパティ |
front(f)
|
boolean
|
|
|
オブジェクトを兄弟オブジェクトのリストの先頭に移動します。
|
|
back(b)
|
boolean
|
|
|
オブジェクトを兄弟オブジェクトのリストの最後に移動します。
|
|
relative(r)
|
int
|
|
|
オブジェクトを他の兄弟オブジェクトに対して相対的に移動します。
|
|
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: タプルまたはリストとして渡された複数の引数を持てるフラグ
|
import maya.cmds as cmds
# create a hierarchy
cmds.sphere( n='sphere1' )
cmds.sphere( n='sphere2' )
cmds.sphere( n='sphere3' )
cmds.sphere( n='sphere4' )
cmds.group( 'sphere1', 'sphere2', 'sphere3', 'sphere4', n='group1' )
# The hierarchy group1 contains sphere1, sphere2, sphere3 and sphere4.
# The command below moves sphere2 before sphere1.
cmds.reorder( 'sphere2', r=-1 )
# make sphere1 the first sibling
cmds.reorder( 'sphere1', front=True )
# move sphere3 forward 2 siblings. Moving it forward one
# sibling would put it at the end. Moving it forward again
# puts it at the beginning.
cmds.reorder( 'sphere3', r=2 )