C++ API Reference
MColorManagementUtilities Class Reference

Utilities for obtaining color management information. More...

#include <MColorManagementUtilities.h>

Classes

class  MColorTransformData
 Utility class that retrieves the opaque data containing the color transform information needed to render the scene. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 
static MStatus getColorTransformCacheIdForInputSpace (const MString &inputSpaceName, MString &transformId)
 Utility function to retrieve the id of a color transform based on the input color space name provided. More...
 
static MStatus getColorTransformCacheIdForOutputTransform (MString &transformId)
 Utility function to retrieve the id of the color transform to be applied on the final output. More...
 
static bool isColorManagementEnabled ()
 Returns whether color management is enabled for the current scene. More...
 
static bool isColorManagementAvailable ()
 Returns whether color management is available for the current product. More...
 
static MStatus connectDependencyNodeToColorManagement (MObject &object)
 Deprecated in 2019.0 More...
 

Detailed Description

Utilities for obtaining color management information.

Member Function Documentation

const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.
MStatus getColorTransformCacheIdForInputSpace ( const MString inputSpaceName,
MString transformId 
)
static

Utility function to retrieve the id of a color transform based on the input color space name provided.

The color transform id corresponds to a color transform that converts colors from the input color space specified to the scene rendering space.

For example, given the name of the input color space of a node, this function retrieves the id of the color transform to be used for mapping colors from input space to rendering space. For nodes that have such a color space attribute, the transform id is meant to be writen by a file translator plug-in to a renderer file alongside the node information.

This id corresponds to a color transform contained in the color transform data retrieved by the MColorTransformData class.

Parameters
[in]inputSpaceNameName of the color space of the node
[out]transformIdidentifier of the color transform required to be applied to the node.
Returns
Status code
Status Codes:
Examples:
colorTransformData/colorTransformData.cpp.
MStatus getColorTransformCacheIdForOutputTransform ( MString transformId)
static

Utility function to retrieve the id of the color transform to be applied on the final output.

The color transform id corresponds to a color transform that converts colors of the renderered image to a target color space.

This id corresponds to a color transform contained in the color transform data retrieved by the MColorTransformData class.

Parameters
[out]transformIdidentifier of the color transform required to be applied on the rendered image.
Returns
Status code
Status Codes:
Examples:
colorTransformData/colorTransformData.cpp.
bool isColorManagementEnabled ( )
static

Returns whether color management is enabled for the current scene.

Returns
true if color management is enabled
bool isColorManagementAvailable ( )
static

Returns whether color management is available for the current product.

Returns
true if color management is available
Examples:
colorTransformData/colorTransformData.cpp.
MStatus connectDependencyNodeToColorManagement ( MObject object)
static

Deprecated in 2019.0

Connect the input dependency node to the global color management properties.

Deprecated:
Use MColorManagementNodes::connectDependencyNodeToColorManagement instead.
2019.0:
Deprecated in this version.

This function will connect the input dependency node to the global color management properties through these 4 plugs: "colorManagementEnabled" (whether color management is being used or not), "colorManagementConfigFileEnabled" (whether OCIO configuration file is being used or not), "configFilePath" (the OCIO config file path being used), "workingSpace" (target working space used for color management). It is the users' responsibility to ensure that these plugs are exist beforehand. If not, this function will return as failed. This function is safe to be called if certain plug(s) is(are) already connected.

In the case, plug "colorSpace" (the color space used for color management) is available in the input object, this function will apply the color management rule to it.

Parameters
[in]objectThe input object to be connected to global node
Returns
Status code
Status Codes:

The documentation for this class was generated from the following files: