class MPxParticleAttributeMapperNode

Jump to documentation

: public MPxNode User defined per particle attribute mapping nodes. (OpenMayaFX) (OpenMayaMPx.py)

Inheritance:

MPxParticleAttributeMapperNode < MPxNode

public members:

MPxParticleAttributeMapperNode ()
virtual ~MPxParticleAttributeMapperNode ()
virtual MPxNode::Type type () const
virtual MStatus compute (const MPlug & plug, MDataBlock & dataBlock)
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

Inherited from MPxNode:

public members:

enum Type
kDependNode
kLocatorNode
kDeformerNode
kManipContainer
kSurfaceShape
kFieldNode
kEmitterNode
kSpringNode
kIkSolverNode
kHardwareShader
Custom shader derived from MPxHardwareShader
kHwShaderNode
Custom shader derived from MPxHwShaderNode
kTransformNode
kObjectSet
kFluidEmitterNode
kImagePlaneNode
kParticleAttributeMapperNode
kConstraintNode
kLast
virtual void postConstructor ()
virtual MStatus compute ( const MPlug & plug, MDataBlock & dataBlock )
virtual bool getInternalValueInContext ( const MPlug & plug, MDataHandle & dataHandle, MDGContext & ctx)
virtual bool setInternalValueInContext ( const MPlug & plug, const MDataHandle & dataHandle, MDGContext & ctx)
virtual bool getInternalValue ( const MPlug & plug, MDataHandle & dataHandle)
virtual bool setInternalValue ( const MPlug & plug, const MDataHandle & dataHandle)
virtual int internalArrayCount ( const MPlug & plug, const MDGContext & ctx) const
virtual void copyInternalData ( MPxNode * )
virtual MStatus legalConnection ( const MPlug & plug, const MPlug & otherPlug, bool asSrc, bool& isLegal ) const
virtual MStatus legalDisconnection ( const MPlug & plug, const MPlug & otherPlug, bool asSrc, bool& isLegal ) const
virtual MStatus setDependentsDirty ( const MPlug & plug, MPlugArray & plugArray)
virtual MStatus connectionMade ( const MPlug & plug, const MPlug & otherPlug, bool asSrc )
virtual MStatus connectionBroken ( const MPlug & plug, const MPlug & otherPlug, bool asSrc )
virtual bool isPassiveOutput ( const MPlug & plug ) const
virtual MStatus shouldSave ( const MPlug & plug, bool& isSaving )
virtual MPlug passThroughToOne ( const MPlug & plug ) const
virtual bool passThroughToMany ( const MPlug & plug, MPlugArray & plugArray ) const
MTypeId typeId () const
MString typeName () const
MString name () const
virtual Type type () const
virtual bool isAbstractClass () const
MObject thisMObject () const
static MStatus addAttribute ( const MObject & attr )
static MStatus inheritAttributesFrom ( const MString & parentClassName )
static MStatus attributeAffects ( const MObject & whenChanges, const MObject & isAffected )
MStatus setExistWithoutInConnections ( bool flag )
bool existWithoutInConnections ( MStatus * ReturnStatus = NULL ) const
MStatus setExistWithoutOutConnections ( bool flag )
bool existWithoutOutConnections ( MStatus * ReturnStatus = NULL ) const
static MObject message
static MObject isHistoricallyInteresting
static MObject caching
static MObject state

protected members:

MDataBlock forceCache ( MDGContext & ctx= MDGContext::fsNormal )
void setMPSafe ( bool flag )
MStatus setDoNotWrite ( bool flag )
bool doNotWrite ( MStatus *ReturnStatus = NULL ) const

Documentation

Create user defined particle attribute nodes.
Description

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.

Functions

MPxParticleAttributeMapperNode:: MPxParticleAttributeMapperNode ()

Description

Class constructor.

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

MPxParticleAttributeMapperNode:: ~MPxParticleAttributeMapperNode ()

Description

Class destructor.

MPxNode::Type MPxParticleAttributeMapperNode:: type () const

Description

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.

Return Value

  • Type of the node (MPxNode::kDependNode)

MStatus MPxParticleAttributeMapperNode:: compute ( const MPlug & plug, MDataBlock & dataBlock )
Description

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.

Arguments

  • plug plug representing the attribute that needs to be recomputed
  • block data block containing storage for the node's attributes

Return Value

  • Status code

Status Codes

  • MS::kSuccess Compute was successful
  • MS::kFailure Compute failed

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright