- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# MUserRenderOperation Class Reference
OpenMayaRender - API module for rendering

This reference page is linked to from the following overview topics: Autodesk Maya 2014, Rendering Overrides, 3.8 Render Loop Overrides, 3.9 UI draw manager, 4.2 Lighting Interfaces.

Search for all occurrences

## Detailed Description

Class which defines a user defined rendering operation.

`#include <MViewport2Renderer.h>`

Inheritance diagram for MUserRenderOperation:
[legend]

List of all members.

## Public Member Functions
| MUserRenderOperation (const MString &name)
| Constructor for named user render operation.
virtual | ~MUserRenderOperation ()
| Default destructor for a user render operation.
virtual const MCameraOverride * | cameraOverride ()
| Query for a camera override.
virtual MStatus | execute (const MDrawContext &drawContext)=0
| Each user operation is responsible for "executing" itself.
virtual bool | hasUIDrawables () const
| addUIdrawables() will be called only if this method is overridden to return true.
virtual void | addUIDrawables (MUIDrawManager &drawManager, const MFrameContext &frameContext)
| Provides access to the MUIDrawManager, which can be used to queue up operations to draw simple UI shapes like lines, circles, text, etc.
virtual bool | requiresLightData () const
| Indicates whether light data from the renderer is required for this user operation.

## Constructor & Destructor Documentation

MUserRenderOperation | ( | const MString & | name | ) |

Constructor for named user render operation.

Parameters:

  [in] | name | Name of render operation

## Member Function Documentation

const MCameraOverride * cameraOverride | ( |  | ) | `[virtual]`

Search for all occurrences

Query for a camera override.

The default implementation returns that there is no override.

Returns:
  Reference to the camera override. NULL if there is no override.

MStatus execute | ( | const MDrawContext & | drawContext | ) | `[pure virtual]`

Search for all occurrences

Each user operation is responsible for "executing" itself.

Parameters:

  [in] | drawContext | Hardware draw context information

Refer the the documentation for MRenderOverride::startOperationIterator() which describes when this method will be invoked.

Returns:
  Status code

Status Codes:
  - MS::kSuccess The operation executed successfully.
  - MS::kFailure The operation failed.

bool hasUIDrawables | ( |  | ) | const`[virtual]`

Search for all occurrences

addUIdrawables() will be called only if this method is overridden to return true.

The default implementation returns false.

If addUIDrawables() is not needed, this method should return false in order to avoid extra overhead required for adding UI drawables to the override.

Returns:
  Whether addUIDrawables() will be called or not.

void addUIDrawables | ( | MUIDrawManager & | drawManager,
|  | const MFrameContext & | frameContext
| ) |  | `[virtual]`

Search for all occurrences

Provides access to the MUIDrawManager, which can be used to queue up operations to draw simple UI shapes like lines, circles, text, etc.

This method will only be called when hasUIDrawables() is overridden to return true.

Parameters:

  [in] | drawManager | The UI draw manager, it can be used to draw some simple geometry including text.
  [in] | frameContext | Frame level context information

bool requiresLightData | ( |  | ) | const`[virtual]`

Search for all occurrences

Indicates whether light data from the renderer is required for this user operation.

This is generally only required to return true when the renderer has not previously performed any scene render. In that case light data will not be available as it is created on-demand during rendering.

By default this method returns false.

MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation
MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation MUserRenderOperation