MDGContext Class Reference
[OpenMaya - API module for common classes]

#include <MDGContext.h>
Collaboration diagram for MDGContext:
Collaboration graph
[legend]

List of all members.


Detailed Description

Dependency graph (DG) context class.

Control the way in which dependency nodes are evaluated.

DG contexts are used to define the way in which a dependency node is going to be evaluated. Examples of such contexts include "normal", "at a given time, "for a specific instance", etc.

MDGContext is mainly used in two places; within methods that trigger evaluations, to define what kind of evaluate is being requested, and within data blocks (MDataBlock), to identify how the data was created.

Examples:

cgfxShaderNode.cpp, cgfxShaderNode.h, customImagePlane.cpp, GLSLShaderNode.cpp, GLSLShaderNode.h, hlslShader.cpp, hlslShader.h, hwColorPerVertexShader.cpp, hwPhongShader.cpp, hwPhongShader.h, rockingTransform.cpp, rockingTransform.h, and rockingTransformCheck.cpp.


Public Member Functions

  MDGContext ()
  MDGContext (const MTime &when)
  MDGContext (const MDGContext &in)
  ~MDGContext ()
bool  isNormal (MStatus *ReturnStatus=NULL) const
MStatus  getTime (MTime &) const
MDGContext operator= (const MDGContext &other)

Friends

class  MPlug
class  MDataBlock

Constructor & Destructor Documentation

MDGContext::MDGContext (  ) 

Constructor. Creates a context to define the way in which a dependency node is evaluated. In this case the new context will be for a normal evaluation.

MDGContext::MDGContext ( const MTime atTime  ) 

Constructor. Creates a context to define the way in which a dependency node is evaluated. In this case the new context will be for an evaluation at a specific time.

Parameters:
[in]  atTime  The time in which the evaluation will take place

MDGContext::MDGContext ( const MDGContext other  ) 

Copy constructor. Duplicates the given DG context.

Parameters:
[in]  other  DG context to be copied.

MDGContext::~MDGContext (  ) 

Destructor.


Member Function Documentation

bool MDGContext::isNormal ( MStatus ReturnStatus = NULL  )  const

Determines if this context is that of "normal" evaluation.

Parameters:
[out]  ReturnStatus  Status code
Returns:
  • true this context is normal
  • false this context is not normal
Status Codes:
Examples:

MStatus MDGContext::getTime ( MTime timeVal  )  const

Return the single time for which this context is valid. The context must be a timed context, i.e. not a normal one.

Parameters:
[out]  timeVal  Storage for the time
Returns:
Status Code
Status Codes:

MDGContext & MDGContext::operator= ( const MDGContext other  ) 

Assignment operator. Copies the RHS into this context.

Parameters:
[in]  other  DG context to be copied.

Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6