この参照ページは、次の概要トピックと関連付けられています。#include <MPxRepresentation.h>
Abstract base class for user defined representations.
MPxRepresentation is an abstract base class that can be used to provide an interface and services for user defined representations.
Representations are owned by a scene assembly node (see MPxAssembly). A scene assembly node will activate one of its representations; representations must therefore support activate and inactivate operations.
This class can be used to implement new kinds of representations within Maya that behave in a similar manner to the representations included in the scene assembly reference Maya plugin, which uses MPxRepresentation as a base class for its representations.
Note that use of this class to implement representations is not mandatory: it provides an interface that is convenient for dealing consistently with representations, as well as an inactivate() implementation that is widely useful (clear out the assembly). Also note that MPxRepresentation is not associated with a corresponding Maya DAG or DG node.
For use of scene assembly nodes, see function set MFnAssembly.
Examples: Public Member Functions | |
| virtual | ~MPxRepresentation () |
| Class destructor. | |
| virtual bool | activate ()=0 |
| Activate this representation. More... | |
| virtual bool | inactivate () |
| Inactivate this representation. More... | |
| virtual MString | getType () const =0 |
| Return the representation type string. More... | |
| MString | getName () const |
| Returns the name of the representation. More... | |
| virtual bool | canApplyEdits () const |
| Determines whether this representation can apply tracked edits to its data. More... | |
Protected Member Functions | |
| MPxRepresentation (MPxAssembly *assembly, const MString &name) | |
| Class constructor, to be called by concrete derived classes. More... | |
| MPxAssembly * | getAssembly () const |
| USE _getAssembly() IN SCRIPT. More... | |
|
protected |
Class constructor, to be called by concrete derived classes.
The representation does not own the assembly node given as argument; rather, it is the assembly node that owns the representation (and therefore destroys it).
| [in] | assembly | The assembly node which owns this representation. |
| [in] | name | The name of this representation. |
|
pure virtual |
Activate this representation.
Examples:
|
virtual |
Inactivate this representation.
Implementation in this class is to clear out the assembly. Inactivation will fail and return false if the name of the currently-active representation doesn't match the name of this representation.
|
pure virtual |
Return the representation type string.
Examples: | MString getName | ( | ) | const |
Returns the name of the representation.
|
virtual |
Determines whether this representation can apply tracked edits to its data.
Implementation in this class returns false.
Examples:
|
protected |
USE _getAssembly() IN SCRIPT.
Returns the assembly which owns this representation.
Note: in Python scripts, use MPxRepresentation._getAssembly() instead.