C++ API Reference
|
Base class for user defined deformers with per-vertex weights. More...
#include <MPxDeformerNode.h>
Public Member Functions | |
MPxDeformerNode () | |
Class constructor. | |
~MPxDeformerNode () override | |
Class destructor. | |
MPxNode::Type | type () const override |
This method returns the type of the node. More... | |
float | weightValue (MDataBlock &mblock, unsigned int multiIndex, unsigned int wtIndex) |
This method returns the weightValue stored in the datablock for the given geometry's lattice point/CV/vertex. More... | |
const float * | envelopeWeights (MDataBlock &mblock, unsigned int multiIndex, unsigned int *numWeights=nullptr) |
Introduced in 2024.0 More... | |
void | setUseExistingConnectionWhenSetEditing (bool state) |
Introduced in 2019.0 More... | |
MStatus | setDeformationDetails (unsigned int flags) |
Introduced in 2019.0 More... | |
unsigned int | getDeformationDetails (MStatus *ReturnStatus=NULL) |
Introduced in 2019.0 More... | |
const MIndexMapper & | indexMapper (unsigned int multiIndex, MStatus *ReturnStatus=NULL) const override |
Introduced in 2024.0 More... | |
Public Member Functions inherited from MPxGeometryFilter | |
MPxGeometryFilter () | |
Class constructor. | |
~MPxGeometryFilter () override | |
Class destructor. | |
MPxNode::Type | type () const override |
This method returns the type of the node. More... | |
virtual MStatus | deform (MDataBlock &block, MItGeometry &iter, const MMatrix &mat, unsigned int multiIndex) |
This method performs the deformation algorithm. More... | |
virtual MObject & | accessoryAttribute () const |
This method returns an MObject for the attribute to which an accessory shape is connected. More... | |
virtual MStatus | accessoryNodeSetup (MDagModifier &cmd) |
This method is called by the "deformer -type" command when your node is specified. More... | |
void | setUseExistingConnectionWhenSetEditing (bool state) |
This method allows the plugin node to request special treatment during set editing. More... | |
MStatus | setDeformationDetails (unsigned int flags) |
This method allows the plug-in node to inform the system that it intends to deform components other than just positions. More... | |
unsigned int | getDeformationDetails (MStatus *ReturnStatus=NULL) |
Retrieves the value set by setDeformationDetails(). More... | |
virtual void | setModifiedCallback (MSelectionList &list, bool listAdded) |
This callback method can be overriden and is called whenever the set this deformer is operating on is modified. More... | |
MFnGeometryData::SubsetState | getGeometryIterator (MItGeometry &iter, MDataBlock &block, MDataHandle &dataHandle, unsigned int multiIndex, bool readOnly=true, MStatus *ReturnStatus=nullptr) const |
Introduced in 2022.0 More... | |
virtual MObject | getFixedSetupData (const MString &name) |
Introduced in 2022.0 More... | |
MObject | thisMObject () const override |
Returns the MObject associated with this user defined node. More... | |
Public Member Functions inherited from MPxNode | |
MPxNode () | |
Constructor. More... | |
virtual | ~MPxNode () |
Destructor. | |
virtual void | postConstructor () |
Post constructor. More... | |
virtual MStatus | compute (const MPlug &, MDataBlock &) |
This method should be overridden in user defined nodes. More... | |
virtual bool | getInternalValue (const MPlug &, MDataHandle &) |
This method is overridden by nodes that store attribute data in some internal format. More... | |
virtual bool | setInternalValue (const MPlug &, const MDataHandle &) |
This method is overridden by nodes that store attribute data in some internal format. More... | |
virtual int | internalArrayCount (const MPlug &) const |
This method is overridden by nodes that have internal array attributes which are not stored in Maya's datablock. More... | |
virtual void | copyInternalData (MPxNode *) |
This method is overridden by nodes that store attribute data in some internal format. More... | |
virtual MStatus | legalConnection (const MPlug &, const MPlug &, bool asSrc, bool &isLegal) const |
This method allows you to check for legal connections being made to attributes of this node. More... | |
virtual MStatus | legalDisconnection (const MPlug &, const MPlug &, bool asSrc, bool &isLegal) const |
This method allows you to check for legal disconnections being made to attributes of this node. More... | |
virtual MStatus | setDependentsDirty (const MPlug &plug, MPlugArray &plugArray) |
This method can be overridden in user defined nodes to specify which plugs should be set dirty based upon an input plug {plugBeingDirtied} which Maya is marking dirty. More... | |
virtual MStatus | preEvaluation (const MDGContext &context, const MEvaluationNode &evaluationNode) |
Prepare a node's internal state for threaded evaluation. More... | |
virtual MStatus | postEvaluation (const MDGContext &context, const MEvaluationNode &evaluationNode, PostEvaluationType evalType) |
Clean up node's internal state after threaded evaluation. More... | |
virtual SchedulingType | schedulingType () const |
When overridden this method controls the degree of parallelism supported by the node during threaded evaluation. More... | |
virtual void | getCacheSetup (const MEvaluationNode &, MNodeCacheDisablingInfo &, MNodeCacheSetupInfo &, MObjectArray &) const |
Introduced in 2020.0 More... | |
virtual void | configCache (const MEvaluationNode &, MCacheSchema &) const |
Introduced in 2020.0 More... | |
virtual MTimeRange | transformInvalidationRange (const MPlug &source, const MTimeRange &input) const |
Introduced in 2020.0 More... | |
bool | hasInvalidationRangeTransformation () const |
Introduced in 2020.0 More... | |
virtual MStatus | connectionMade (const MPlug &, const MPlug &, bool asSrc) |
This method gets called when connections are made to attributes of this node. More... | |
virtual MStatus | connectionBroken (const MPlug &, const MPlug &, bool asSrc) |
This method gets called when connections are broken with attributes of this node. More... | |
virtual MStatus | dependsOn (const MPlug &, const MPlug &, bool &depends) const |
This method may be overridden by the user defined node. More... | |
virtual bool | isPassiveOutput (const MPlug &) const |
This method may be overridden by the user defined node if it wants to provide output attributes which do not prevent value modifications to the destination attribute. More... | |
virtual MStatus | shouldSave (const MPlug &, bool &isSaving) |
This method may be overridden by the user defined node. More... | |
virtual MPlug | passThroughToOne (const MPlug &) const |
This method may be overridden by nodes that have a one-to-one relationship between an input attribute and a corresponding output attribute. More... | |
virtual bool | passThroughToMany (const MPlug &, MPlugArray &) const |
This method is overridden by nodes that want to control the traversal behavior of some Maya search algorithms which traverse the history/future of shape nodes looking for directly related nodes. More... | |
virtual bool | isAbstractClass () const |
Override this class to return true if this node is an abstract node. More... | |
virtual bool | isTrackingTopology () const |
Introduced in 2019.0 More... | |
virtual MStringArray | getFilesToArchive (bool shortName=false, bool unresolvedName=false, bool markCouldBeImageSequence=false) const |
Use this method to return all external files used by this node. More... | |
virtual void | getExternalContent (MExternalContentInfoTable &table) const |
Returns the external content (files) that this node depends on. More... | |
bool | addExternalContentForFileAttr (MExternalContentInfoTable &, const MObject &attr) const |
Adds content info to the specified table from a file path attribute. More... | |
bool | setExternalContentForFileAttr (const MObject &attr, const MExternalContentLocationTable &) |
Sets content info in the specified attribute from the table. More... | |
virtual void | setExternalContent (const MExternalContentLocationTable &) |
Changes the location of external content in batch. More... | |
virtual MTypeId | typeId () const |
Returns the TYPEID of this node. More... | |
virtual MString | typeName () const |
Returns the type name of this node. More... | |
virtual MString | name () const |
Returns the name of this particular instance of this class. More... | |
virtual MStatus | setExistWithoutInConnections (bool flag) |
This method specifies whether or not the node can exist without input connections. More... | |
virtual bool | existWithoutInConnections (MStatus *ReturnStatus=NULL) const |
Determines whether or not this node can exist without input connections. More... | |
virtual MStatus | setExistWithoutOutConnections (bool flag) |
This method specifies whether or not the node can exist without output connections. More... | |
virtual bool | existWithoutOutConnections (MStatus *ReturnStatus=NULL) const |
Determines whether or not this node can exist without output connections. More... | |
void | _setMPSafe (bool isMPSafe) |
Deprecated in 2019.0 More... | |
MDataBlock | _forceCache (const MDGContext &) |
Deprecated in 2018.0 More... | |
virtual bool | getInternalValueInContext (const MPlug &, MDataHandle &, MDGContext &) |
Deprecated in 2018.0 More... | |
virtual bool | setInternalValueInContext (const MPlug &, const MDataHandle &, MDGContext &) |
Deprecated in 2018.0 More... | |
virtual int | internalArrayCount (const MPlug &, const MDGContext &) const |
Deprecated in 2018.0 More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
Static Public Member Functions inherited from MPxGeometryFilter | |
static const char * | className () |
Returns the name of this class. More... | |
Static Public Member Functions inherited from MPxNode | |
static MStatus | addAttribute (const MObject &attr) |
This method adds a new attribute to a user defined node type during the type's initialization. More... | |
static MStatus | inheritAttributesFrom (const MString &parentClassName) |
This method allows a class of plugin node to inherit all of the attributes of a second class of plugin node. More... | |
static MStatus | attributeAffects (const MObject &whenChanges, const MObject &isAffected) |
This method specifies that a particular input attribute affects a specific output attribute. More... | |
static MStatus | attributeAffects (const MObject &whenChanges, const MObject &isAffected, bool affectsTopology) |
Introduced in 2019.0 More... | |
static const char * | className () |
Returns the name of this class. More... | |
Static Public Attributes | |
static MObject | weightList |
weight list attribute, multi | |
static MObject | weights |
weight attribute, multi | |
Static Public Attributes inherited from MPxGeometryFilter | |
static MObject | input |
input attribute, multi | |
static MObject | inputGeom |
input geometry attribute | |
static MObject | groupId |
input group id attribute | |
static MObject | componentTagExpression |
Introduced in 2022.0 More... | |
static MObject | outputGeom |
geometry output attribute | |
static MObject | envelope |
envelope attribute | |
Static Public Attributes inherited from MPxNode | |
static MObject | message |
message attribute | |
static MObject | isHistoricallyInteresting |
is historically interesting attribute | |
static MObject | caching |
caching attribute | |
static MObject | state |
state attribute | |
static MObject | frozen |
frozen attribute | |
Base class for user defined deformers with per-vertex weights.
MPxDeformerNode builds on MPxGeometryFilter to allow the creation of deformers with per-vertex weights. Built-in Maya nodes which work in this way include the jiggle and cluster deformers.
The weight values can be modified by the user using the set editing window or the percent command.
|
overridevirtual |
This method returns the type of the node.
This method should not be overridden by the user. It will return MPxNode::kDeformerNode.
Reimplemented from MPxNode.
float weightValue | ( | MDataBlock & | block, |
unsigned int | multiIndex, | ||
unsigned int | wtIndex | ||
) |
This method returns the weightValue stored in the datablock for the given geometry's lattice point/CV/vertex.
The weight is the combination of painted weights and falloff weights.
[in] | block | the datablock for the node |
[in] | multiIndex | the index corresponding to the geometry |
[in] | wtIndex | the index corresponding to the component |
const float * envelopeWeights | ( | MDataBlock & | block, |
unsigned int | multiIndex, | ||
unsigned int * | numWeights = nullptr |
||
) |
Introduced in 2024.0
This method returns the envelope weights for the deformer.
These weights are the combination of painted weights and falloff weights. If NULL is returned it means all weights are uniformly 1.0 for all verts. The number of weights is equal to the number of affected verts of the indexMapper of the deformer which is the also the number of iterations of the geometryIterator.
[in] | block | the datablock for the node |
[in] | multiIndex | the index corresponding to the geometry |
[out] | numWeights | the number of weights that are returned (optional) |
void setUseExistingConnectionWhenSetEditing | ( | bool | state | ) |
Introduced in 2019.0
This method allows the plugin node to request special treatment during set editing.
It controls the connection behavior if all of a geometry's points are removed from the deformer set, and then points are subsequently added back in to the set again. By default, Maya will reconnect the deformer to the shape using a new input/output index. If this method is called in the custom deformer's postConstructor method and the state is set to true, the deformer will attempt to use the original input/output index when reconnecting to the shape.
[in] | state | whether or not to use the existing connection |
MStatus setDeformationDetails | ( | unsigned int | flags | ) |
Introduced in 2019.0
This method allows the plug-in node to inform the system that it intends to deform components other than just positions.
It should typically be called in advance of any deformation taking place (e.g. in postConstructor()), not in the deform() method. If it is called from deform(), the setting will take effect the next time the DG causes the deformation to be calculated.
[in] | flags | Bitwise OR of flags from the DeformationDetails enum |
unsigned int getDeformationDetails | ( | MStatus * | ReturnStatus = NULL | ) |
Introduced in 2019.0
Retrieves the value set by setDeformationDetails().
See the documentation of that method for the interpretation of the value.
[out] | ReturnStatus | Status code. |
|
overridevirtual |
Introduced in 2024.0
This method returns the indexMapper of the deformer.
The indexMapper defines the subset on which the deformer operates.
[in] | multiIndex | the index corresponding to the geometry |
[out] | ReturnStatus | Status code. |
Reimplemented from MPxGeometryFilter.
|
static |
Returns the name of this class.