pymel.core.general.objectCenter

objectCenter(*args, **kwargs)

This command returns the coordinates of the center of the bounding box of the specified object. If one coordinate only is specified, it will be returned as a float. If no coordinates are specified, an array of floats is returned, containing x, y, and z. If you specify multiple coordinates, only one will be returned.

Flags:
  • gl : gl (bool) [create]

    Return positional values in global coordinates (default). Flag can have multiple arguments, passed either as a tuple or a list.

  • local : l (bool) [create]

    Return positional values in local coordinates.

  • x : x (bool) [create]

    Return X value only

  • y : y (bool) [create]

    Return Y value only

  • z : z (bool) [create]

    Return Z value only

Derived from mel command maya.cmds.objectCenter

Previous topic

pymel.core.general.objExists

Next topic

pymel.core.general.objectType

Core

Core Modules

Other Modules

This Page