getBackgroundParameters() -> [displayGradient, clearColorFlag, clearDepthFlag, clearStencilFlag, clearColor1, clearColor2, clearDepthValue, clearStencilValue]
Get parameters related to how the background is cleared
OpenMayaRender.MFrameContext.getCurrentCameraPath
(
)
getCurrentCameraPath() -> MDagPath
Get the path to the camera being used to render the current frame.
getCurrentColorRenderTarget() -> MRenderTarget
Get current color render target.
Calling code is responsible for invoking MRenderTargetManager::releaseRenderTarget() to release the reference to the target after use.
getCurrentDepthRenderTarget() -> MRenderTarget
Get current depth render target.
Calling code is responsible for invoking MRenderTargetManager::releaseRenderTarget() to release the reference to the target after use.
OpenMayaRender.MFrameContext.getDisplayStyle
(
)
getDisplayStyle() -> int
The DisplayStyle enums can be use to test the bit field for the enabling of any
of the listed display modes. For example to test for wireframe on shaded the test
would be test against the bit for kGourandShaded or kFlatShaded as well as testing
against the bit for kWireframe.
MFrameContext.kGouraudShaded Shaded display.
MFrameContext.kWireFrame Wire frame display.
MFrameContext.kBoundingBox Bounding box display.
MFrameContext.kTextured Textured display.
MFrameContext.kDefaultMaterial Default material display.
MFrameContext.kXrayJoint X-ray joint display.
MFrameContext.kXray X-ray display.
MFrameContext.kTwoSidedLighting Two-sided lighting enabled.
MFrameContext.kFlatShaded Flat shading display.
MFrameContext.kShadeActiveOnly Shade active object only.
MFrameContext.kXrayActiveComponents X-ray active components.
MFrameContext.kBackfaceCulling Backface culling enabled.
MFrameContext.kSmoothWireframe Smooth wireframe enabled.
OpenMayaRender.MFrameContext.getDOFParameters
(
)
getDOFParameters() -> [enabled, focalDistance, alpha]
Get the parameters generated by Maya for the circle-of-confusion depth shader used
for a pass used when computing depth of field.
This pass is indicated by the pass semantic MPassContext::kDOFPassSemantic.
The shader fragment used is called cocDepthSurface.
The XML wrapper can be queried from MFragmentManager or using the 'ogs -xml maya_CocDepthSurface' command.
getEnvironmentParameters() -> [bool, string]
Get parameters for currently used environment. Note that this information is set
per viewport and so might change between draw calls if multiple viewports are
displayed at the same time.
Return the destination (type and name) that the renderer is drawing to.
OpenMayaRender.MFrameContext.getGlobalLineWidth
(
)
getGlobalLineWidth() -> float
Get global line width.
OpenMayaRender.MFrameContext.getHwFogParameters
(
)
getHwFogParameters() -> [enabled, mode, start, end, density, color]
Get all the hardware fog parameters.
Hardware fog parameters include:
- hardware fog enabled
- hardware fog mode: Linear, Exponential, Exponential squared.
The possible values are:
MFrameContext::kFogLinear : Linear fog
MFrameContext::kFogExp : Exponential fog
MFrameContext::kFogExp2 : Exponential squared fog
- hardware fog start: The near distance used in the linear fog.
- hardware fog end: The far distance used in the linear fog.
- hardware fog density: The density of the exponential fog.
- hardware fog color: (r, g, b, a).
OpenMayaRender.MFrameContext.getLightingMode
(
)
getLightingMode() -> int
Get the current light mode.
MFrameContext.kNoLighting Use no light
MFrameContext.kAmbientLight Use global ambient light
MFrameContext.kLightDefault Use default light
MFrameContext.kSelectedLights Use lights which are selected
MFrameContext.kSceneLights Use all lights in the scene
MFrameContext.kCustomLights Use a custom set of lights which are not part of the scene. Currently this applies for use in the Hypershade Material Viewer panel
OpenMayaRender.MFrameContext.getLightLimit
(
)
getLightLimit() -> int
Get the current light limit.
OpenMayaRender.MFrameContext.getMatrix
(
)
getMatrix(int) -> MMatrix
Get a matrix value of a certain type.
Note that not all types are available for querying in MFrameContext.
Return None if matrix type not available from MFrameContext.
For a list of matrix type, see MDrawContext.semanticToMatrixType() description.
OpenMayaRender.MFrameContext.getPostEffectEnabled
(
)
getPostEffectEnabled(int) -> bool
Returns if a given post effect is currently enabled.
MFrameContext.kAmbientOcclusion Screen-space ambient occlusion
MFrameContext.kMotionBlur 2D Motion blur
MFrameContext.kGammaCorrection Gamma correction
MFrameContext.kDepthOfField Depth of field
MFrameContext.kAntiAliasing Hardware multi-sampling
getTransparencyAlgorithm() -> int
Get the current transparency algoritm.
MFrameContext.kUnsorted Unsorted transparent object drawing
MFrameContext.kObjectSorting Object sorting of transparent objects
MFrameContext.kWeightedAverage Weight average transparency
MFrameContext.kDepthPeeling Depth-peel transparency
OpenMayaRender.MFrameContext.getTuple
(
)
getTuple(int) -> MDoubleArray
Get a tuple (vector, position or single) value of a certain type.
Note that not all types are available for querying in MFrameContext.
Return None if unknown tuple type.
getViewportDimensions() -> [originX, originY, width, height]
Get the viewport dimensions. The origin is the upper left corner of the viewport.
OpenMayaRender.MFrameContext.inUserInteraction
(
)
static
inUserInteraction() -> bool
Returns True during any interactive refresh, as when user is interacting with the scene
in any way including camera changes, object or component TRS changes, etc.
OpenMayaRender.MFrameContext.objectTypeExclusions
(
)
objectTypeExclusions() -> long
Get the object type exclusions as a bitfield.
The bitfield can be tested using the bits defined by class statics starting with kExclude.
OpenMayaRender.MFrameContext.renderingDestination
(
)
renderingDestination() -> [int, destinationName]
Return the destination (type and name) that the renderer is drawing to.
MFrameContext.k3dViewport Rendering to an interactive 3d viewport
MFrameContext.k2dViewport Rendering to an interactive 2d viewport such as the render view
MFrameContext.kImage Rendering to an image
OpenMayaRender.MFrameContext.semanticToMatrixType
(
)
static
semanticToMatrixType(string) -> int
Given a semantic name return the corresponding matrix enumeration that can be used to retrieve a matrix value via the getMatrix() method.
MFrameContext.kWorldMtx Object to world matrix
MFrameContext.kWorldTransposeMtx Object to world matrix transpose
MFrameContext.kWorldInverseMtx Object to world matrix inverse
MFrameContext.kWorldTranspInverseMtx Object to world matrix transpose inverse (adjoint)
MFrameContext.kViewMtx World to view matrix
MFrameContext.kViewTransposeMtx World to view matrix tranpose
MFrameContext.kViewInverseMtx World to view matrix inverse
MFrameContext.kViewTranspInverseMtx World to view matrix transpose inverse (adjoint)
MFrameContext.kProjectionMtx Projection matrix
MFrameContext.kProjectionTranposeMtx Projection matrix tranpose
MFrameContext.kProjectionInverseMtx Projection matrix inverse
MFrameContext.kProjectionTranspInverseMtx Projection matrix tranpose inverse (adjoint)
MFrameContext.kViewProjMtx View * projection matrix
MFrameContext.kViewProjTranposeMtx View * projection matrix tranpose
MFrameContext.kViewProjInverseMtx View * projection matrix inverse
MFrameContext.kViewProjTranspInverseMtx View * projection matrix tranpose inverse (adjoint)
MFrameContext.kWorldViewMtx World * view matrix
MFrameContext.kWorldViewTransposeMtx World * view matrix transpose
MFrameContext.kWorldViewInverseMtx World * view matrix inverse
MFrameContext.kWorldViewTranspInverseMtx World * view matrix transpose inverse (adjoint)
MFrameContext.kWorldViewProjMtx World * view * projection matrix
MFrameContext.kWorldViewProjTransposeMtx World * view * projection matrix transpose
MFrameContext.kWorldViewProjInverseMtx World * view * projection matrix inverse
MFrameContext.kWorldViewProjTranspInverseMtx World * view * projection matrix tranpose inverse (adjoint)
OpenMayaRender.MFrameContext.semanticToTupleType
(
)
static
semanticToTupleType(string) -> int
Given a semantic name return the corresponding tuple enumeration that can be used to retrieve a value via the getTuple() method.
MFrameContext.kViewPosition View position
MFrameContext.kViewDirection View direction vector
MFrameContext.kViewUp View up vector
MFrameContext.kViewRight View right vector
MFrameContext.kViewportPixelSize Viewport size in pixels (single value)
MFrameContext.kViewNearClipValue Camera near clip value (single value)
MFrameContext.kViewFarClipValue Camera far clip value (single value)
MFrameContext.kViewUnnormlizedNearClipValue Unnormalized camera near clip value (single value)
MFrameContext.kViewUnnormalizedFarClipValue Unnormalized camera far clip value (single value)
OpenMayaRender.MFrameContext.shadeTemplates
(
)
static
shadeTemplates() -> bool
Returns the display preference indicating whether templated objects should be drawn shaded.
userChangingViewContext() -> bool
Returns True during any interactive refresh, as when user is changing the view using view context
tools such as tumble, dolly or track.
OpenMayaRender.MFrameContext.wireOnShadedMode
(
)
static
wireOnShadedMode() -> int
Returns the global user display preference which indicates how wireframe should be drawn on top of objects while in shaded mode.
Please refer to documentation on the 'Wireframe-on-shaded' option under the 'Display->View' tab in the preferences window.
Note that 'viewport in wireframe on shaded mode' is a different option which is per viewport. This can be tested by testing if
a shaded mode is set as well as wireframe mode. Refer to the enumerations DisplayStyle and the method getDisplayStyle().
MFrameContext.kWireframeOnShadedFull Draw wireframe
MFrameContext.kWireFrameOnShadedReduced Draw wireframe but with reduced quality
MFrameContext.kWireFrameOnShadedNone Do not draw wireframe
The documentation for this class was generated from the following file: