Go to: Synopsis. Return value. Flags. Python examples.


inheritTransform( [objects...] , [preserve=boolean], [toggle=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

inheritTransform is undoable, queryable, and NOT editable.

This command toggles the inherit state of an object. If this flag is off the object will not inherit transformations from its parent. In other words transformations applied to the parent node will not affect the object and it will act as though it is under the world.

If the -p flag is specified then the object's transformation will be modified to compensate when changing the inherit flag so the object will not change its world-space location.

Return value


In query mode, return type is based on queried flag.


preserve, toggle
Long name (short name) Argument types Properties
toggle(tgl) boolean createquery
toggle the inherit state for the given object(s) (default if no flags are given) -on turn on inherit state for the given object(s) -off turn off inherit state for the given object(s)
preserve(p) boolean createquery
preserve the objects world-space position by modifying the object(s) transformation matrix.

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 have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# create an circle, move it off center, group it
# and move the group so that the circle is back in center
cmds.circle( nr=(0, 1, 0), n='circle1' )
cmds.move( 2, 0, 0 )
cmds.move( -2, 0, 0 )

# turn off inherits transform flag of circle1.
# The circle will now appear at (2, 0, 0)
cmds.inheritTransform( 'circle1', off=True )

# turn off inherits transform flag of circle1 but preserve the
# position of the circle. The circle will stay centered at (0, 0, 0)
cmds.inheritTransform( 'circle1', on=True )
cmds.inheritTransform( 'circle1', off=True, preserve=True )

# query state of inherits transform flag
cmds.inheritTransform( 'circle1', q=True )