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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Friends

# MExternalContentInfoTable Class Reference
OpenMaya - API module for common classes

This reference page is linked to from the following overview topics: Autodesk Maya 2014.

Search for all occurrences

## Detailed Description

This is a table of all the external content for a given MPxNode.

External content is defined as any data that is not stored with the node and that is needed by the node to perform its work. It can be texture files, other scenes, audio files, etc.

Each node that references external content should report it through MPxNode::getExternalContent so that a complete list of external content can be saved with the scene in a way that makes it easy to inspect and edit offline.

`#include <MExternalContentInfoTable.h>`

List of all members.

## Public Member Functions
| MExternalContentInfoTable ()
| Class constructor.
| ~MExternalContentInfoTable ()
| Class destructor.
MStatus | addResolvedEntry (const MString &key, const MString &unresolvedLocation, const MString &resolvedLocation, const MStringArray &roles)
| Add an entry in the table.
MStatus | addUnresolvedEntry (const MString &key, const MString &unresolvedLocation, const MStringArray &roles=MStringArray())
| Add an entry in the table.
MStatus | getInfo (const MString &key, MString &unresolvedLocation, MString &resolvedLocation, MStringArray &roles) const
| NO SCRIPT SUPPORT.
MStatus | getEntry (unsigned int index, MString &key, MString &unresolvedLocation, MString &resolvedLocation, MStringArray &roles) const
| NO SCRIPT SUPPORT.
unsigned int | length () const
| Retrieves the number of entries in the table.
## Friends
class | MPxNode Search for all occurrences
class | MFnDependencyNode Search for all occurrences

## Member Function Documentation

MStatus addResolvedEntry | ( | const MString & | key,
|  | const MString & | unresolvedLocation,
|  | const MString & | resolvedLocation,
|  | const MStringArray & | roles
| ) |  |

Search for all occurrences

Add an entry in the table.

Parameters:

  [in] | key | An arbitrary string defined by the caller. This will typically be an attribute name for situations where the content location is stored verbatim in a plug's value.
  [in] | unresolvedLocation | Path as stored in the node (i.e. without any token replacement performed).
  [in] | resolvedLocation | Full path to the content if it exists at the time of creation of this object.
  [in] | roles | An enumeration of all roles this content plays in the context of the node. The actual strings are not rigidly defined as of this writing. This is mostly for offline browsing of the content info: to assist in sorting content by role. A better content type system may be introduced later on to formalize this.

Returns:
  Return status.

Status Codes:
  - MS::kSuccess The method successfully added the entry.
  - MS::kFailure The method failed to add the entry.

MStatus addUnresolvedEntry | ( | const MString & | key,
|  | const MString & | unresolvedLocation,
|  | const MStringArray & | roles = `MStringArray()`
| ) |  |

Search for all occurrences

Add an entry in the table.

The resolved location will be inferred from the application's built-in file resolving for the specified file type. This will automatically add entries into the roles vector that correspond to the search rules for this file type.

Parameters:

  [in] | key | See documentation for MExternalContentInfoTable::addResolvedEntry.
  [in] | unresolvedLocation | See documentation for MExternalContentInfoTable::addResolvedEntry.
  [in] | roles | See documentation for MExternalContentInfoTable::addResolvedEntry.

Returns:
  Return status.

Status Codes:
  - MS::kSuccess The method successfully added the entry.
  - MS::kFailure The method failed to add the entry.

MStatus getInfo | ( | const MString & | key,
|  | MString & | unresolvedLocation,
|  | MString & | resolvedLocation,
|  | MStringArray & | roles
| ) |  | const

Search for all occurrences

NO SCRIPT SUPPORT.

Retrieves external content information based on its key.

Parameters:

  [in] | key | See documentation for MExternalContentInfoTable::addResolvedEntry.
  [out] | unresolvedLocation | See documentation for MExternalContentInfoTable::addResolvedEntry.
  [out] | resolvedLocation | See documentation for MExternalContentInfoTable::addResolvedEntry.
  [out] | roles | See documentation for MExternalContentInfoTable::addResolvedEntry.

Note: In Python, this method has a different signature:

      def getInfoByKey(
        key,   # input string
        paths, # output array filled with [ unresolvedLocation, resolvedLocation ]
        roles, # output array filled with [ role1, role2, ..., roleN ]
      )

The function returns a string, the key.

Returns:
  Return status.

Status Codes:
  - MS::kSuccess The method successfully retrieved the entry.
  - MS::kFailure The method failed to retrieve the entry.

MStatus getEntry | ( | unsigned int | index,
|  | MString & | key,
|  | MString & | unresolvedLocation,
|  | MString & | resolvedLocation,
|  | MStringArray & | roles
| ) |  | const

Search for all occurrences

NO SCRIPT SUPPORT.

Retrieves external content entry based on its position in the table.

Parameters:

  [in] | index | Position of the entry to retrieve information from.
  [out] | key | See documentation for MExternalContentInfoTable::addResolvedEntry.
  [out] | unresolvedLocation | See documentation for MExternalContentInfoTable::addResolvedEntry.
  [out] | resolvedLocation | See documentation for MExternalContentInfoTable::addResolvedEntry.
  [out] | roles | See documentation for MExternalContentInfoTable::addResolvedEntry.

Note: In Python, this method has a different signature:

      def getEntryByIndex(
        index, # input integer
        paths, # output array filled with [ unresolvedLocation, resolvedLocation ]
        roles, # output array filled with [ role1, role2, ..., roleN ]
      )

The function returns a string, the key.

Returns:
  Return status.

Status Codes:
  - MS::kSuccess The method successfully retrieved the entry.
  - MS::kFailure The method failed to retrieve the entry.

unsigned int length | ( |  | ) | const

Search for all occurrences

Retrieves the number of entries in the table.

Returns:
  Number of entries.

MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable
MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable MExternalContentInfoTable