pymel.core.general.instance

instance(*args, **kwargs)

Instancing is a way of making the same object appear twice in the scene. This is accomplished by creation of a new transform node that points to an exisiting object. Changes to the transform are independent but changes to the instancedobject affect all instances since the node is shared. If no objects are given, then the selected list is instanced. When an object is instanced a new transform node is created that points to the selected object. The smart transform feature allows instance to transform newly instanced objects based on previous transformations between instances. Example: Instance an object and move it to a new location. Instance it again with the smart transform flag. It should have moved once again the distance you had previously moved it. Note: changing the selected list between smart instances will cause the transform information to be deleted. It returns a list of the new objects created by the instance operation. See also:duplicate

Modifications:
  • returns a list of PyNode objects
Flags:
  • leaf : lf (bool) [create]

    Instances leaf-level objects. Acts like duplicate except leaf-level objects are instanced.

  • name : n (unicode) [create]

    Name to give new instance Flag can have multiple arguments, passed either as a tuple or a list.

  • smartTransform : st (bool) [create]

    Transforms instances item based on movements between transforms

Derived from mel command maya.cmds.instance

Previous topic

pymel.core.general.inheritTransform

Next topic

pymel.core.general.instanceable

Core

Core Modules

Other Modules

This Page