MAXScript Editor - Customizing Syntax Color Schemes

 

   

MAXScript Editor - Quick Navigation

The Tabbed MAXScript Editor introduced in 3ds Max 2008 lets you define your own custom color schemes to highlight lexical components of the MAXScript language.

Global Definition:

Custom colors can be defined in the file MAXScript.properties , which is easily accessible through the Tools > Open MAXScript. properties menu item. See MAXScript Editor - Properties File Settings for Lexer options.

A COLOR SCHEME SIMILAR TO 3DS MAX 9 COLORS:

# MAXScript styles
# Default
style.MAXScript.32=$(font.base)
# White space
style.MAXScript.0=fore:#808080
# Comment: /* */.
style.MAXScript.1=fore:#009900
# Line Comment: --.
style.MAXScript.2=fore:#009900,eolfilled
# Number
style.MAXScript.3=fore:#000000
# String
style.MAXScript.4=fore:#800000
# Verbatim strings
style.MAXScript.5=fore:#FF0000,$(font.monospace),eolfilled
# End of line where string is not closed
style.MAXScript.6=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
# Identifiers
style.MAXScript.7=
# Operators
style.MAXScript.8=fore:#406060
# Keyword arg name
style.MAXScript.9=fore:#000080
# Name value
style.MAXScript.10=fore:#600080
# Pathname
style.MAXScript.11=fore:#005000
# Keywords1 - Keywords
style.MAXScript.12=fore:#0000C0
# Keywords2 - Rollout controls
style.MAXScript.13=fore:#202080
# Keywords3 - Functions
style.MAXScript.14=fore:#3060A0
# Keywords4 - MXS Classes
style.MAXScript.15=fore:#6030A0
# Keywords5 - MAXClasses
style.MAXScript.16=fore:#60A030
# Keywords6 - MAXSuperClasses
style.MAXScript.17=fore:#0040B0
# Keywords7 - Core interfaces
style.MAXScript.18=fore:#00B040
# Keywords8 - Object sets
style.MAXScript.19=fore:#D0B080
# Keywords9 - StructDefs
style.MAXScript.20=fore:#804020
# Keywords10 - Const reserved globals
style.MAXScript.21=fore:#3060A0
# Keywords11 - Reserved globals
style.MAXScript.22=fore:#B00040
# Keywords12 - User defined
style.MAXScript.23=fore:#FF0000

See bottom of this page for the result.

Local Directory Overrides:

If you have set the property,

properties.directory.enable=1

in the Global Options File "MXS_Editor.properties", you can create local property files called "SciTEDirectory.properties" in any directories containing MAXScript files. If you open a MAXScript file from a directory containing such a local property file, the lexer settings in it will override the global properties.

This allows for project-specific color configurations.

Here is the shipping \Ui\MacroScripts\Macro_BakeTextures.mcr file using the default color scheme:

After saving a new "SciTEDirectory.properties" file containing the color definitions listed in the beginning of this topic to \Ui\MacroScripts\ and setting properties.directory.enable=1 in the file "MXS_Editor.properties", the same script looks like this:

Changing the property properties.directory.enable=0 and saving the "MXS_Editor.property" file to disk will instantly change the color coding back to the default color scheme in all currently opened tabs showing MAXScript files located in the \Ui\MacroScripts folder.

 

   

MAXScript Editor - Quick Navigation