ジャンプ先: 概要. 戻り値. フラグ. Python 例.
ungroup(
[objects...]
, [absolute=boolean], [parent=string], [relative=boolean], [world=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
ungroup は、取り消し可能、照会不可能、および編集不可能です。
指定したオブジェクトのグループ化を解除します。グループ解除されたオブジェクトは、-w フラグで指定されない限り、グループ ノードと同じ階層に置かれます。-w で指定した場合はワールド空間の下に置かれます。
オブジェクトがグループ化解除されたとき、新しく置かれたグループに同じ名前のオブジェクトがあった場合、このコマンドはグループ化解除されたオブジェクトの名前を変更します。
関連項目: group、parent、instance、duplicate
なし
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
absolute(a)
|
boolean
|
![]() |
||
|
||||
parent(p)
|
string
|
![]() |
||
|
||||
relative(r)
|
boolean
|
![]() |
||
|
||||
world(w)
|
boolean
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds # Create a simple hierarchy cmds.sphere( n='sphere1' ) cmds.move( 2, 0, 0 ) cmds.sphere( n='sphere2' ) cmds.move( -2, 0, 0 ) cmds.group( 'sphere1', 'sphere2', n='group1' ) cmds.move( 0, 2, 0 ) cmds.sphere( n='sphere3' ) cmds.move( 0, 0, 2 ) cmds.group( 'group1', 'sphere3', n='group2' ) cmds.group( em=True, n='group3' ) # Remove group1 from the hierarchy. What should remain # is group2 with sphere3, sphere1, and sphere2 as children. # Note that the objects don't move since the absolute flag # is implied. # cmds.ungroup( 'group1' ) # Try the same ungroup with the -relative flag. # Now sphere1 and sphere2 will move down 2 units in Y. # cmds.undo() cmds.ungroup( 'group1', relative=True ) # Now try the same ungroup operation with the -parent flag. # This will move the children of group1 under group3. cmds.undo() cmds.ungroup( 'group1', parent='group3' )