MAXScript has been greatly expanded in 3ds max 4 so that almost all actions in the software are now scriptable. Much of this exposure is due to Function Publishing and interfaces. Additionally, the exposure is an automatic result of more plug-ins moving from ParamBlocks to ParamBlock2s. The remaining exposure used the MAXScript SDK to expose functions to MAXScript.
Note: ParamBlock2s make it possible for plug-ins to host all of their user visible parameters in one or more parameter blocks, including complex parameters such as ReferenceTargets, Sub-Anims, dynamic parameter tables (Tabs<>), and class parameters. The parameter blocks handle old-version loading and reference management automatic. They augment the Parameter Map mechanism to provide automatic UI for the new parameter types including common MAX controls such as node pickers, texmap selectors, etc. as well as listboxes for tabular parameters and, further, to automate the construction of ParamMaps and ParamDlgs in common situations. Additionally, ParamBlock2's provide a system that describes all the parameter blocks and parameters of a plug-in along with a metadata 'reflection' API so that systems like the MAXScript, the Macro Recorder, Schematic View, and custom exporters can access plug-in data automatically. This metadata includes version and position-independent parameter IDs and both localized and fixed machine-parsable names for all classes and parameters. This helps to address version compatibility and scripter / exporter localization issues.
For design details, see the SDK help file topic, "Parameter Blocks and Maps in Release 3."
Note: The MAXScript SDK is a set of Visual C++ headers and import libraries that C++ programmers can use to extend MAXScript. These extensions can be in the form of new built-in functions, new system globals or descriptors for new MAX plug-in class properties. This is useful for 3rd-party plug-in developers to write custom scripting interfaces for their plug-ins, and for programmers to do custom C++ performance code and drive it with scripts for hybrid tools.
The scripter SDK allows extensions to be added either incrementally through a MAXScript-specific DLL file type that is loaded by MAXScript or by runtime calls directly to MAXScript from within an existing plug-in.
For design details, see the SDK help file topic, "MAXScript SDK."
Note: The areas in this documentation exposed by Function Publishing will document the interface information provided by the "showInterfaces" function, in three sections: Properties, Methods, and Actions. In the Properties section, each property exposed by the interface is listed along with its data type or enumeration values and whether the property can be read and written to. In the Methods section, each method is listed along with its return type and its argument list. The value type for each argument is shown. If the return type is shown as <void>, the method returns a value of 'ok'. Methods that are used by Actions are commented as such. These methods typically require that the object be selected and active in the appropriate command panel. In the Actions section, each Action is listed along with its category and action description as shown in the Customize User Interface dialog, and the shortcut keys, if any, assigned to the Action.
The following topics are new to MAXScript:
Learning MAXScript - Walkthrough tutorial for beginning MAXScript users.
Additional Notes:
The name of the atmosphere in releases prior to 3ds max 4, known as the "Combustion effect" is now called "Fire_Effect".
The following deflectors have been renamed:
Pspawnflector is now POmniflect
Sspawnflector is now SOmniflect
Uspawnflector is now UOmniflect
Any scripts with these objects should be updated with the correct names.
The following are new MAXScript features in 3ds max 4:
Action Manager:
ActiveX Controls in MAXScript Rollouts:
ActiveX Controls in MAXScript Rollouts
Asset Browser:
Bones:
Access to the new node bone properties and methods
Cache Modifiers:
CallBack Notification Codes:
RenderEffect Progress Callback Mechanism - You can control the main RenderEffects dialog progress bar using several callbacks.
Notify Callbacks for Animate button on and off Transitions
Color Manager:
Combustion:
Constraints:
Orientation Constraint Controller
Link Controller for Constraints
Controller Functions for use with Constraint Assignments
Context Filters:
Custom Attributes:
Depth of Field:
Edit Mesh:
Editable Patch:
Filters:
iDrop - drag and drop:
Interfaces:
Inverse Kinematics:
HD IK controller chains can be assigned to existing hierarchies
Materials:
Menu Manager:
Mesher:
Network Render Interface:
Node Handles:
Node vertexColorType:
OLE Automation:
MAXScript.reg - Registery file
Parameter Wiring:
Plug-In Manager:
Portable Licence Manager:
Quad Menu:
Reactors:
Render Elements Manager:
Scripted Plug-In:
type:#integer parameters in scripted plug-in parameter blocks
Scripted Cameras:
Scripted Controllers:
dependsOn For Scripted Controllers
Scripted Manipulators:
Scripted Objects:
on detachedFromNode For Object Scripted Plug-ins
Scripted RenderEffects:
RenderEffect Progress Callback Mechanism
Scripted Rollouts:
Multi-line editText UI items in Scripted Rollouts
Spring Controller:
System Tools:
TrackBar:
Trackviews:
Visual MAXScript:
Xref Objects:
Zip-file Script Packages:
MAXScript Language Improvements in 3ds max 4:
The following are new MAXScript methods for 3ds max 4:
getMAXSaveFileName & getMAXOpenFileName
Language Improvements:
BinStream for Binary Reading and Writing
By Reference Parameter Passing
Coercion of bitArray to array and integer arrays to bitArrays
forceUpdate Function added to UVWUnwrap
Improved the Performance of Iterating and Indexing the 'selection' and '$' Object Sets
RubberBanding in pickObject() Function
Subanim Indexing Operator, [], on MAX Objects Now Takes Subanim Names
superclasses read-only global variable
Visible Class For '&' Reference Values
Controllers:
Keys:
Bezier Keys inTangentLength and outTangentLength
Object Inspector Functions:
Class and Object Inspector Functions Enhanced
Renderer:
SuperClasses:
Bitmap Manager - Function Published BMM control
Utilities, Global Utilities and Render Element plug-ins
2 New Scripted Pug-in Superclasses
Globals and Locals:
Definition Constructs Can Include Global Variable Declarations At Top Level
Changes to Undeclared Implicit Global Variables
Material Editor, Material and Textures:
Accessing The Material Editor Active Slot
BitmapTex Reload and viewImage
BMP, PNG, JPEG and TGA I/O Interfaces
Material Level Show-in-viewport State
Maxops:
User Interface:
Spinner UI Item setKeyBrackets
Command Panels and Rollout Pages:
Customize The Order of Rollup Pages
MAXScript Dialogs and Rollout Floaters as Extended viewports
Rollout Systems 'category' Mechanism
All Const and MAXScript Functions in 3ds max 4:
New Classes in 3ds max 4:
New MAXScript Interfaces in 3ds max 4:
Core Interfaces:
Other Interfaces:
The following topics contain updates to previous MAXScript documentation:
General Event Callback Mechanism - New notifications (everything from #systemPreReset down is new)
Defining Macro Scripts - Explanation of how the memory stack treats local macro script variables. (only need to review the one paragraph - "Normal locals are visible...")
Editable_Mesh : GeometryClass and TriMesh : Value - New MeshOps, including sub-object support.
New properties/methods in:
Added/updated properties to the following objects/modifiers/controllers:
Multimaterial (materialIDList, material1)
FFD_2x2x2 (deformType)
FFD_3x3x3 (deformType)
FFD_4x4x4 (deformType)
FFD_Box (deformType)
FFD_Cyl (deformType)
CompositeMaterial (amount, baseMaterial)
RaytraceMaterial (enable_Raytraced_refractions)
SpaceFFDBox (deformType)
SpaceFFDCyl (deformType)
StandardMaterial (bounce, staticFriction, slidingFriction, ambient, diffuse, specular, selfIllumAmount, selfIllumColor, specularLevel, glossiness, soften)