class MDGContext

Jump to documentation

Dependency graph context class. (OpenMaya) (OpenMaya.py)

public members:

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 )
static MDGContext fsNormal

Documentation

Control the way in which dependency nodes are evaluated.
Description

This is the dependency graph (DG) context class.

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.

Functions

MDGContext MDGContext:: fsNormal

MDGContext:: MDGContext ()

Description

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 )

Description

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.

Arguments

  • atTime The time in which the evaluation will take place

MDGContext:: MDGContext ( const MDGContext & other )

Description

Copy constructor. Duplicates the given DG context.

Arguments

  • other DG context to be copied.

MDGContext:: ~MDGContext ()

Description

Destructor.

bool MDGContext:: isNormal ( MStatus * ReturnStatus ) const

Description

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

Arguments

  • ReturnStatus Status code

Return Value

  • true this context is normal
  • false this context is not normal

Status Codes

  • MS::kSuccess Method was successful
  • MS::kFailure Object error

MStatus MDGContext:: getTime ( MTime & timeVal ) const

Description

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

Arguments

  • timeVal Storage for the time

Return Value

  • Status Code

Status Codes

  • MS::kSuccess The time was successfully returned
  • MS::kFailure Context is not timed

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

Description

Assignment operator. Copies the RHS into this context.

Arguments

  • other DG context to be copied.

This class has no child classes.


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