MAXScript Editor - Defining Custom Keywords

 

   

MAXScript Editor

   

MAXScript Editor Property File Settings

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 to include user-defined keywords that are not part of the MAXScript language.

This could be used for example to highlight project-specific variable names etc.

Global Settings

To define custom keywords to be colorized in the source code of MAXScript files, follow these steps:

NOTE:If you don't have enough access rights to save the file to the root folder of 3ds Max due to the User Account Control (UAC) settings of your Windows OS, please see the Local User Settings section further on this page.

The resulting formatting should look something like this:

Modifying The Color And Style Of Custom Keywords

As you can see, the default color for user-defined keywords is red and the style is bold italic.

As mentioned in the remark to the keywords12 definition in the MAXScript.properties file, keywords are ALWAYS checked for in the user-defined list before checking the language-specific definitions (which in the case of MAXScript are exported automatically).

In the above example, the keywords "and" and "for" are colorized as part of the language (logical AND operation and FOR loop). If we would include them in our custom keywords list, they would be colorized in brighter blue instead of dark blue and would override the language-specific settings:

Local User Settings

On modern Operating Systems like Vista and Windows 7 with User Account Control (UAC) enabled it might be impossible to modify the factory settings provided by the MAXScript.properties file becase the file is located in the root of 3ds Max. For that reason, it is advisable to provide the custom settings using the "User Options File" also available through the Tools menu of the Editor.

 

MAXScript Editor

MAXScript Editor Property File Settings