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

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends

# MCommonRenderSettingsData Class Reference

# OpenMayaRender - API module for rendering

Search for all occurrences

## Detailed Description

Data container for common rendering settings.

This class is a container that encapsulates the data for common rendering globals. The data is intended to be accessed using the following method:

    MCommonRenderSettingsData data;
    MRenderUtil::getCommonRenderSettings(data);

`#include <MCommonRenderSettingsData.h>`

List of all members.

## Public Types
enum | MpathType { kRelativePath, kFullPathImage, kFullPathTmp }
| Defines the types file paths. More...
## Public Member Functions
| MCommonRenderSettingsData ()
| Default contructor.
| ~MCommonRenderSettingsData ()
| Destructor.
bool | isAnimated () const
| Determines if there is animation.
bool | isMovieFormat () const
| Determines if the output format is a single movie file.
void | setPassName (const MString &pass)
| Used with getImageName. Sets the pass name for later use.
void | setFieldName (const MString &field)
| Used with getImageName. Sets the field name for later use.
const MString | getImageName (MpathType pathType, double frameNumber, const MString &sceneName, const MString &cameraName, const MString &fileFormat, const MObject layer, const bool createDirectory=true, MStatus *ReturnStatus=NULL) const
| Obtains the image name with the proper subdirectory structure.
const MString | getImageName (MpathType pathType, double frameNumber, const MString &sceneName, const MString &cameraName, const MString &fileFormat, const MObject layer, const MString &customTokenString, const bool createDirectory=true, MStatus *ReturnStatus=NULL) const
| Obtains the image name with the proper subdirectory structure (supports custom tokens).
const MString | getBufferName (const MObject &renderPass, const MObject &layer, const MString &cameraName, const MString &customTokenString="", const bool leaveUnmatchedTokens=false, MStatus *ReturnStatus=NULL) const
| Get image buffer name.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.
## Public Attributes
MString | name
| Base name for the rendered image. Search for all occurrences
unsigned int | namingScheme
| File naming scheme. Search for all occurrences
unsigned int | framePadding
| Number of padding zeros for the frame number. Search for all occurrences
MString | namePattern
| Single string that defines the whole naming convention. Search for all occurrences
unsigned int | imageFormat
| Predefined supported image format. Search for all occurrences
MString | customImageFormat
| Custom image format name. Search for all occurrences
MTime | frameStart
| First frame number. Search for all occurrences
MTime | frameEnd
| Last frame number. Search for all occurrences
float | frameBy
| Frame number step. Search for all occurrences
bool | renderAll
| When false, only the selected objects should be rendered. Search for all occurrences
bool | useCustomExt
| When true, overrides the default image format extension. Search for all occurrences
MString | customExt
| Custom format extension, when useCustomExt is true.
bool | renumberFrames
| When true, images need to be renumbered. Search for all occurrences
float | renumberStart
| First image number, when renumbering. Search for all occurrences
float | renumberBy
| Image number step, when renumbering. Search for all occurrences
unsigned int | width
| Image width in pixels. Search for all occurrences
unsigned int | height
| Image height in pixels. Search for all occurrences
float | deviceAspectRatio
| Image aspect ratio. This is equal to pixelAspect * width / height. Search for all occurrences
float | pixelAspectRatio
| Pixel aspect ratio. Search for all occurrences
float | dotPerInch
| Dot per Inch. Search for all occurrences
bool | enableDefaultLight
| When on, a default light should be created when no light is available in the scene. Search for all occurrences
MString | preMel
| The mel string to be executed before a scene is rendered. Search for all occurrences
MString | postMel
| The mel string to be executed after a scene is rendered. Search for all occurrences
MString | preRenderLayerMel
| The mel string to be executed before a render layer is rendered. Search for all occurrences
MString | postRenderLayerMel
| The mel string to be executed after a render layer is rendered. Search for all occurrences
MString | preRenderMel
| The mel string to be executed before a frame is rendered. Search for all occurrences
MString | postRenderMel
| The mel string to be executed after a frame is rendered.
## Friends Search for all occurrences
class | MRenderUtil Search for all occurrences

## Member Enumeration Documentation

enum MpathType

Search for all occurrences

Defines the types file paths.

Enumerator:

  kRelativePath | Relative to the project. Search for all occurrences
  kFullPathImage | Full path. Search for all occurrences
  kFullPathTmp | Full path in the temporary directory. Search for all occurrences

## Constructor & Destructor Documentation

MCommonRenderSettingsData | ( |  | ) |

