移動先: 概要 戻り値 キーワード. 関連項目. フラグ. Python 例.

概要

reorderContainer([back=boolean], [front=boolean], [relative=int])

注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。

reorderContainer は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。

このコマンドは、オブジェクトの順序を、コンテナ内の子に対して相対的に変更します(移動します)。

相対的に移動するには、正または負の数を指定します。正の数はオブジェクトを兄弟オブジェクトの中で前方に、負の数は後方に移動します。オブジェクトが兄弟オブジェクトのリストの最後(最初)にある場合、 相対的に 1(-1)移動すると、オブジェクトは リストの最初(最後)に移動します。つまり、必要な場合、相対的な移動はラップします。

一度に 1 つのコンテナ内のノードのみを移動できます。

戻り値

none

戻り値の型は照会モードでは照会フラグが基になります。

キーワード

node, container, reorder

関連項目

container

フラグ

back, front, relative
ロング ネーム(ショート ネーム) 引数型 プロパティ
front(f) boolean createqueryedit
オブジェクトをコンテナの内容リストの前面に移動します
back(b) boolean createqueryedit
オブジェクトをコンテナの内容リストの後面に移動します
relative(r) int createqueryedit
オブジェクトを他のコンテナの内容に対して相対的に移動します。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : タプルまたはリストとして渡された複数の引数を持てるフラグ

Python 例

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( '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 )