ジャンプ先: 概要. 戻り値. キーワード. 関連. フラグ. Python 例.
reorderContainer([back=boolean], [front=boolean], [relative=int])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
reorderContainer は、取り消し可能、照会可能、および編集可能です。
このコマンドは、オブジェクトの順序を、コンテナ内の子に対して相対的に変更します(移動します)。 相対的に移動するには、正または負の数を指定します。正の数はオブジェクトを兄弟オブジェクトの中で前方に、負の数は後方に移動します。オブジェクトが兄弟オブジェクトのリストの最後(最初)にある場合、相対的に 1 (-1)移動すると、オブジェクトはリストの最初(最後)に移動します。つまり、必要な場合、相対的な移動はラップします。 一度に 1 つのコンテナ内のノードのみを移動できます。注: コンテナ コマンドの -nodeList フラグは、含まれるノードのソート済みリストを返します。順序変更の結果を確認するには、-unsortedOrder フラグと -nodeList フラグと一緒に使用します。なし
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
back(b)
|
boolean
|
|
||
|
||||
front(f)
|
boolean
|
|
||
|
||||
relative(r)
|
int
|
|
||
|
||||
import maya.cmds as cmds # create a container cmds.sphere( n='sphere1' ) cmds.sphere( n='sphere2' ) cmds.sphere( n='sphere3' ) cmds.sphere( n='sphere4' ) cmds.container( addNode=['sphere1', 'sphere2', 'sphere3', 'sphere4'], n='sphereCon' ) # The container sphereCon contains sphere1, sphere2, sphere3 and sphere4. # The command below moves sphere2 before sphere1. cmds.reorderContainer( 'sphere2', r=-1 ) # make sphere1 the first sibling cmds.reorderContainer( '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.reorderContainer( 'sphere3', r=2 )