Public Member Functions | Static Public Member Functions | Static Public Attributes

MPxParticleAttributeMapperNode Class Reference

Search for all occurrences

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.h.

#include <MPxParticleAttributeMapperNode.h>

Inheritance diagram for MPxParticleAttributeMapperNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  MPxParticleAttributeMapperNode ()
  Class constructor.
virtual  ~MPxParticleAttributeMapperNode ()
  Class destructor.
virtual MPxNode::Type  type () const
  Returns the type of node that this is.
virtual MStatus  compute (const MPlug &plug, MDataBlock &dataBlock)
  This method should be overridden in user defined nodes.

Static Public Member Functions

static const char *  className ()
  Returns the name of this class.

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.

Constructor & Destructor Documentation

Class constructor.

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


Member Function Documentation

MPxNode::Type type ( ) const [virtual]

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 
) [virtual]

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] plug plug representing the attribute that needs to be recomputed
[in] dataBlock data block containing storage for the node's attributes
Returns:
Status code
Status Codes:

Reimplemented from MPxNode.

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

Returns the name of this class.

Returns:
The name of this class.

Reimplemented from MPxNode.


MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode
MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode MPxParticleAttributeMapperNode