C++ API Reference
|
Scope object used to modify current evaluation context in a code block. More...
#include <MDGContextGuard.h>
Public Member Functions | |
~MDGContextGuard () | |
Destructor, restore the previous evaluation context on this thread. | |
MDGContextGuard (const MDGContext &tempContext) | |
Initialize this guard with the given evaluation context. More... | |
Scope object used to modify current evaluation context in a code block.
Some API methods can have a context passed in to them. In those cases the current context will be temporarily changed to the passed context for evaluation purposes.
A better method for longer sequences of evaluation in an alterative context is to create a guard in a block of code that makes a bunch of calls, and then use the context-free methods.
This is equivalent to:
OPENMAYA_MAJOR_NAMESPACE_OPEN MDGContextGuard | ( | const MDGContext & | newContext | ) |
Initialize this guard with the given evaluation context.
Store the currently assigned context for this thread for restoring on destruction.