This reference page is linked to from the following overview topics: Autodesk Maya 2014, Extension for Autodesk Maya 2013, 3.4 Effect Overrides, 4.2 Lighting Interfaces, 4.4 Effects interfaces.
Class to allow access to pass context information.
MPassContext provides access to current pass context information. The term "pass context" is used to denote a logical breakdown of the render loop within a single frame to render.
A "pass" denotes the highest level elements of the breakdown. Each pass has a unique identifier and a list of semantics.
The identifier can either be an internally specified identifier or the name of a custom scene or user render operation (MSceneRender, MUserRenderOperation respectively).
The semantics provide a description of what is being rendered. The list of semantics is ordered, from first to last element, such that the first element provides the broadest description and additional elements refine (provides additional details) about the previous element.
The following is a list of semantics which may be returned as the first element of the semantic list. Possible refining semantics are also described.
As an example, the semantic list returned may contain these elements:
[ color pass, opaque surface drawing, material override ]
This indicates that the active pass is drawing to a color output. Also that the render items being draw are opaque, and that those render items are being drawing with a material override.
As a second example, the semantic list returned may contain these elements:
[ color pass, transparent surface drawing, back-face culling ]
This means that the active pass is drawing to a color output. Also that the render items being drawn are transparent, and that those render items are being drawing with back-face culling enabled.
cgfxShaderNode.cpp, footPrintNode.cpp, and hwPhongShader.cpp.
#include <MDrawContext.h>
Public Member Functions | |
| const MString & | passIdentifier () const |
| Return the identifier for the pass context. | |
| const MStringArray & | passSemantics () const |
| Return an array of semantics for the pass context. | |
| bool | hasShaderOverride () const |
| Return if there is a shader instance override set for the current pass. | |
Static Public Attributes | |
| static const MString | kColorPassSemantic |
| Semantic for a color pass. | |
| static const MString | kShadowPassSemantic |
| Semantic for a shadow pass. | |
| static const MString | kDepthPassSemantic |
| Semantic for a depth pass. | |
| static const MString | kNormalDepthPassSemantic |
| Semantic for a normal and depth pass. | |
| static const MString | kOpaqueGeometrySemantic |
| Semantic to indicate opaque surfaces are being drawn. | |
| static const MString | kPreUIGeometrySemantic |
| Semantic to indicate pre-scene UI is being drawn. E.g. The grid. | |
| static const MString | kPostUIGeometrySemantic |
| Semantic to indicate post-scene UI for surfaces is being drawn. e.g. the wireframe or components. | |
| static const MString | kUIGeometrySemantic |
| Semantic to indicate UI for surfaces is being drawn. e.g. the wireframe or components. | |
| static const MString | kOpaqueUISemantic |
| Semantic for opaque UI. | |
| static const MString | kTransparentUISemantic |
| Semantic for transparent UI. | |
| static const MString | kXrayUISemantic |
| Semantic for UI in xray mode. | |
| static const MString | kTransparentGeometrySemantic |
| Semantic to indicate transparent surfaces are being drawn. | |
| static const MString | kCullBackSemantic |
| Semantic to indicate that back-face culling is being applied. | |
| static const MString | kCullFrontSemantic |
| Semantic to indicate that front-face culling is being applied. | |
| static const MString | kMaterialOverrideSemantic |
| Semantic to indicate that a material override is being used. | |
| static const MString | kUserPassSemantic |
| Semantic to indicate a user defined pass (MUserRenderOperation) | |
| const MString & passIdentifier | ( | ) | const |
Return the identifier for the pass context.
If a render override is active, then the name of the current operation will be returned.
| const MStringArray & passSemantics | ( | ) | const |
Return an array of semantics for the pass context.
The array may contain the following semantics:
| bool hasShaderOverride | ( | ) | const |
Return if there is a shader instance override set for the current pass.