Default contructor.

Initializes an empty object.

~MCommonRenderSettingsData | ( |  | ) |

Destructor.

Deallocates the memory.

## Member Function Documentation

bool isAnimated | ( |  | ) | const

Search for all occurrences

Determines if there is animation.

Returns:
  true if the naming scheme corresponds to an animation

bool isMovieFormat | ( |  | ) | const

Search for all occurrences

Determines if the output format is a single movie file.

Returns:
  true if images will be stored in a single movie file.

void setPassName | ( | const MString & | pass | ) |

Search for all occurrences

Used with getImageName. Sets the pass name for later use.

Adds a pass subdirectory to the path for the image.

Parameters:

  [in] | pass | The name of the field.

void setFieldName | ( | const MString & | field | ) |

Search for all occurrences

Used with getImageName. Sets the field name for later use.

Adds a field subdirectory to the path for the image.

Parameters:

  [in] | field | The name of the field.

const MString getImageName | ( | MpathType | pathType,
|  | double | frameNumber,
|  | const MString & | sceneName,
|  | const MString & | cameraName,
|  | const MString & | fileFormat,
|  | const MObject | layer,
|  | const bool | createDirectory = `true`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Obtains the image name with the proper subdirectory structure.

Compute the path for the image.

The path type returned depends on which option has been specified by pathType:

- kRelativePath returns the image name with its relative path (only the extra subdirs created within the base image dir)
- kFullPathImage returns the image full path with its path to the image dir
- kFullPathTmp returns the image full path with its path to the temp image dir

Parameters:

  [in] | pathType | decides file path format of the returned string. See above.
  [in] | frameNumber | the frame number to be used.
  [in] | sceneName | the scene name.
  [in] | cameraName | the name of the camera rendering this image.
  [in] | fileFormat | if not an empty string, use this file format instead of the one selected in the render settings to decide the final file name.
  [in] | layer | render layer object from which this image is rendered.
  [in] | createDirectory | if true, the image path directory will be created.
  [out] | ReturnStatus | Status code

Returns:
  The image path as a string.

const MString getImageName | ( | MpathType | pathType,
|  | double | frameNumber,
|  | const MString & | sceneName,
|  | const MString & | cameraName,
|  | const MString & | fileFormat,
|  | const MObject | layer,
|  | const MString & | customTokenString,
|  | const bool | createDirectory = `true`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Obtains the image name with the proper subdirectory structure (supports custom tokens).

Compute the path for the image.

The path type returned depends on which option has been specified by pathType:

- kRelativePath returns the image name with its relative path (only the extra subdirs created within the base image dir)
- kFullPathImage returns the image full path with its path to the image dir
- kFullPathTmp returns the image full path with its path to the temp image dir

Parameters:

  [in] | pathType | decides file path format of the returned string. See above.
  [in] | frameNumber | the frame number to be used.
  [in] | sceneName | the scene name.
  [in] | cameraName | the name of the camera rendering this image.
  [in] | fileFormat | if not an empty string, use this file format instead of the one selected in the render settings to decide the final file name.
  [in] | layer | render layer object from which this image is rendered.
  [in] | customTokenString | space separated list of key-value pairs to replace in the image name (ex. "myToken1=myValue1 myToken2=myValue2")
  [in] | createDirectory | if true, the image path directory will be created.
  [out] | ReturnStatus | Status code

Returns:
  The image path as a string.

const MString getBufferName | ( | const MObject & | renderPass,
|  | const MObject & | layer,
|  | const MString & | cameraName,
|  | const MString & | customTokenString = `""`,
|  | const bool | leaveUnmatchedTokens = `false`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Get image buffer name.

This name will be used when multiple buffers are rendered into the same image. This is only valid for image formats which support multiple buffers, such as OpenEXR.

Parameters:

  [in] | renderPass | Render pass object of the this rendering image.
  [in] | layer | render layer object pointer from which this image is rendered.
  [in] | cameraName | The name of the camera rendering this image.
  [in] | customTokenString | Space separated list of key-value pairs to replace in the buffer name (ex. "myToken1=myValue1 myToken2=myValue2").
  [in] | leaveUnmatchedTokens | whether to leave the unmatched tokens.
  [out] | ReturnStatus | Status code.

Returns:
  The name of buffer as a string.

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

## Member Data Documentation

bool renumberFrames

Search for all occurrences

When true, images need to be renumbered.

This only affects the image names.

MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData
MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData MCommonRenderSettingsData