MPxCustomEvaluator Class Reference
#include <MPxCustomEvaluator.h>
Base class for custom evaluation overrides in the evaluation manager.
|
class | MCustomEvaluatorClusterNode |
|
class | MEvaluationNodeIterator |
|
class | MFnPlugin |
|
Defines the type of consolidation during cluster creation.
Enumerator |
---|
kConsolidateNone |
Create single cluster per node/cycle cluster.
|
kConsolidateSubgraph |
Group nodes to form subgraph cluster, favoring long clusters.
|
kConsolidateFlood |
Group nodes to form subgraph cluster, favoring big clusters and partitioning speed.
|
Constructor.
Also creates our internal evaluator.
bool active |
( |
MStatus * |
ReturnStatus = NULL | ) |
const |
Is evaluator active.
- Parameters
-
[out] | ReturnStatus | Returns success or object error when internal object is not associated with this evaluator |
- Returns
- true if evaluator should receive scheduling then evaluation notifications.
void setActive |
( |
bool |
isNowActive, |
|
|
MStatus * |
ReturnStatus = NULL |
|
) |
| |
Change evaluator active state.
- Parameters
-
[in] | isNowActive | New active state |
[out] | ReturnStatus | Returns success or object error when internal object is not associated with this evaluator |
bool ready |
( |
MStatus * |
ReturnStatus = NULL | ) |
const |
Is evaluator ready to be used for evaluation.
- Parameters
-
[out] | ReturnStatus | Returns success or object error when internal object is not associated with this evaluator |
- Returns
- true when evaluator is ready for to preform evaluation
void setReady |
( |
bool |
isNowReady, |
|
|
MStatus * |
ReturnStatus = NULL |
|
) |
| |
Change evaluator ready state.
- Parameters
-
[in] | isNowReady | New ready state |
[out] | ReturnStatus | Returns success or object error when internal object is not associated with this evaluator |
Get current consolidation type used during cluster creation.
- Parameters
-
[out] | ReturnStatus | Returns success or object error when internal object is not associated with this evaluator |
- Returns
- Current consolidation type set for this evaluator
Set the consolidation type to be used when clusters are created.
- Parameters
-
[in] | newType | New consolidation type to set for this evaluator |
[out] | ReturnStatus | Returns success or object error when internal object is not associated with this evaluator |
Mark supported nodes.
This call marks node as supported by the evaluator. It is safe to cause evaluation in this call, but this evaluation cost will increase partitioning time and won't reduce the next evaluation time. It is up to the developer to decide whether evaluation is required or the already-evaluated data in the datablock can be used. Call .outputValue/.outputArrayValue in the first case and .inputValue/.inputArrayValue in the second (the first is preferred).
Zero, one or more nodes can be marked by this call, since the dependency node design can involve multiple nodes being joined in a single setup (e.g. IK chains).
- Parameters
-
[in] | node | Node to set or clear supported bit |
Called just before a graph evaluation starts.
- Parameters
-
[in] | graph | Graph that is just about to begin evaluation |
Called just after a graph evaluation finishes.
- Parameters
-
[in] | graph | Graph that has just finished evaluation |
Prepare cluster for evaluation.
This is called just before the cluster begins evaluation.
- Parameters
-
[in] | cluster | Cluster node to initialize |
- Returns
- true if initialization was successful
Check to see if the cluster is ready for evaluation.
It can happen that cluster initialization takes longer and is performed in a background thread. Instead of waiting, the evaluation manager will compute the cluster's node values using an evaluation node until the evaluator is ready to take over.
It is safe and allowed for custom evaluator to switch back to unready state.
- Parameters
-
[in] | cluster | Cluster node to check for readiness |
- Returns
- true if the cluster is ready for evaluation
Cleanup for cluster.
The cluster will be deleted every time the graph is invalidated, but it's up to the custom evaluator to decide if it wants to clear its internal representation or maybe it's possible to have some of this setup reusable.
To reuse internal representation of an cluster, developer can decide to keep hash of depend nodes that were in the cluster.
- Parameters
-
[in] | cluster | Cluster node to terminate |
Evaluate given cluster (will only receive clusters that belong to this evaluator)
- Parameters
-
[in] | cluster | Cluster node to evaluate |
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:
- MPxCustomEvaluator.h
- MPxCustomEvaluator.cpp