Go to: Synopsis. Return value. Flags. MEL examples.
ungroup [-absolute] [-parent string] [-relative] [-world]
[objects...]
ungroup is undoable, NOT queryable, and NOT editable.
This command ungroups the specified objects.
The objects will be placed at the same level in the hierarchy the
group node occupied unless the -w flag is specified, in which case
they will be placed under the world.
If an object is ungrouped and there is an object in the new group
with the same name then this command will rename the ungrouped
object.
See also: group, parent, instance, duplicate
None
absolute, parent, relative, world
Long name (short name) |
Argument types |
Properties |
|
-absolute(-a)
|
|
|
|
preserve existing world object transformations
(overall object transformation is preserved
by modifying the objects local transformation)
[default]
|
|
-parent(-p)
|
string
|
|
|
put the ungrouped objects under the given parent
|
|
-relative(-r)
|
|
|
|
preserve existing local object transformations
(don't modify local transformation)
|
|
-world(-w)
|
|
|
|
put the ungrouped objects under the world
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can be used more than once in a command.
|
// Create a simple hierarchy
sphere -n sphere1; move 2 0 0;
sphere -n sphere2; move -2 0 0;
group -n group1 sphere1 sphere2; move 0 2 0;
sphere -n sphere3; move 0 0 2;
group -n group2 group1 sphere3;
group -em -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.
//
ungroup group1;
// Try the same ungroup with the -relative flag.
// Now sphere1 and sphere2 will move down 2 units in Y.
//
undo;
ungroup -relative group1;
// Now try the same ungroup operation with the -parent flag.
// This will move the children of group1 under group3.
undo;
ungroup -parent group3 group1;