ジャンプ先: 概要. 戻り値. フラグ. Python 例.
reorder(
[objects...]
, [back=boolean], [front=boolean], [relative=int])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
reorder は、取り消し可能、照会不可能、および編集不可能です。
このコマンドは、兄弟オブジェクトに対するオブジェクトの順序を変更(移動)します。相対的に移動するには、正または負の数を指定します。正の数はオブジェクトを兄弟オブジェクトの中で前方に、負の数は後方に移動します。オブジェクトが兄弟オブジェクトのリストの最後(最初)にある場合、相対的に 1 (-1)移動すると、オブジェクトはリストの最初(最後)に移動します。つまり、必要な場合、相対的な移動はラップします。
シェイプが指定され、それが唯一の子であれば、その親の順序が変更されます。
なし
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
back(b)
|
boolean
|
|
||
|
||||
front(f)
|
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 )