3ds Max C++ API Reference
Loading...
Searching...
No Matches
MaxSDK::ColorManagement Namespace Reference

Classes

class  ColorConverter
 This is a fully header-implemented class wrapping IColorEngine for type-safe color conversions. More...
 
class  IColorEngine
 Interface class for internal color transformation engine, developers should not use this class directly. More...
 
class  IColorPipeline
 Interface class that defines color conversions from source color space to target color space. More...
 
class  IColorPipelineMgr
 This is the central class for handling system-wide color management related data and tasks. More...
 
class  ImageLayoutInfo
 Helper template class for providing memory layout information for various pixel data types. More...
 
class  IModeSettings
 This class holds the detailed settings for each of the color management modes (see ColorPipelineMode). More...
 
class  InputColorSpaceInfo
 This class is used internally by the BitmapInfo class. More...
 

Enumerations

enum  NotificationChangeMask : uint32_t {
  ModeChanged = 1 << 0 , GammaModeSettingsChanged = 1 << 1 , OCIOModeSettingsChanged = 1 << 2 , InputSettingsChanged = 1 << 3 ,
  OuputSettingsChanged = 1 << 4 , RenderingSpaceChanged = 1 << 5 , DisplayViewChanged = 1 << 6 , ParameterSpaceChanged = 1 << 7 ,
  ModeReInitialized = 1 << 8 , ModeLockStateChanged = 1 << 9
}
 Change bitmask that are passed with color management notification messages. More...
 
enum class  ColorPipelineMode : uint8_t {
  kUNMANAGED , kGAMMA , kOCIO_DEFAULT , kOCIO_CUSTOM ,
  kNumColorPipelineModes
}
 Enum for color management modes. More...
 
enum class  ModeStatus : uint8_t { kNORMAL , kFALLBACK_RAW , kINVALID }
 
enum class  ConfigSource : uint8_t { kBUILT_IN , kENV_VARIABLE , kUSER_DEFINED }
 Enum for source of the config file that's used in the mode. More...
 
enum class  DisplayViewTarget : uint8_t {
  kGLOBAL , kVIEWPORT , kFRAME_BUFFER , kMTL_EDITOR ,
  kCOLOR_PICKER , kCOLOR_SWATCH , kNumDisplayViewTargets
}
 Enum for identifying display/view pair targets. More...
 
enum class  OutputConversion : uint8_t { kNO_CONVERSION , kCOLOR_SPACE_CONVERSION , kDISPLAY_VIEWTRANSFORM }
 Enum for Output Color conversion options. More...
 
enum class  ColSpaceStatus { NotSet = 0 , Normal , ForcedDefault , Invalid }
 Enum for color space assignment state. More...
 
enum class  ColSpaceSource { NotSet = 0 , InputRules , User , SystemHeuristics }
 Enum for indicating the source of the assigned color space. More...
 

Enumeration Type Documentation

◆ NotificationChangeMask

enum NotificationChangeMask : uint32_t

Change bitmask that are passed with color management notification messages.


This bit mask is passed in NotifyInfo::callParam with the NOTIFY_COLOR_MANAGEMENT_POST_CHANGE and NOTIFY_COLOR_MANAGEMENT_POST_CHANGE2 notification codes. In rare occasions it's possible to get those notifications with none of the bits set, this happens during the "load color management settings" operation for example, where the loaded settings are the same as the previous ones.

Enumerator
ModeChanged 

Color management mode has changed.

GammaModeSettingsChanged 

Settings which are used in the ColorPipelineMode::kGAMMA mode have changed.

OCIOModeSettingsChanged 

Settings which are used in the OCIO modes have changed.

InputSettingsChanged 

Settings that affect the color management settings that are used in bitmap loading have changed.

OuputSettingsChanged 

Settings that affect the color management settings that are used in bitmap saving have changed.

RenderingSpaceChanged 

Rendering (working) color space has changed.

DisplayViewChanged 

One or more of the display/view settings have changed.

ParameterSpaceChanged 

The color space in which the color literals are stored has changed.

ModeReInitialized 

Depending on the situation, re-initialization may change multiple things or may change nothing.

Assume everything is changed.

ModeLockStateChanged 

OCIO config path's lock state is changed in the ColorPipelineMode::kOCIO_CUSTOM mode.

111{
112 ModeChanged = 1 << 0,
114 OCIOModeSettingsChanged = 1 << 2,
115 InputSettingsChanged = 1 << 3,
116 OuputSettingsChanged = 1 << 4,
117 RenderingSpaceChanged = 1 << 5,
118 DisplayViewChanged = 1 << 6,
119 ParameterSpaceChanged = 1 << 7,
120 ModeReInitialized = 1 << 8,
121 ModeLockStateChanged = 1 << 9,
122};
@ ParameterSpaceChanged
The color space in which the color literals are stored has changed.
Definition: IColorPipelineMgr.h:119
@ OCIOModeSettingsChanged
Settings which are used in the OCIO modes have changed.
Definition: IColorPipelineMgr.h:114
@ ModeReInitialized
Depending on the situation, re-initialization may change multiple things or may change nothing.
Definition: IColorPipelineMgr.h:120
@ OuputSettingsChanged
Settings that affect the color management settings that are used in bitmap saving have changed.
Definition: IColorPipelineMgr.h:116
@ DisplayViewChanged
One or more of the display/view settings have changed.
Definition: IColorPipelineMgr.h:118
@ InputSettingsChanged
Settings that affect the color management settings that are used in bitmap loading have changed.
Definition: IColorPipelineMgr.h:115
@ RenderingSpaceChanged
Rendering (working) color space has changed.
Definition: IColorPipelineMgr.h:117
@ ModeChanged
Color management mode has changed.
Definition: IColorPipelineMgr.h:112
@ ModeLockStateChanged
OCIO config path's lock state is changed in the ColorPipelineMode::kOCIO_CUSTOM mode.
Definition: IColorPipelineMgr.h:121
@ GammaModeSettingsChanged
Settings which are used in the ColorPipelineMode::kGAMMA mode have changed.
Definition: IColorPipelineMgr.h:113

◆ ColorPipelineMode

enum class ColorPipelineMode : uint8_t
strong

Enum for color management modes.

Enumerator
kUNMANAGED 

Color management turned off.

kGAMMA 

Color management using de-gamma/re-gamma work flow.

kOCIO_DEFAULT 

Uses the built-in OCIO config.

kOCIO_CUSTOM 

Uses custom OCIO config.

kNumColorPipelineModes 
18{
20 kGAMMA,
23
25};
@ kOCIO_CUSTOM
Uses custom OCIO config.
@ kGAMMA
Color management using de-gamma/re-gamma work flow.
@ kOCIO_DEFAULT
Uses the built-in OCIO config.
@ kUNMANAGED
Color management turned off.

◆ ModeStatus

enum class ModeStatus : uint8_t
strong
Enumerator
kNORMAL 

Mode is initialized as intended and is healthy.

kFALLBACK_RAW 

Mode initialization failed but initialized as "raw".

If this mode is selected 3ds Max will operate as colors unmanaged.

kINVALID 

Something terrible happened, Switching to this mode may make system unstable.

29{
30 kNORMAL,
32 kINVALID,
33};
@ kINVALID
Something terrible happened, Switching to this mode may make system unstable.
@ kNORMAL
Mode is initialized as intended and is healthy.
@ kFALLBACK_RAW
Mode initialization failed but initialized as "raw".

◆ ConfigSource

enum class ConfigSource : uint8_t
strong

Enum for source of the config file that's used in the mode.

Enumerator
kBUILT_IN 

The OCIO Setting is based on a build-in OCIO config.

kENV_VARIABLE 

The OCIO Setting is based on a OCIO config file specified by the 'OCIO' environment variable.

kUSER_DEFINED 

The OCIO Setting is based on a user-provided OCIO config file.

37{
38 kBUILT_IN,
41};
@ kUSER_DEFINED
The OCIO Setting is based on a user-provided OCIO config file.
@ kENV_VARIABLE
The OCIO Setting is based on a OCIO config file specified by the 'OCIO' environment variable.
@ kBUILT_IN
The OCIO Setting is based on a build-in OCIO config.

◆ DisplayViewTarget

enum class DisplayViewTarget : uint8_t
strong

Enum for identifying display/view pair targets.

Enumerator
kGLOBAL 

The Global default - all automatic view targets derive from this.

kVIEWPORT 

The Viewport.

kFRAME_BUFFER 

The FrameBuffer.

kMTL_EDITOR 

The Material Editor.

kCOLOR_PICKER 

The Color Picker - the Color Swatch will derive from this, if it is set to automatic.

kCOLOR_SWATCH 

The Color Swatch - when set to automatic, the value from the Color-Picker will be derived.

kNumDisplayViewTargets 
45{
46 kGLOBAL,
47 kVIEWPORT,
52
54};
@ kCOLOR_SWATCH
The Color Swatch - when set to automatic, the value from the Color-Picker will be derived.
@ kCOLOR_PICKER
The Color Picker - the Color Swatch will derive from this, if it is set to automatic.
@ kGLOBAL
The Global default - all automatic view targets derive from this.

◆ OutputConversion

enum class OutputConversion : uint8_t
strong

Enum for Output Color conversion options.

Enumerator
kNO_CONVERSION 

No conversion - output images will be saved in the Rendering Color Space.

kCOLOR_SPACE_CONVERSION 

Color Space conversion: output images will be converted into the given Output Color Space.

kDISPLAY_VIEWTRANSFORM 

Display/View Transform: output images will be converted into the given Display Color Space and and optionally given View Transform may be applied.

58{
62};
@ kCOLOR_SPACE_CONVERSION
Color Space conversion: output images will be converted into the given Output Color Space.
@ kDISPLAY_VIEWTRANSFORM
Display/View Transform: output images will be converted into the given Display Color Space and and op...
@ kNO_CONVERSION
No conversion - output images will be saved in the Rendering Color Space.

◆ ColSpaceStatus

enum class ColSpaceStatus
strong

Enum for color space assignment state.


In a modern color management system, color holding entities (such as bitmaps) need to have valid color spaces assigned to them so that they can be converted to and from the working (rendering) color space. Unlike the floating point gamma value used in the simple de-gamma/re-gamma work flows, the assigned color space may not always be a valid value, therefore it's important to keep track of the assigned color space and validity of it all the time. This enum provides different states the color space assignment may be in.

See also
BitmapInfo::ColorSpace, BitmapInfo::ColorSpaceStatus
Enumerator
NotSet 

No color space is assigned yet.

Normal 

A valid color space is assigned.

Things are healthy.

ForcedDefault 

System has force-assigned a color space probably because a previously assigned color space became unavailable.

Invalid 

Assigned color space is invalid, things will not work properly.

See also
BitmapInfo::ValidateColorSpace
30{
31 NotSet = 0,
32 Normal,
34 Invalid,
35};
@ ForcedDefault
System has force-assigned a color space probably because a previously assigned color space became una...
@ NotSet
No color space is assigned yet.

◆ ColSpaceSource

enum class ColSpaceSource
strong

Enum for indicating the source of the assigned color space.


In a modern color management system, color holding entities (such as bitmaps) need to have valid color spaces assigned to them so that they can be converted to and from the working (rendering) color space. This assignment can be done automatically based on the file name or type or can be done explicitly by the users. 3ds Max keeps track of the source of the color space assignment so that if for some reason color space becomes unavailable (see ColSpaceStatus), an informed decision can be made to re-assign one of the currently available color spaces. Knowing the source of the color space assignment will also make trouble shooting a color space related problems easier.

See also
BitmapInfo::ColorSpaceSource, BitmapInfo::SetRequestedColorSpace, BitmapInfo::GetRequestedColorSpaceSource
Enumerator
NotSet 

No color space is assigned yet.

InputRules 

Color space assigned automatically based on the file name (see IModeSettings::GetColorSpaceFromImageFilePath)

User 

User has assigned color space manually.

SystemHeuristics 

System heuristics are used to assign most suitable color space.

53{
54 NotSet = 0,
56 User,
58};
@ SystemHeuristics
System heuristics are used to assign most suitable color space.
@ User
User has assigned color space manually.
@ InputRules
Color space assigned automatically based on the file name (see IModeSettings::GetColorSpaceFromImageF...