MEvaluationNode Class Reference

#include <MEvaluationNode.h>

Class Description

Provides access to Evaluation Manager node information.

See also
MEvaluationNodeIterator

An evaluation node is an object that is placed within an evaluation graph. Evaluation graphs are scheduled to speed up the operations within Maya.

This class contains methods for querying which attributes or plugs on a node will be set dirty prior to evaluation by the evaluation manager.

It is sometimes necessary to know the dirty state of plugs/attributes if your node is handling custom information. This handling would be done in the MPxNode preEvaluation()/postEvaluation() methods.

If you need to access the list of dirty plugs in the evaluation node then use the internal iterator:

for( MEvaluationNodeIterator nodeIt = theNode.iterator(); ! nodeIt.isDone(); nodeIt.next() ) { doSomePlugThing( nodeIt.plug() ); }

+ Examples:

Public Member Functions

 ~MEvaluationNode ()
 Destructor.
 
 MEvaluationNode (const MEvaluationNode &evalNode)
 Copy Constructor. More...
 
MEvaluationNodeIterator iterator (MStatus *ReturnStatus=NULL) const
 Returns an iterator at the beginning of the dirty plug list. More...
 
bool dirtyPlugExists (const MObject &attribute, MStatus *ReturnStatus=NULL) const
 Returns true if the specified attribute has a dirty plug. More...
 
MPlug dirtyPlug (const MObject &attribute, MStatus *ReturnStatus=NULL) const
 Returns the top-most plug for the specified attribute if the attribute has dirty plugs. More...
 

Static Public Member Functions

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

Friends

class MEvaluationNodeIterator
 
class MGraphNodeIterator
 

Constructor & Destructor Documentation

MEvaluationNode ( const MEvaluationNode evalNode)

Copy Constructor.

Parameters
[in]evalNodeAn existing evaluation node

Member Function Documentation

MEvaluationNodeIterator iterator ( MStatus ReturnStatus = NULL) const

Returns an iterator at the beginning of the dirty plug list.

Parameters
[out]ReturnStatusStatus Code
Returns
Iterator positioned at the beginning of the evaluation node's dirty plug list
Status Codes:
bool dirtyPlugExists ( const MObject attribute,
MStatus ReturnStatus = NULL 
) const

Returns true if the specified attribute has a dirty plug.

This call should be made from MPxNode::preEvaluation() and MPxNode::postEvaluation() to verify which plugs are going to be dirty and computed.

Note
Dirty plug is storing top-most array/parent of the plug tree in which given attribute exists. When a new computation starts with the evaluation manager, everything under a dirty plug is considered as dirty and will be computed.
Parameters
[in]attributeAttribute whose root plug is to be checked for membership in the dirty plug list
[out]ReturnStatusStatus Code
Returns
True if the attribute exists in the dirty plug list, otherwise false.
Status Codes:
+ Examples:
MPlug dirtyPlug ( const MObject attribute,
MStatus ReturnStatus = NULL 
) const

Returns the top-most plug for the specified attribute if the attribute has dirty plugs.

This call should be made from MPxNode::preEvaluation() and MPxNode::postEvaluation() to access a networked plug which is going to be dirty and computed.

Note
Dirty plug is storing top-most array/parent of the plug tree in which given attribute exists. When a new computation starts with the evaluation manager, everything under a dirty plug is considered as dirty and will be computed.
Parameters
[in]attributeAttribute whose root plug is returned if it is in the dirty plug list
[out]ReturnStatusStatus Code
Returns
The top-most dirty plug for the specified attribute if it exists, a null plug otherwise.
Status Codes:
const char * className ( )
static

Returns the name of this class.

Returns
Name of this class.

The documentation for this class was generated from the following files:
  • MEvaluationNode.h
  • MEvaluationNode.cpp