Share

Color Management Preferences

There are two systems of color management that can be selected and configured on the 3ds Max preferences dialog. You can determine the system that is used by a scene based on the color management mode, which can be queried using the IColorPipelineMgr interface.

  • When this is one of the OCIO modes, the scene uses OpenColorIO color management with either the default configuration file or a user-specified one.
  • When this is gamma, the scene uses the older gamma-based workflow.

In either case, it is best to use the IColorPipelineMgr interface to query or configure the color management settings. The GammaMgr class is being deprecated. IColorPipelineMgr has specific entry points for display, input, and output gamma.

The Settings Object

The IColorPipelineMgr::Settings() method returns a pointer to a mutable IModeSettings object that contains detailed settings for the current color management mode. For example, this is how the ColorConverter utility retrieves the number of IO Color Spaces:

size_t GetNumFileIOColorSpaces()
{
    auto cpmSettings = IColorPipelineMgr::GetInstance()->Settings();
    return cpmSettings->GetNumFileIOColorSpaces();
}

Getting The Color Management Mode

The current color management mode is returned by IColorPipelineMgr::GetColorPipelineMode(). For example, this is how the ColorConverter utility displays the current mode name:

MSTR GetCurrentColorPipelineModeName()
{
    IColorPipelineMgr* pColorPipelineMgr = IColorPipelineMgr::GetInstance();
    MSTR modeName = _T("Unknown");
    switch (pColorPipelineMgr->GetColorPipelineMode())
    {
    case MaxSDK::ColorManagement::ColorPipelineMode::kUNMANAGED:
        modeName = _T("Unmanaged");
        break;
    case MaxSDK::ColorManagement::ColorPipelineMode::kGAMMA:
        modeName = _T("Gamma Workflow");
        break;
    case MaxSDK::ColorManagement::ColorPipelineMode::kOCIO_DEFAULT:
        modeName = _T("OCIO Default");
        break;
    case MaxSDK::ColorManagement::ColorPipelineMode::kOCIO_CUSTOM:
        modeName = _T("OCIO Custom");
        break;
    default:
        break;
    }
    return modeName;
}

Was this information helpful?