Polygon component id change messages.
This class is used to register callbacks for poly component id modification messages.
There is 1 add callback method which will add callbacks for the following messages:
To remove a callback use MMessage::removeCallback. All callbacks that are registered by a plug-in must be removed by that plug-in when it is unloaded. Failure to do so will result in a fatal error.
#include <MPolyMessage.h>
Public Types |
|
enum | { kVertexIndex = 0, kEdgeIndex = 1, kFaceIndex = 2, kLastErrorIndex = 3 } |
Values passed in addPolyComponentIdChangeCallback's "wantIdModifications" array to indicate which component id changes should trigger the callback. More... |
|
Static Public Member Functions |
|
static MCallbackId | addPolyComponentIdChangedCallback (MObject &node, bool wantIdModifications[], unsigned int count, MMessage::MComponentFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
This method registers a callback that should
be called whenever a poly component id is modified. |
|
static MCallbackId | addPolyTopologyChangedCallback (MObject &node, MMessage::MNodeFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
This method registers a callback that will
be called when a node impacting the topology of a meshShape is
modified. |
|
static unsigned int | deletedId (void) |
This method returns a constant which is to
be used to determine if a component id has been deleted. |
|
static const char * | className () |
Returns the name of this class. |
anonymous enum |
Values passed in addPolyComponentIdChangeCallback's "wantIdModifications" array to indicate which component id changes should trigger the callback.
MCallbackId addPolyComponentIdChangedCallback | ( | MObject & | node, |
bool | wantIdModifications[], | ||
unsigned int | count, | ||
MMessage::MComponentFunction | func, | ||
void * | clientData = NULL , |
||
MStatus * | ReturnStatus =
NULL |
||
) | [static] |
This method registers a callback that should be called whenever a poly component id is modified.
Currently, there are some cases where the component ids for a polygonal mesh can be modified without generating a callback or without generating a correct mapping. These cases are outlined below.
Component id mapping should always work correctly when construction history is off. It should also work correctly when construction history is on and only the most recent operation is permitted to be adjusted (eg. changing the distance parameter for a merge vertex node, when merge vertices was the most recent operation.) In either case, undo will not produce a poly message callback.
[in] | node | the node callback function should listen to |
[in] | wantIdModifications | array of booleans specifying what arrays should be provided to the callback function when it is invoked. The entries in this array are kVertexIndex, kEdgeIndex, kFaceIndex for receiving vertex, edge, and face data in the callback respectively. |
[in] | count | the size of the array wantIdModifications |
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
MCallbackId addPolyTopologyChangedCallback | ( | MObject & | node, |
MMessage::MNodeFunction | func, | ||
void * | clientData = NULL , |
||
MStatus * | ReturnStatus =
NULL |
||
) | [static] |
This method registers a callback that will be called when a node impacting the topology of a meshShape is modified.
Because the callback is invoked before the mesh has evaluated, the new topology data cannot be queried at the time the callback is received. If you want to receive a callback at a time when the new mesh data can be queried, use the following technique:
[in] | node | the node the callback function should listen to |
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
unsigned int deletedId | ( | void | ) | [static] |
This method returns a constant which is to be used to determine if a component id has been deleted.
Compare component ids returned by the callback with the value return by this method. If they are the same then, the component id has been deleted.
const char * className | ( | ) | [static] |