- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions

# MFnAssembly Class Reference
OpenMaya - API module for common classes | FunctionSet classes

This reference page is linked to from the following overview topics: Extension for Autodesk Maya 2013.

Search for all occurrences

## Detailed Description

Function set for scene assembly.

An assembly is a node that is used to maintain a list of representations, and to keep one as the active representation. Correspondingly, representations can be activated and inactivated. In general, a representation can be a full hierarchy of animated geometry, but can also be as simple as a locator or a bounding box. The assembly can be used to activate the representation that best corresponds to a given task: a simple, fast-loading, fast-drawing representation for overall planning, or a more detailed representations for fine tuning.

The assembly API does not specify the implementation of representations. For example, representations can be actual DAG nodes, or data structures internal to the assembly that can be used to generate DAG nodes in the Maya scene graph on representation activation. In this function set as well as in MPxAssembly, representations are identified only by a string identifier. Representations in a single MPxAssembly must have unique string names. Representation name strings must not contain spaces and quotes, as these characters would cause argument parsing to fail when names are used in commands.

Representations are created from a set of representation types, which each assembly type must define. A representation of a given type will share properties (such as viewport appearance, or memory size) with other representations of the same type. Examples could include a "BoundingBox" representation type, or a "BakedGeometry" representation type. As with representation names, representation type name strings must not contain spaces and quotes. Representation type names are not used in the UI, and are not localized. Rather, each representation type has a corresponding type label that is used for this purpose. The representation type label can contain spaces and quotes, and should be localized.

An assembly object is also a DAG container. As such, operations on containers can be done on assemblies. For use of container functionality on assemblies, see function set MFnContainerNode.

`#include <MFnAssembly.h>`

Inheritance diagram for MFnAssembly:
[legend]

List of all members.

## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnAssembly ()
| Destructor.
| MFnAssembly ()
| Default constructor.
| MFnAssembly (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
MString | createRepresentation (const MString &input, const MString &type, MDagModifier *undoRedo=NULL, MStatus *status=NULL)
| Create a representation and add it to the list of those managed by this node.
MString | createRepresentation (const MString &input, const MString &type, const MString &representation, MDagModifier *undoRedo=NULL, MStatus *status=NULL)
| Create a representation and add it to the list of those managed by this node.
MStatus | postLoad ()
| Method to initialize assemblies after their creation.
MStatus | activate (const MString &representation)
| Activate a representation.
MString | getActive (MStatus *status=NULL) const
| Get the active representation in the list of representations.
MStatus | activateNonRecursive (const MString &representation)
| Activate a representation, but prevent any nested assemblies created and initialized during this activation from activating any of their representations.
bool | canActivate (MStatus *status=NULL) const
| Determines whether this assembly can activate a representation, for the node attached to this function set.
bool | isActive (const MString &representation, MStatus *status=NULL) const
| Determines whether the given representation is the active representation for the node attached to this function set.
MString | getInitialRep (MStatus *status=NULL) const
MString | getInitialRep (bool &hasInitialRep, MStatus *status=NULL) const
| Get the initial representation to use when the assembly is first loaded.
MStringArray | getRepresentations (MStatus *status=NULL) const
| Returns an array of the representations managed by the node attached to this function set.
MString | getRepType (const MString &representation, MStatus *status=NULL) const
| Get the type of the specified representation.
MString | getRepLabel (const MString &representation, MStatus *status=NULL) const
| Get the label of the specified representation.
MStringArray | repTypes (MStatus *status=NULL) const
| Return the list of representation types that can be created for this assembly node.
MStatus | deleteRepresentation (const MString &representation)
| Delete a representation managed by the node attached to this function set.
MStatus | deleteAllRepresentations ()
| Delete all representations managed by the node attached to this function set.
MString | getRepNamespace (MStatus *status=NULL) const
| Get the representations namespace of this assembly node.
MString | setRepName (const MString &representation, const MString &newName, MStatus *status=NULL)
| Rename a representation.
MStatus | setRepLabel (const MString &representation, const MString &label)
| Change the representation label.
MStatus | importFile (const MString &fileName, const char *type=NULL, bool preserveReferences=false, const char *nameSpace=NULL, bool ignoreVersion=false)
| Import the scene elements from the given file into this assembly.
MString | getAbsoluteRepNamespace (MStatus *status=NULL) const
| Get the fully-qualified (absolute) namespace for representations of this assembly node.
bool | isTopLevel (MStatus *status=NULL) const
| Returns whether this assembly node is a top-level assembly.
bool | supportsEdits (MStatus *status=NULL) const
| Does this assembly support edit tracking?
bool | supportsMemberChanges (MStatus *status=NULL) const
| Can members of the assembly be changed?
bool | canRepApplyEdits (const MString &representation, MStatus *status=NULL) const
| Determines whether the given representation can apply edits to its data, for the node attached to this function set.
bool | handlesApplyEdits (MStatus *status=NULL) const
| Determines whether the assembly handles the application of edits to its data, for the node attached to this function set.
bool | handlesAddEdits (MStatus *status=NULL) const
| Determines whether the assembly supplies edits to its data, for the node attached to this function set.
MObject | getParentAssembly (MStatus *status=NULL) const
| Return the immediate parent assembly of this assembly if there is one, otherwise return a null object.
MObjectArray | getSubAssemblies (MStatus *status=NULL) const
| Returns a list containing direct children of this assembly that are themselves assemblies, for the currently active representation.
| MFnAssembly (const MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
## Static Public Member Functions
static MObjectArray | getTopLevelAssemblies ()
| Returns a list containing top-level assemblies.
## Protected Member Functions
virtual const char * | className () const
| Class name.

## Constructor & Destructor Documentation

MFnAssembly | ( | MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnAssembly | ( | const MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

## Member Function Documentation

MFn::Type type | ( |  | ) | const`[virtual]`

Search for all occurrences

Function set type.

Return the class type : MFn::kAssembly.

Reimplemented from MFnDagNode.

const char * className | ( |  | ) | const`[protected, virtual]`

Search for all occurrences

Class name.

Return the class name : "MFnAssembly".

Reimplemented from MFnDagNode.

MObjectArray getTopLevelAssemblies | ( |  | ) | `[static]`

Search for all occurrences

Returns a list containing top-level assemblies.

These are assemblies that are not nested inside another assembly.

The runtime complexity of this method is linear in the number of top-level assemblies and top-level file references.

Returns:
  Array of top-level assemblies.

MString createRepresentation | ( | const MString & | input,
|  | const MString & | type,
|  | MDagModifier * | undoRedo = `NULL`,
|  | MStatus * | status = `NULL`
| ) |  |

Search for all occurrences

Create a representation and add it to the list of those managed by this node.

The input argument string is used as input data to the representation creation process. The semantics of this input are defined by the assembly derived class. The representation return value string is the representation name, after it has been added. The type of the representation is a property of the representation that expresses its commonality with other representations of this assembly type, for example a "Bounding Box" representation type. See the getRepType() method.

Parameters:

  [in] | input | Input data for representation creation.
  [in] | type | Type of representation to create.
  [out] | undoRedo | Pointer to MDagModifier object, for undo / redo purposes.
  [out] | status | Return status.

Returns:
  Added representation name.

Status Codes:
  - MS::kSuccess Representation creation succeeded.
  - MS::kFailure No valid node attached to function set, or representation creation failed.

MString createRepresentation | ( | const MString & | input,
|  | const MString & | type,
|  | const MString & | representation,
|  | MDagModifier * | undoRedo = `NULL`,
|  | MStatus * | status = `NULL`
| ) |  |

Search for all occurrences

Create a representation and add it to the list of those managed by this node.

See alternate createRepresentation() overload for documentation. This overload version of createRepresentation() allows passing in a representation name. If passed in non-empty, the representation argument is used as a starting point for the representation name. This string value can be modified by the derived implementation to meet representation name uniqueness, or other constraints. If empty, the implementation is responsible for creating the representation name. The final representation name is returned by this method, after it has been added to the assembly.

Parameters:

  [in] | input | Input data for representation creation.
  [in] | type | Type of representation to create.
  [in] | representation | Representation name starting point.
  [out] | undoRedo | Pointer to MDagModifier object, for undo / redo purposes.
  [out] | status | Return status.

Returns:
  Added representation name.

Status Codes:
  - MS::kSuccess Representation creation succeeded.
  - MS::kFailure No valid node attached to function set, or representation creation failed.

MStatus postLoad | ( |  | ) |

Search for all occurrences

Method to initialize assemblies after their creation.

In general, postLoad() does not need to be called explicity by a plugin. Maya will call it automatically on any assembly node created by representation activation, to initialize the assembly node. See MPxAssembly::postLoad() for more details.

However, if an existing assembly needs to be re-initialized, because of a parameter change for example, the representation activation code path is obviously not involved. In such a case, the postLoad() re-initialization can be done by calling this method explicitly, so that Maya is made aware that the node is being re-initialized, and that for example, no edits should be recorded during this re-initialization.

Returns:
  Return status

Status Codes:
  - MS::kSuccess The assembly was successfully initialized after creation
  - MS::kFailure No valid node attached to function set

MStatus activate | ( | const MString & | representation | ) |

Search for all occurrences

Activate a representation.

The representation to activate is specified as a string name. Passing in an empty string argument means inactivate the previously-active representation (if any), and activate no representation.

If canActivate() is false, activate() will return failure.

Parameters:

  [in] | representation | Representation to activate.

Returns:
  Return status.

Status Codes:
  - MS::kSuccess The representation was successfuly activated.
  - MS::kFailure No valid node attached to function set, or activation of the representation failed.

MString getActive | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Get the active representation in the list of representations.

If the list of representations is empty, the status code will be kSuccess, and the return string will be empty.

Parameters:

  [out] | status | Return status.

Returns:
  The active representation.

Status Codes:
  - MS::kSuccess The method succeeded.
  - MS::kFailure No valid node attached to function set.

MStatus activateNonRecursive | ( | const MString & | representation | ) |

Search for all occurrences

Activate a representation, but prevent any nested assemblies created and initialized during this activation from activating any of their representations.

Normal activation of a representation can create nested assemblies in the representation. Maya will call MPxAssembly::postLoad() automatically on these nested assemblies to initialize them. This initialization of nested assemblies can, in turn, call activate on a representation. activateNonRecursive() causes canActivate() to return false on these nested assemblies. An implementation of MPxAssembly::postLoad() should check canActivate() to determine whether it can activate a representation. Stopping the activation at the current assembly prunes recursive activation of representations.

If canActivate() is false, activateNonRecursive() will return failure.

The representation is specified as a string identifier. Passing in an empty string argument means inactivate the previously-active representation (if any), and activate no representation.

Parameters:

  [in] | representation | Representation to activate.

Returns:
  Return status.

Status Codes:
  - MS::kSuccess The representation was successfuly activated.
  - MS::kFailure No valid node attached to function set, or activation of the representation failed.

bool canActivate | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Determines whether this assembly can activate a representation, for the node attached to this function set.

For example, this method will return false for a nested assembly, during a call to activateNonRecursive() on the parent assembly.

If canActivate() is false, activate() and activateNonRecursive() will return failure.

Parameters:

  [out] | status | Return status.

Returns:
  true if activation is allowed, false otherwise.

Status Codes:
  - MS::kSuccess The method succeeded.
  - MS::kFailure No valid node attached to function set.

bool isActive | ( | const MString & | representation,
|  | MStatus * | status = `NULL`
| ) |  | const

Search for all occurrences

Determines whether the given representation is the active representation for the node attached to this function set.

Parameters:

  [in] | representation | Representation to query.
  [out] | status | Return status.

Returns:
  true if the representation is active, false otherwise.

Status Codes:
  - MS::kSuccess The method succeeded.
  - MS::kInvalidParameter The argument is not a representation.
  - MS::kFailure No valid node attached to function set.

MString getInitialRep | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Deprecated:
  Use the method MFnAssembly::getInitialRep(bool&, MStatus*) instead

Get the initial representation to use when the assembly is first loaded.

This method is to be called by the assembly to determine which representation should be activated when the assembly is first initialized. An empty string will be returned if no initial representation is specified.

Plug-in writers can customize the manner in which the initial representation is determined. Refer to MPxAssembly::getInitialRep().

Parameters:

  [out] | status | Return status

Returns:
  The initial representation to use, if any, else an empty string.

Status Codes:
  - MS::kSuccess The method successfully completed
  - MS::kFailure The method encountered a failure condition

MString getInitialRep | ( | bool & | hasInitialRep,
|  | MStatus * | status = `NULL`
| ) |  | const

Search for all occurrences

Get the initial representation to use when the assembly is first loaded.

This method returns the representation which should be activated when the assembly is first initialized. The hasInitialRep parameter will be set to true if the assembly has an initial representation or false if no initial representation has been set. If the returned representation is the empty string and hasInitialRep is true it means that assembly has been explicitly set to have no initial representation

Plug-in writers can customize the manner in which the initial representation is determined. Refer to MPxAssembly::getInitialRep().

Parameters:

  [out] | hasInitialRep | Return whether or not we have an initial representation
  [out] | status | Return status

Returns:
  The initial representation to use, if any, else an empty string.

Status Codes:
  - MS::kSuccess The method successfully completed
  - MS::kFailure The method encountered a failure condition

MStringArray getRepresentations | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Returns an array of the representations managed by the node attached to this function set.

Parameters:

  [out] | status | Return status.

Returns:
  Return representations array.

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure No valid node attached to function set, or the array of representations could not be obtained.

MString getRepType | ( | const MString & | representation,
|  | MStatus * | status = `NULL`
| ) |  | const

Search for all occurrences

Get the type of the specified representation.

The type string does not have to be user-readable, and does not have to be localized; the type label should be used for UI purposes. If the specified representation is not found in this assembly, an empty string is returned.

Parameters:

  [in] | representation | Representation whose type must be returned.
  [out] | status | Return status.

Returns:
  The representation type.

Status Codes:
  - MS::kSuccess The method succeeded.
  - MS::kFailure No valid node attached to function set.

MString getRepLabel | ( | const MString & | representation,
|  | MStatus * | status = `NULL`
| ) |  | const

Search for all occurrences

Get the label of the specified representation.

The label of a representation is a string that is meant to be shown in the UI and identify the representation meaningfully to a user. The representation label should support localization requirements. If the specified representation is not found in this assembly, an empty string is returned.

Parameters:

  [in] | representation | Representation whose label must be returned.
  [out] | status | Return status.

Returns:
  The representation label.

Status Codes:
  - MS::kSuccess The method succeeded.
  - MS::kFailure No valid node attached to function set.

MStringArray repTypes | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Return the list of representation types that can be created for this assembly node.

Parameters:

  [out] | status | Return status.

Returns:
  Array of representation types.

MStatus deleteRepresentation | ( | const MString & | representation | ) |

Search for all occurrences

Delete a representation managed by the node attached to this function set.

Parameters:

  [in] | representation | Representation to delete.

Returns:
  Return status.

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure No valid node attached to function set, or the representation delete failed.
  - MS::kInvalidParameter Invalid representation name.

MStatus deleteAllRepresentations | ( |  | ) |

Search for all occurrences

Delete all representations managed by the node attached to this function set.

Returns:
  Return status.

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure No valid node attached to function set, or the delete of all representations failed.

MString getRepNamespace | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Get the representations namespace of this assembly node.

This is the namespace where nodes created by the activation of a representation will be added. This namespace is shared by all representations. The name can be updated by Maya if a name clash occurs when the namespace is added to its parent namespace (see MPxAssembly::updateRepNamespace() for details).

Parameters:

  [out] | status | Return status.

Returns:
  Namespace for representations.

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure No valid node attached to function set.

MString setRepName | ( | const MString & | representation,
|  | const MString & | newName,
|  | MStatus * | status = `NULL`
| ) |  |

Search for all occurrences

Rename a representation.

The newName argument is used as a starting point for the new representation name. This string value can be modified by the derived implementation to meet representation name uniqueness, or other constraints. This method returns the final representation name.

Parameters:

  [in] | representation | Current representation name.
  [in] | newName | New representation name starting point.
  [out] | status | Return status.

Returns:
  New representation name.

Status Codes:
  - MS::kSuccess Representation successfully renamed.
  - MS::kFailure No valid node attached to function set, or renaming the representation failed.

MStatus setRepLabel | ( | const MString & | representation,
|  | const MString & | label
| ) |  |

Search for all occurrences

Change the representation label.

Parameters:

  [in] | representation | Representation name.
  [in] | label | New representation label.

Returns:
  Return status.

Status Codes:
  - MS::kSuccess Representation label successfully set.
  - MS::kFailure No valid node attached to function set, or changing the label failed.

MStatus importFile | ( | const MString & | fileName,
|  | const char * | type = `NULL`,
|  | bool | preserveReferences = `false`,
|  | const char * | nameSpace = `NULL`,
|  | bool | ignoreVersion = `false`
| ) |  |

Search for all occurrences

Import the scene elements from the given file into this assembly.

See MFileIO::importFile() for more information. All elements imported from the file become members of the assembly. DAG nodes in the imported file that are parented to world are parented to the assembly. DAG nodes in the imported file whose parent is not world keep their existing parenting relationship.

Parameters:

  [in] | fileName | name of the file from which to import objects
  [in] | type | if NULL, Maya will try to deduce the type of the file. If not NULL, it must contain a file type to use when importing the file.
  [in] | preserveReferences | Boolean to indicate whether the references need to be preserved.
  [in] | nameSpace | optional name of the namespace to use when importing objects. Use NULL for default of no namespace.
  [in] | ignoreVersion | Boolean to control whether to ignore version when importing a file.

Returns:
  - MS::kSuccess Import succeeded.
  - MS::kFailure No valid node attached to function set, or import failed.

MString getAbsoluteRepNamespace | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Get the fully-qualified (absolute) namespace for representations of this assembly node.

This is the namespace where nodes created by the activation of a representation will be added. This namespace is shared by all representations.

This namespace starts at the root namespace, contains the namespace of the assembly node, and ends (inclusively) with the representation namespace.

Two namespaces are optionally involved when dealing with an assembly node: the namespace of the assembly node itself, and the namespace of its representations. The representation namespace is a child of its assembly node's namespace. The assembly node's namespace is set by its containing assembly, if it is nested, or by the top-level file. Either the assembly node's namespace, or the representation namespace, or both, can be the empty string.

It should be noted that if the assembly node is nested, the assembly node's namespace will be (by virtue of its nesting) the representation namespace of its containing assembly.

Parameters:

  [out] | status | Return status.

Returns:
  The fully-qualified (absolute) namespace for representations of this assembly node. The name can be empty if the namespace has not been created yet.

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure Namespace has not been created yet or no valid node attached to function set.

bool isTopLevel | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Returns whether this assembly node is a top-level assembly.

An assembly node is a top-level assembly if no container in its (possibly empty) chain of nesting parent containers is an assembly. Of course, this includes the trivial case of its immediate parent container being null.

Parameters:

  [out] | status | Return status.

Returns:
  Whether the assembly node is a top-level assembly.

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure No valid node attached to function set.

bool supportsEdits | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Does this assembly support edit tracking?

Parameters:

  [out] | status | Return status

Returns:
  Whether the assembly supports tracking of edits on its nodes

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure No valid node attached to function set.

bool supportsMemberChanges | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Can members of the assembly be changed?

If the assembly does not use Maya's edit tracking system (see supportsEdits()), does it support changes to its member nodes, outside of activation? If so, this means that any mutating operation on Maya nodes (parenting, connecting, disconnecting, renaming, deleting, setting attributes, adding attributes, removing attributes, locking) can be performed on member nodes of the assembly.

This method is only used if supportsEdits() returns false. If supportsEdits() returns true, Maya will track edits to assembly members, and the return value of supportsMemberChanges() will have no meaning.

When this method returns false, any mutating operation to member nodes of the assembly is prevented, and the assembly behaves as a read-only container of nodes. When this method returns true, the assembly supports changes to its member nodes.

This predicate is only used outside of representation activation. During activation, all types of changes to the assembly's members are allowed, including of course deleting the previous representation's nodes, and creating nodes for the new representation.

Parameters:

  [out] | status | Return status

Returns:
  Whether the assembly supports changes to its nodes

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure No valid node attached to function set.

bool canRepApplyEdits | ( | const MString & | representation,
|  | MStatus * | status = `NULL`
| ) |  | const

Search for all occurrences

Determines whether the given representation can apply edits to its data, for the node attached to this function set.

If an empty string is passed in as the representation name, this method will return false, since an invalid (or 'None') representation does not have any data and thus, cannot have edits applied to it. method will return false.

Parameters:

  [in] | representation | Representation to query.
  [out] | status | Return status.

Returns:
  true if the representation can apply edits, false otherwise.

Status Codes:
  - MS::kSuccess The method succeeded.
  - MS::kFailure No valid node attached to function set.

bool handlesApplyEdits | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Determines whether the assembly handles the application of edits to its data, for the node attached to this function set.

If this method returns true, Maya will call MPxAssembly::applyEdits() to apply edits, when a representation for which canRepApplyEdits() returns true is made active. If this method returns false, Maya will apply the edits itself.

Edit application can be handled by the plugin to apply edits for which the underlying node names have changed, for example. It could also be used when creating edits on a representation that is made of Maya nodes, then applying those edits to a representation made of a Maya node that has internal data structures that are only known to the plugin. In such a case, the plugin would be responsible for mapping the Maya node and attribute names of the edits to the internal data structures of the non-Maya representation it controls, during edit application.

Parameters:

  [out] | status | Return status.

Returns:
  true if the assembly will apply edits, false if Maya applies the edits.

Status Codes:
  - MS::kSuccess The method succeeded.
  - MS::kFailure No valid node attached to function set.

bool handlesAddEdits | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Determines whether the assembly supplies edits to its data, for the node attached to this function set.

If this method returns true, Maya will call MPxAssembly::addEdits(). These edits will later be applied, either by Maya, or by the assembly through MPxAssembly::applyEdits(), if MPxAssembly::handlesApplyEdits() returns true.

Adding edits can be done by a plugin that implements its own persistency scheme. When an assembly node is brought into Maya through activation of a representation, this assembly can carry edits and make them known to Maya through the addEdits() method.

Edits can be added for any node in the assembly's representations, which includes edits to any nested assembly of this assembly. In a scene with multiple levels of nested assemblies, if more than one nested assembly has edits to a given lower-level nested assembly, edits are applied by Maya starting at the most nested assembly level, moving up the chain of nesting assemblies. In this way, the most nested assembly's edit are overridden by less nested assembly edits, if they edit the same attribute or connection.

Parameters:

  [out] | status | Return status.

Returns:
  true if the assembly adds edits, false if no edits are added.

Status Codes:
  - MS::kSuccess The method succeeded.
  - MS::kFailure No valid node attached to function set.

MObject getParentAssembly | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Return the immediate parent assembly of this assembly if there is one, otherwise return a null object.

An assembly with no parent is a top level assembly.

Parameters:

  [out] | status | Return status.

Returns:
  Parent assembly, or a null object if this assembly has no parent assembly

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure No valid node attached to function set, or the array of children could not be obtained.

MObjectArray getSubAssemblies | ( | MStatus * | status = `NULL` | ) | const

Search for all occurrences

Returns a list containing direct children of this assembly that are themselves assemblies, for the currently active representation.

The returned list will be empty if there are no assembly children of the currently active representation.

Parameters:

  [out] | status | Return status.

Returns:
  Array of child assemblies.

Status Codes:
  - MS::kSuccess The method was successful.
  - MS::kFailure No valid node attached to function set, or the array of children could not be obtained.

MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly
MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly MFnAssembly