What is New in MAXScript > What was New in MAXScript in Previous Versions > What was New in MAXScript in 3ds Max 4 >

# What was New in MAXScript in 3ds Max 4

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 3ds 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 MAXScript / 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 3ds 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 MAXScript 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

UspawnDeflector 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:

Action Manager

ActiveX Controls in MAXScript Rollouts:

ActiveX Controls in MAXScript Rollouts

Asset Browser:

Asset Browser enhancements

Bones:

Access to the new node bone properties and methods

Bone Creation

Cache Modifiers:

Point Cache Modifier

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:

Interface: colorMan

Combustion:

Combustion

Constraints:

Path Constraint

LookAt Constraint

Orientation Constraint Controller

Position Constraint

Link Controller for Constraints

Controller Functions for use with Constraint Assignments

Context Filters:

Context Filters

Custom Attributes:

Scripted Custom Attributes

Depth of Field:

Depth of Field

Editable Patch:

Patches

Filters:

class id filter

Selection Filter

iDrop - drag and drop:

iDrop - drag and drop

Interfaces:

Interfaces

Core Interfaces

Other Interfaces

Inverse Kinematics:

HD IK controller chains can be assigned to existing hierarchies

IKLimb Solver

Materials:

Multi/Sub Material

Menu Manager:

Menu Manager

Mesher:

Mesher

Network Render Interface:

Network Render Interface

Node Handles:

Node Handles

Node vertexColorType:

Node vertexColorType

OLE Automation:

MAXScript.reg - Registery file

Parameter Wiring:

Parameter Wiring

Plug-In Manager:

Plug-In Manager

Quad Menu:

Quad Menu

Reactors:

Reactor controller

Render Elements Manager:

Render Element Manager

Scripted Plug-In:

type:#integer parameters in scripted plug-in parameter blocks

Scripted Plug-in Events

Scripted Cameras:

Scripted Cameras

Scripted Controllers:

dependsOn For Scripted Controllers

Matrix3 Scripted Controller

Scripted Manipulators:

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:

Spring Controller

System Tools:

System Tools

TrackBar:

Trackbar Interface

Trackviews:

Trackviews

Visual MAXScript:

Visual MAXScript

Xref Objects:

Xref Objects

Zip-file Script Packages:

Zip-file Script Packages

MAXScript Language Improvements in 3ds Max 4:

The following are new MAXScript methods for 3ds Max 4:

IsValidNode

getTextExtent

isActive <atmos>

isActive <renderEffect>

affectRegionVal

getMAXSaveFileName & getMAXOpenFileName

Language Improvements:

Affect Region Function

BinStream for Binary Reading and Writing

By Reference Parameter Passing

C++-style bracketing comments

Coercion of bitArray to array and integer arrays to bitArrays

Detecting Deleted Nodes

Dereferencing Operator

forceUpdate Function added to UVWUnwrap

hasProperty() function

Improved the Performance of Iterating and Indexing the 'selection' and '$' Object Sets

IsValidNode

Readable/Writable Checks

RubberBanding in pickObject() Function

SetDir

Shortcut system replaced

startObjectCreation()

Subanim Indexing Operator, [], on MAX Objects Now Takes Subanim Names

superclasses read-only global variable

Symbolic Pathnames

System Information

validModifier() function

Visible Class For '&' Reference Values

Controllers:

List Controllers

mapKeys() method

moveKeys function

Keys:

Bezier Keys inTangentLength and outTangentLength

Object Inspector Functions:

Class and Object Inspector Functions Enhanced

Renderer:

render() Function Re-entrant

SuperClasses:

Bitmap Manager - Function Published BMM control

Utilities, Global Utilities and Render Element plug-ins

Renderer

2 New Scripted Pug-in Superclasses:Scripted Camera and simpleManipulator

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:

maxOps

User Interface:

Angle UI element

CreateDialog

Curve Control

isActive (atmos)

isActive (renderEffect)

keyboard.escPressed

MAX Open & Save Dialogs

Menu and CUI Loading

mtlBrowser

SetBackground Method

mouseTrack() Function

snapMode

Spinner UI Item setKeyBrackets

Timer UI element

TimeSlider on/off toggle

Undo/Redo Dropdown Labels

Zoom to Bounds

Command Panels and Rollout Pages:

Customize The Order of Rollup Pages

MAXScript Dialogs and Rollout Floaters as Extended viewports

Rollout .Controls Property

Rollout Systems 'category' Mechanism

New Classes in 3ds Max 4:

New Classes in release 4

New MAXScript Interfaces in 3ds Max 4:

Core Interfaces:

Core Interfaces

Other 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:

Skin

Flex

UVW Unwrap

- Added/updated properties to the following objects/modifiers/controllers:

Attachment

Path

XYZ Controllers

Point Surf

Ringwave

Terrain

Point

Multimaterial(materialIDList, material1)

FFD_2x2x2(deformType)

FFD_3x3x3(deformType)

FFD_4x4x4(deformType)

FFD_Box(deformType)

FFD_Cyl(deformType)

MeshSmooth

Blur

Deflector

Gravity

PDynaFlect

POmniFlect

SDeflector

SDynaFlect

SOmniFlect

UDeflector

UDynaFlect

UOmniFlect

Wind

Arc

Circle

Donut

CV_Curve

Ellipse

Helix

Line

NGon

Rectangle

Point_Curve

SplineShape

Star

Text

CompositeMaterial (amount, baseMaterial)

RaytraceMaterial (enable_Raytraced_refractions)

SpaceFFDBox (deformType)

SpaceFFDCyl (deformType)

StandardMaterial (bounce, staticFriction, slidingFriction, ambient, diffuse, specular, selfIllumAmount, selfIllumColor, specularLevel, glossiness, soften)