This section provides an overview of the global functions, classes and methods used to retrieve and set the user preferences
of 3ds Max. Many of these are from the various pages of the Customize / Preferences... dialog.
User Interface Colors
A 3ds Max user may set various colors in the user interface via the settings in the Customize... ¦ Preferences... ¦ Color
tab dialog. A developer may access and set these settings using the following global functions:
- GetUIColor() - Returns the specified color value for drawing various items in the 3ds Max viewports.
- SetUIColor() - Sets the specified color value for drawing various items in the 3ds Max viewports.
- GetDefaultUIColor() - Returns the default color used for drawing various items in the 3ds Max user interface. The values returned are not affected
by the user's color selections or those set by SetUIColor().
- setUseVertexDots() - Sets the Use Vertex Dots preference to on or off. This corresponds to the 'Show Vertices As Dots' in the 3ds Max user interface.
- getUseVertexDots() - Returns the Use Vertex Dots preference -- nonzero for on; zero for off.
- setVertexDotType() - Sets the Vertex Small Dots / Large Dots preference. This corresponds to the 'Show Vertices As Dots' Small Dots / Large
Dots radio buttons in the 3ds Max user interface.
- getVertexDotType() - Returns the Vertex Small Dots / Large Dots preference. One of the following values:
Access to the 3ds Max Viewport settings:
Access to the user settings includes the 3ds Max toolbars, snap settings, crossing setting, animate button, 3ds Max window
handle, sub-object selection color, axis constraints, coordinate centers, and reference coordinate system setting. Some of
the viewport settings are global in nature -- that is they affect all the viewports. These methods are in class Interface. Examples are Interface::getBkgImageName(), Interface::GetGridSpacing(), etc.
Other viewport settings are specific to a viewport. These are available in class ViewExp. Examples are getBkgImageDsp(), getSFDisplay(), etc.
Access to the 3ds Max gamma settings:
The GammaMgr class allows access to the user specified gamma settings for display gamma, file input and output gamma.
System Settings
There is also another API that allows a plug-in to query various system settings.
GetSystemSetting() - This method will return nonzero if the setting whose id is passed is on; otherwise zero. You may pass the following values:
- SYSSET_ENABLE_EDITABLEMESH - Used to verify if TriObjects created will be the standard ones or the editable variety. Nonzero is returned if editable meshes will be created; otherwise
zero for standard TriObjects.
- SYSSET_CLEAR_UNDO - For release 1.1 and later if this ID is passed to this method the undo buffer is flushed.
- SYSSET_EDITABLEMESH_ENABLE_KEYBOARD_ACCEL - This option is available in release 2.0 and later only. Determines if keyboard accelerators are enabled for the editable
mesh. Nonzero if so; otherwise zero.
- SYSSET_ENABLE_EDITMESHMOD - This option is available in release 2.0 and later only. Determines if the edit mesh modifier is enabled. Nonzero if so;
otherwise zero.