The MAXScript-specific language settings of the Tabbed MAXScript Editor introduced in 3ds Max 2008 can be customized by editing the file MAXScript.properties located in the 3ds Max root folder.
On modern Windows OS such as, Vista and Windows 7 with User Account Control (UAC) enabled, modifying the factory defaults stored in files located in the 3ds Max root folder is not allowed. In this case, you can provide your custom overrides by copying the relevant settings into the User Options file also available through the Tools menu of the Editor.
A lexer splits a file up into syntactic pieces. The Editor can then display these pieces in different visual styles.
Often several file extensions (.ms, .mcr) can map to one language (MAXScript) and can use one lexer.
These settings associate a file name with a lexer.
This property specifies the path to an external lexer module that will be loaded into the Editor.
keywords2 is for rollout controls,
keywords4 is for MAXScript Classes,
keywords6 is for MAX Super Classes,
keywords7 is for Core Interfaces,
keywords10 is for const reserved globals,
keywords11 is for reserved globals,
keywords12 is for user defined words to be colorized. Keywords are checked for in this list first.
See the topic MAXScript Editor - Defining Custom Keywords for an example of generating user-defined keywords and styles.
Most of the lexers differentiate between names and keywords and use the keyword variables to do so.
To avoid repeating the keyword list for each file extension, where several file extensions are used for one language, a keyword class variable is defined in the distributed properties file although this is just a convention.
Some lexers define a second set of keywords that will be displayed in a different style to the first set of keywords. This is used in the HTML lexer to display JavaScript keywords in a different style to HTML tags and attributes.
Keywords can be prefix based so ^GTK_ will treat all words that start with GTK_ as keywords.
Defines the language mode used before the file. For example, if default.file.ext=.ms, then when the New command is used to create a new file, the MAXScript syntax styling is used.
Defines which characters can be parts of words.
The default value here is all the alphabetic and numeric characters, and the underscore which is a reasonable value for most languages.
Defines which characters are considered whitespace.
The default value is space and all chars less than 0x20.
Setting this property allows you to force the Editor to consider other characters as whitespace (for example, punctuation) during such activities as cursor navigation (ctrl+left/right).
style.*.<stylenumber> (MAXScript default: not set) style.<lexer>.<stylenumber> (MAXScript default: see below)
The lexers determine a style number for each lexical type such as, keyword, comment, or number. These settings determine the visual style to be used for each style number of each lexer.
The value of each setting is a set of ',' separated fields, some of which have a sub-value after a ':'.
The fields are font, size, fore, back, italics, notitalics, bold, notbold, eolfilled, noteolfilled, underlined, notunderlined, and case.
The font field has a sub-value that is the name of the font, the fore and back have color sub-values, the size field has a numeric size sub-value, the case field has a sub-value of 'm', 'u', or 'l' for mixed, upper, or lower case, and the bold, italics, and eolfilled fields have no sub-value.
The value "fore:#FF0000,font:Courier,size:14" represents 14 point, red Courier text.
A global style can be set up using style.*. stylenumber .
Any style options set in the global style will be inherited by each lexer style unless overridden.
style.<lexer>.32 (MAXScript default:see below) style.<lexer>.33 (MAXScript default:see below) style.<lexer>.34 (MAXScript default:see below) style.<lexer>.35 (MAXScript default:see below) style.<lexer>.36 (MAXScript default:see below) style.<lexer>.37 (MAXScript default:see below)
In addition to the styles generated by the lexer, these numbered styles are used:
32- default style and its features will be inherited by all other styles unless overridden.
33-- display line numbers in the margin.
34 and 35- used to display matching and non-matching braces respectively.
36- used for displaying control characters. This is not a full style as the foreground and background colors for control characters are determined by their lexical state rather than this style.
37- used for displaying indentation guides. Only the fore and back fields are used.
A * can be used instead of a lexer to indicate a global style setting.
See the topic MAXScript Editor - Customizing Syntax Color Schemes for an example of a custom color scheme.
See the topic MAXScript Editor - Defining Custom Keywords for an example of generating user-defined keywords and styles using Keywords12 / style.MAXScript.23.