C++ API Reference
MPxParticleAttributeMapperNode Class Reference

User defined per particle attribute mapping nodes. More...

#include <MPxParticleAttributeMapperNode.h>

+ Inheritance diagram for MPxParticleAttributeMapperNode:

Public Member Functions

 MPxParticleAttributeMapperNode ()
 Class constructor. More...
 
 ~MPxParticleAttributeMapperNode () override
 Class destructor.
 
MPxNode::Type type () const override
 Returns the type of node that this is. More...
 
MStatus compute (const MPlug &plug, MDataBlock &dataBlock) override
 This method should be overridden in user defined nodes. 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 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 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 computeNode
 Input node used to compute output values.
 
static MObject uCoordPP
 The U component of an array of sample positions.
 
static MObject vCoordPP
 The V component of an array of sample positions.
 
static MObject outMinValue
 The minimum limit on the output attribute outValuePP.
 
static MObject outMaxValue
 The maximum limit on the output attribute outValuePP.
 
static MObject computeNodeColor
 This attribute allows the propagation of any changes to the.
 
static MObject computeNodeColorR
 The R component of the computeNodeColor.
 
static MObject computeNodeColorG
 The G component of the computeNodeColor.
 
static MObject computeNodeColorB
 The B component of the computeNodeColor.
 
static MObject time
 This attribute holds the value for time (in seconds)
 
static MObject outColorPP
 The outputColor vector per-particle attribute.
 
static MObject outValuePP
 The outputValue vector per-particle 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
 

Additional Inherited Members

- Public Types inherited from MPxNode
enum  Type {
  kDependNode, kLocatorNode, kDeformerNode, kManipContainer,
  kSurfaceShape, kFieldNode, kEmitterNode, kSpringNode,
  kIkSolverNode, kHardwareShader, kHwShaderNode, kTransformNode,
  kObjectSet, kFluidEmitterNode, kImagePlaneNode, kParticleAttributeMapperNode,
  kCameraSetNode, kConstraintNode, kManipulatorNode, kMotionPathNode,
  kClientDeviceNode, kThreadedDeviceNode, kAssembly, kSkinCluster,
  kGeometryFilter, kBlendShape, kLast
}
 Defines the type of node. More...
 
enum  SchedulingType {
  kParallel, kSerial, kGloballySerial, kUntrusted ,
  kDefaultScheduling = kSerial, kSerialize = kSerial, kGloballySerialize = kGloballySerial
}
 Defines the degree of parallelism of a node. More...
 
- Protected Member Functions inherited from MPxNode
virtual MDataBlock forceCache ()
 USE _forceCache() IN SCRIPT. More...
 
virtual MStatus setDoNotWrite (bool flag)
 USE _setDoNotWrite() IN SCRIPT. More...
 
virtual bool doNotWrite (MStatus *ReturnStatus=NULL) const
 USE _doNotWrite() IN SCRIPT. More...
 
virtual void setMPSafe (bool isMPSafe)
 Deprecated in 2019.0 More...
 
virtual MDataBlock forceCache (const MDGContext &)
 Deprecated in 2018.0 More...
 

Detailed Description

User defined per particle attribute mapping nodes.

MPxParticleAttributeMapperNode is the parent class of all user defined per particle attribute mapping nodes. This class extends Maya's internal 'arrayMapper' node, inheriting its attributes and default behaviour.

Examples:
particleAttrNode/particleAttrNode.h.

Constructor & Destructor Documentation

OPENMAYA_MAJOR_NAMESPACE_OPEN MPxParticleAttributeMapperNode ( )

Class constructor.

Any calls the MPxParticleAttributeMapperNode methods must be done in the postConstructor method and not here.

Member Function Documentation

MPxNode::Type type ( ) const
overridevirtual

Returns the type of node that this is.

This is used to differentiate user defined nodes that are derived off different MPx base classes.

It is not necessary to override this method.

Returns
Type of the node (MPxNode::kDependNode)

Reimplemented from MPxNode.

MStatus compute ( const MPlug plug,
MDataBlock dataBlock 
)
overridevirtual

This method should be overridden in user defined nodes.

Recompute the given output based on the nodes inputs. The plug represents the data value that needs to be recomputed, and the data block holds the storage for all of the node's attributes.

The MDataBlock will provide smart handles for reading and writing this node's attribute values. Only these values should be used when performing computations.

When evaluating the dependency graph, Maya will first call the compute method for this node. If the plug that is provided to the compute indicates that that the attribute was defined by the Maya parent node, the compute method should return MS::kUnknownParameter. When this occurs, Maya will call the internal Maya node from which the user-defined node is derived to compute the plug's value.

This means that a user defined node does not need to be concerned with computing inherited output attributes. However, if desired, these can be safely recomputed by this method to change the behaviour of the node.

Parameters
[in]plugplug representing the attribute that needs to be recomputed
[in]dataBlockdata block containing storage for the node's attributes
Returns
Status code
Status Codes:
  • MS::kSuccess Compute was successful
  • MS::kFailure Compute failed

Reimplemented from MPxNode.

Examples:
particleAttrNode/particleAttrNode.h.
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.
MObject thisMObject ( ) const
overridevirtual

Returns the MObject associated with this user defined node.

This makes it possible to use MFnDependencyNode or to construct plugs to this node's attributes.

It is not necessary to override this method.

Returns
MObject handle for this node

Reimplemented from MPxNode.


The documentation for this class was generated from the following files: