Interfaces > Core Interfaces > colorMan |
The colorMan Core Interface exposes the Color Manager to MAXScript.
Within 3ds Max, using the Main Menu > Customize > Customize User Interface > Colors tab, you can alter the colors used for various UI elements, change the saturation, value and transparency of elements, and load and save color schemes.
<enum> colorMan.getColorTheme() getColorTheme enums: {#dark|#light}
NEW in 3ds Max 2017: Gets the current Color Theme as a name value.
<void> colorMan.setColorTheme <enum>theme theme enums: {#dark|#light}
NEW in 3ds Max 2017: Sets the current Color Theme.
<enum>colorMan.getColorSchemeType() getColorSchemeType enums: {#customColor|#standardWindows|#windowsTheme}
No longer available as of 3ds Max 2017.
Returns the current color scheme type as a name value.
Available in 3ds Max 2010 and higher up to 3ds Max 2017.
<enum>colorMan.setColorSchemeType <enum>type setColorSchemeType enums: {#customColor|#standardWindows|#windowsTheme} type enums: {#customColor|#standardWindows|#windowsTheme}
No longer available as of 3ds Max 2017.
Sets the color scheme type to the specified name and returns the actual color scheme type as result.
Available in 3ds Max 2010 and higher up to 3ds Max 2017.
In versions prior to 3ds Max 2010, returned true if the standard windows colors were used and false if custom colors were used.
In versions prior to 3ds Max 2010, used to set whether standard windows colors were used or not.
This registers a new color with the system, and adds a color to the color manager database that is then accessible from the color customization UI. It returns false if the color is already registered; otherwise true .
<string>color: The ID of the color to register. Example: #myNewColor
<string>name: The name for the color. Example: "My Own Color"
<string>category: The category for the color. If the name passed matches one of the existing 3ds Max categories the color will be placed in there, otherwise a new one will be created. Example: "Fun Gaming Colors"
<point3>defaultColor: The default value for the color. This is the value that the color will be reset to when a 3ds Max user presses "Reset" in the color customization dialog. Example: [1,0,0]
This method will load the specified color file from the current UI directory. Returns true if the load was successful, otherwise false .
<string>file: The filename of the color file to load.
This method will save the specified color file from the current UI directory. Returns true if the save process was successful, otherwise false .
<string>file: The filename of the color file to save.
Returns the file name of the current color file.
Sets the color value of the previously registered color whose ID is passed. Returns true if the color was set and false if the id passed could not be found.
<string>color: Specifies which color to set.
<point3>colorValue: The color value to set.
Returns the color value of the color whose ID is passed, or black (RGB(0,0,0)) if the Color passed was not found.
<string>color: Specifies which color to get.
Returns the name of the color whose ID is passed.
<string>color: The ID of the color.
Returns the category string of the color whose ID is passed.
<string>color: The ID of the color.
<filename>folder - The name of the folder relative to the UI directory. Absolute pathnames are not supported.
This method sets the folder from which all icons for the UI are loaded, and immediately reloads the icons from that folder.
Returns the absolute pathname of the current icon folder. Note that getIconFolder returns an absolute path while setIconFolder accepts only relative paths.
<float>colorMan.getIconColorScale <enum>type <enum>which type enums: {#disabledIcon|#enabledIcon} which enums: {#saturationScale|#valueScale|#alphaScale}
Returns a floating point value (in the range 0.0 to 1.0) that is one of the scale factors applied to the specified icon type. These scale values used to do image processing on the icons at start-up time.
<enum>type: One of the following values:
#disabledIcon: The disabled icons.
#enabledIcon: The enabled icons.
<enum>which : The icon color scale. One of the following values:
#saturationScale: The saturation scale.
colorMan.setIconColorScale <enum>type <enum>which <float>value type enums: {#disabledIcon|#enabledIcon} which enums: {#saturationScale|#valueScale|#alphaScale}
Sets the specified scale factor for the icon type passed. The color manager maintains the values for the 3ds Max icon image processing system. Developers can set values to scale the saturation, value and transparency for enabled and disabled icon images using this method.
<enum>type: The icon type. Can be one of the following values:
#disabledIcon: The disabled icons.
#enabledIcon: The enabled icons.
<enum>which: The icon color scale. Can be one of the following values:
#saturationScale: The saturation scale.
<float>value: The value runs from 0.0 to 100.0.
Returns true if the invert flag is set for the specified icon type and false if not set.
<enum>type: The icon type. Can be one of the following values:
#disabledIcon: The disabled icons.
#enabledIcon: The enabled icons.
Sets the invert flag for the specified icon type to on or off .
<enum>type: The icon type. One of the following values:
#disabledIcon: The disabled icons.
#enabledIcon: The enabled icons.
<boolean>value: Pass true for inverted; false for not inverted.
Returns the file name of the currently loaded color file.
Returns the default color for the specified ID. The default color is the value passed as defaultValue in registerColor, regardless if a SetColor() has been done subsequently. This is used by the UI when the user presses "Reset" to reset a color to its default value.
<string>color: The ID of the color.
This method allows you to issue a repaint of the user interface. This is equivalent to the Apply Colors Now button in the Customize dialog.
<repaintType>type: The type of repaint you wish to issue; #repaintAll , #repaintTrackBar , #repaintTimeBar .
Here is a macroScript that turns the time slider and trackbar backgrounds blue:
Reloads all CUI icons fromthe icon files. This can be used to refresh the UI after adding new or editing existing icon bitmap files.
Available in 3ds Max 9 and higher.
This method resolves the filename using the user icon path, then the system icon path, and then <3dsmax.exe>\ui\icons.
If the file is found, fully qualified filename is placed in fullfilename and the method returns true.
If not found, the method returns false.
Available in 3ds Max 9 and higher.
See also Class IcolorManager, in the SDK Help file accompanying this product