Go to: Synopsis. Return value. Keywords. Related. Flags. MEL examples.

Synopsis

instanceable [-allow boolean] [-recursive] [-shape]

instanceable is undoable, queryable, and NOT editable.

Flags one or more DAG nodes so that they can (or cannot) be instanced. This command sets an internal state on the specified DAG nodes which is checked whenever Maya attempts an instancing operation. If no node names are provided on the command line then the current selection list is used.

Sets are automatically expanded to their constituent objects. Nodes which are already instanced (or have children which are already instanced) cannot be marked as non-instancable.

Return value

boolean[]For query execution.

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

Keywords

node, dependency, graph, instancing

Related

duplicate, group, instance, parent, rename, setAttr

Flags

allow, recursive, shape
Long name (short name) Argument types Properties
-allow(-a) boolean createquery
Specifies the new instanceable state for the node. Specify true to allow the node to be instanceable, and false to prevent it from being instanced. The default is true (i.e. nodes can be instanced by default).
-recursive(-r) create
Can be specified with the -allow flag in create or edit mode to recursively apply the -allow setting to all non-shape children of the selected node(s). To also affect shapes, also specify the -shape flag along with -recursive.
-shape(-s) create
Can be specified with the -allow flag in create or edit mode to apply the -allow setting to all shape children of the selected node(s). This flag can be specified in conjunction with the -recursive flag.

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.

MEL examples

// create a sphere.
// flag the transform and its shape as non-instanceable, then try to instance the sphere.
// you get an error because the shape is non-instanceable.
sphere;
instanceable -allow 0 -shape;
instance;
// Error: '|nurbsSphere1' has non-instanceable children thus it cannot be instanced.
// Flag the sphere and its shape as instanceable. Then it can be instanced.
instanceable -allow 1 -shape;
instance;
// Result: nurbsSphere2 //