pymel.core.general.group

group(*args, **kwargs)

This command groups the specified objects under a new group and returns the name of the new group. If the -em flag is specified, then an empty group (with no objects) is created. If the -w flag is specified then the new group is placed under the world, otherwise if -p is specified it is placed under the specified node. If neither -w or -p is specified the new group is placed under the lowest common group they have in common. (or the world if no such group exists) If an object is grouped with another object that has the same name then one of the objects will be renamed by this command.

Modifications
  • if no objects are passed or selected, the empty flag is automatically set
Maya Bug Fix:
  • corrected to return a unique name
Flags:
  • absolute : a (bool) [create]

    preserve existing world object transformations (overall object transformation is preserved by modifying the objects local transformation) [default]

  • empty : em (bool) [create]

    create an empty group (with no objects in it)

  • name : n (unicode) [create]

    Assign given name to new group node.

  • parent : p (unicode) [create]

    put the new group under the given parent

  • relative : r (bool) [create]

    preserve existing local object transformations (relative to the new group node)

  • useAsGroup : uag (unicode) [create]

    Use the specified node as the group node. The specified node must be derived from the transform node and must not have any existing parents or children. Flag can have multiple arguments, passed either as a tuple or a list.

  • world : w (bool) [create]

    put the new group under the world

Derived from mel command maya.cmds.group

Previous topic

pymel.core.general.getClassification

Next topic

pymel.core.general.hasAttr

Core

Core Modules

Other Modules

This Page