This reference page is linked to from the following overview topics: Extension for Autodesk Maya 2013.
Function set for querying information about file references.
Reference nodes are used to track data about file references. Referenced files may be loaded and unloaded. They also store data about changes made to objects in the referenced file. The class MItReferenceEdits may be used to retrieve information about such changes.
The class MFileIO may be used to perform actual operations on references such as loading, unloading, adding and removing references.
#include <MFnReference.h>

Public Member Functions | |
| virtual MFn::Type | type () const |
| Function set type. | |
| virtual | ~MFnReference () |
| Destructor. | |
| MFnReference () | |
| Default constructor. | |
| MFnReference (MObject &object, MStatus *ReturnStatus=NULL) | |
| Constructor. | |
| MString | fileName (bool resolvedName, bool includePath, bool includeCopyNumber, MStatus *ReturnStatus=NULL) const |
| Returns the name of file associated with this reference. | |
| MString | associatedNamespace (bool shortName, MStatus *ReturnStatus=NULL) const |
| Returns the namespace associated with this reference. | |
| MString | parentFileName (bool resolvedName, bool includePath, bool includeCopyNumber, MStatus *ReturnStatus=NULL) const |
| Returns the name of parent file associated with this reference. | |
| MObject | parentReference (MStatus *ReturnStatus=NULL) const |
| Returns the reference node associated with the parent reference. | |
| MObject | parentAssembly (MStatus *ReturnStatus=NULL) const |
| Returns the parent assembly node that contains this reference. | |
| bool | containsNode (const MObject &node, MStatus *ReturnStatus=NULL) const |
| Returns true if the specified node is from this reference or one of its child references. | |
| bool | containsNodeExactly (const MObject &node, MStatus *ReturnStatus=NULL) const |
| Returns true if the specified node is from this reference. | |
| void | nodes (MObjectArray &nodes, MStatus *ReturnStatus=NULL) const |
| Returns an array of the nodes associated with this reference. | |
| bool | isLoaded (MStatus *ReturnStatus=NULL) const |
| Returns true if the reference is loaded. | |
| bool | isLocked (MStatus *ReturnStatus=NULL) const |
| Returns true if the reference is locked or if the referenced file was saved as locked. | |
| bool | isExportEditsFile (MStatus *ReturnStatus=NULL) const |
| Returns true if the reference is an export edits file. | |
| MFnReference (const MObject &object, MStatus *ReturnStatus=NULL) | |
| Constructor. | |
Protected Member Functions | |
| virtual const char * | className () const |
| Class name. | |
| MFnReference | ( | MObject & | object, |
| MStatus * | ReturnStatus = NULL |
||
| ) |
Constructor.
Class constructor that initializes the function set to the given MObject.
| [in] | object | The MObject to attach the function set to |
| [out] | ReturnStatus | the return status |
| MFnReference | ( | const MObject & | object, |
| MStatus * | ReturnStatus = NULL |
||
| ) |
Constructor.
Class constructor that initializes the function set to the given MObject.
| [in] | object | The MObject to attach the function set to |
| [out] | ReturnStatus | the return status |
| MFn::Type type | ( | ) | const [virtual] |
| MString fileName | ( | bool | resolvedName, |
| bool | includePath, | ||
| bool | includeCopyNumber, | ||
| MStatus * | ReturnStatus = NULL |
||
| ) | const |
Returns the name of file associated with this reference.
| [in] | resolvedName | If true, return the resolved name rather than the original file name. The unresolved name is the string originally specified when the file was loaded into Maya; this may contain environment variables, may be a relative path, and may otherwise not precisely indicate where the file can be located on disk. The resolved name is the actual path name that Maya is using to locate the file after relative paths and environment variables have been expanded, and any other necessary steps have been used to resolve its physical location. |
| [in] | includePath | If true, include the file path in the return string. |
| [in] | includeCopyNumber | If true, include the copy number (if there is one) in the return string. |
| [out] | ReturnStatus | return status |
Returns the namespace associated with this reference.
| [in] | baseName | If true, return the base name of the reference |
| [out] | ReturnStatus | return status |
| MString parentFileName | ( | bool | resolveName, |
| bool | includePath, | ||
| bool | includeCopyNumber, | ||
| MStatus * | ReturnStatus = NULL |
||
| ) | const |
Returns the name of parent file associated with this reference.
| [in] | resolveName | If true, return the resolved name rather than the original file name. The unresolved name is the string originally specified when the file was loaded into Maya; this may contain environment variables, may be a relative path, and may otherwise not precisely indicate where the file can be located on disk. The resolved name is the actual path name that Maya is using to locate the file after relative paths and environment variables have been expanded, and any other necessary steps have been used to resolve its physical location. |
| [in] | includePath | If true, include the file path in the return string. |
| [in] | includeCopyNumber | If true, include the copy number (if there is one) in the return string. |
| [out] | ReturnStatus | return status |
Returns the reference node associated with the parent reference.
| [out] | ReturnStatus | return status |
Returns the parent assembly node that contains this reference.
See MFnAssembly documentation for more details.
| [out] | ReturnStatus | return status |
Returns true if the specified node is from this reference or one of its child references.
The containsNodeExactly method can be used to test membership without including the child references.
| [in] | node | The node to be checked |
| [out] | ReturnStatus | return status |
Returns true if the specified node is from this reference.
Membership in child references is not checked. The containsNode method may be used to test membership in a reference and its child references.
| [in] | node | The node to be checked |
| [out] | ReturnStatus | return status |
| void nodes | ( | MObjectArray & | nodeList, |
| MStatus * | ReturnStatus = NULL |
||
| ) | const |
Returns an array of the nodes associated with this reference.
| [out] | nodeList | the nodes from this reference |
| [out] | ReturnStatus | return status |
| bool isLoaded | ( | MStatus * | ReturnStatus = NULL | ) | const |
Returns true if the reference is loaded.
| [out] | ReturnStatus | return status |
| bool isLocked | ( | MStatus * | ReturnStatus = NULL | ) | const |
Returns true if the reference is locked or if the referenced file was saved as locked.
| [out] | ReturnStatus | return status |
Reimplemented from MFnDependencyNode.
| bool isExportEditsFile | ( | MStatus * | ReturnStatus = NULL | ) | const |
Returns true if the reference is an export edits file.
An export edits file is a file of type ".editMA" or ".editMB" which was created using Maya's offline file functionality.
| [out] | ReturnStatus | return status |