GENERATE/PREV.gifGENERATE/NEXT.gif

MAXScript Overview

The MAXScript language is specifically designed to complement 3D Studio MAX. It is object-oriented, just like MAX, and has several special features and constructs that mirror high-level concepts in the MAX user-interface, such as coordinate system contexts, an animation mode with automatic keyframing and access to scene objects via hierarchical pathnames that match the MAX object hierarchy. These make it both easy to understand for MAX users and provide an expressiveness that enables sophisticated tasks to be done with very little scripting.

The syntax is simple enough for non-programmers to use, with minimal punctuation and formatting rules. It is runtime-typed with type-free variables and memory management is automatic, again simplifying programming. Coupled with the modeless interactive command-line window and the ability to operate on sets of objects with a single statement, MAXScript can be employed casually by the user to augment the MAX UI.

MAXScript is also rich enough to enable extremely sophisticated programming tasks. It has all the necessary control structures and data types (such as 3D vector and matrix algebras), and advanced language features such as higher-order and recursive functions and lexical closures. MAXScript is particularly suited to working with large collections of objects, for example, making complex procedural selections, constructing random star fields or placing objects in numerically precise patterns. Some of these tasks are so tedious to do interactively that using a scripting language is sometimes the only practical approach.

MAXScript is particularly useful in the larger production houses. The ability to package scripts within utility panel rollouts means that job-specific tools can be rapidly scripted by the technical department and made available to artists through standard MAX point-and-click user interfaces.

MAXScript supports formatted text I/O, so it is possible to both read in files containing scene layout, naming and texture details, etc. exported from other project management software and to produce asset reports directly from MAX scene files.

MAXScript can also be used as a high-level import vehicle. At the moment, the import options available in MAX do not include the ability to import high-level MAX objects, modifiers, materials, animation controllers, etc. Further, the MAX file structure itself is opaque, so other programs cannot directly construct MAX scene files. However, by outputting MAXScript scripts containing object creation commands, it is now possible for other programs and packages to export directly to any of the high-level MAX constructs.