What is New in MAXScript in 3ds Max 2010

The following page will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 2010. For details on each feature, please follow the links to the respective documentation pages.

For a list of changes made to the MAXScript Reference itself besides documenting new feature, see Documentation Changes in 3ds Max 2010.

New 3ds Max Features Exposure

The following new features have been added to 3ds Max 2010 and have been exposed to MAXScript:

Containers

Containers

Containers are helper scene objects that can be used to group self-contained content together, manage, publish and inherit the content on disk, including the ability to unload the content objects from memory.

Interface: Containers

The Containers interface provides management functions for working with the new Container objects.

Container : Helper

The Container Helper represents the object used to create and manage containers in the scene.

Modifiers

Quadify_Mesh : Modifier

The new Quadify_MeshModifier based on ProBoolean technology procedurally changes the topology of geometry objects to quads with user-defined size.

Welder : Modifier

The new WelderModifier based on Cloth technology procedurally welds vertices or normals.

ClothTearingMethods

Two new methods added to the existing Cloth Modifier to create and remove tears in the cloth.

xView Geometry Checker

xViewGeometry Checker Access

The XViewChecker feature provides means to interactively check geometry objects in the viewport for various error conditions.

Interface: XViewChecker

This Core Interface exposes properties and methods for interacting with the xViewChecker feature.

Interface: FacesOrientation

This Core Interface exposes the properties and methods of a flipped faces checker which shows the backfacing faces in a different color.

Interface: FlippedUVWFaces

This Core Interface exposes the properties and methods of an xView checker which shows flipped texture faces.

Interface: IsolatedVertices

This Core Interface exposes the properties and methods of an xView checker which shows isolated vertices not used by any faces.

Interface: MissingUVCoordinates

This Core Interface exposes the properties and methods of an xView checker which shows missing texture coordinates.

Interface: MultipleEdges

This Core Interface exposes the properties and methods of an xView checker which shows multiple edges.

Interface: OpenEdges

This Core Interface exposes the properties and methods of an xView checker which shows open edges (edges referencing only one polygon).

Interface: OverlappedUVWFaces

This Core Interface exposes the properties of an xView checker which shows overlapping texture faces.

Interface: OverlappingFaces

This Core Interface exposes the properties and methods of an xView checker which shows overlapping faces that typically cause Z-fighting in viewport and rendering.

Interface: OverlappingVertices

This Core Interface exposes the properties and methods of an xView checker which shows overlapping (not welded) vertices within a given tolerance.

Interface: TVerts

This Core Interface exposes the methods of an xView checker which detects T-Vertices where edges meet in the shape of the letter T and the edge loop flow is interrupted by a full polygon.

How To ... Develop A Face Area XView Checker - Part 1

How To ... Develop A Face Area XView Checker - Part 2

How To ... Develop A Face Area XView Checker - Part 3

How To ... Develop A Face Area XView Checker - Part 4

These tutorials show the creation of custom XView Checkers using MAXScript functions.

Bitmap Pager Exposure and Automatic Mode

Interface: IBitmapPager

This Core Interface exposes the new Bitmap Pager settings. The documentation also discusses the Heuristics involved in the Automatic Memory Limit calculations for the Bitmap Pager and the mental ray renderer.

3ds Max System Directories

New #pageFile enum added to the list of available system paths.

mental ray Renderer

Global Tuning Parameters Rollout

New properties added to the mental ray renderer to expose the new global tuning parameters for soft shadows, glossy reflections and glossy refractions precision.

Indirect Illumination Reuse FG and GI Disk Caching Rollout

New properties added to the mental ray renderer to control the reuse of FG and GI Caches and the interpolation of caches.

Processing > Translator Options Rollout > Memory_Options

New property added to the mental ray renderer to control the use of automatic and manual memory limit.

Trackview Locked Tracks

Interface: LockedTracksMan

New core interface exposing the ability to lock tracks to prevent their editing.

Trackview UI MixinInterface

New property . showUnlockedIcons added to the existing MixinInterface.

Interface: AnimLayerManager

New methods .getLayerLocked() and .setLayerLocked() added to the existing Core Interface.

Also added a method refreshAnimLayerPropertiesDlg() to the same Core Interface to refresh the Properties dialog.

Explorers

Interface: SceneExplorerManager

New methods AddLocalizableProperty() and AddLocalizableReadOnlyProperty() added to the existing interface to allow for localizable custom columns.

New methods CreateExplorer() and SetExplorerVisibleColumns() added to the existing interface to allow for creation of an Explorer with specific columns layout and setting the columns layout of existing Explorers.

New method clearAllExplorers() added to close all Scene Explorers and clear the Saved Scene Explorers menu list.

Interface: MaterialExplorerManager

This new Core Interface exposes the Material Explorer to MAXScript.

Display Gamma/LUT Correction

Interface: IDisplayGamma

Three new properties have been added to the existing Interface: .colorCorrectionPrefMode controls the preferred Color Correction mode which is now stored in an INI file and persists between files; .affectColorPickers and .affectMEdit control whether the Color Picker and the Material Editor will be affected by the Gamma settings.

MAX Commands

A new command max file preferences gamma added to the list of available MAX commands. It opens the Preference Settings dialog at the Gamma tab.

Viewport Shading

Viewport Shading Settings

A new maxOps struct method provides an object exposing several interfaces controlling various advanced viewport shading options like Soft Shadows, Ambient Occlusion and Exposure Control preview, as well as some experimental (unsupported) preview modes - Indirect Lighting and Depth Of Field.

Interface: IViewportShadingMgr

Two new properties added to the existing Core Interface to control the Ambient Occlusion interaction with transparency and the size of the Soft Shadows filter.

Interface: ViewportSSB

This new Core Interface exposes several properties and methods related to the control of Soft Shadows display in the viewports.

Interface: ViewportButtonMgr

This new Core Interface exposes a property to control the display of the Viewport Buttons.

Direct 3DCacheAllocation Query Functions

Three new functions allow the user to query information about the memory, face count and timing of the Direct3D Mesh Cache.

Another function allows the switching between single-threaded and multi-threaded Mesh Cache creation.

Editable Poly

EditablePoly Get/Set VertexColor,Illumination and Alpha

New methods were added to get and set the vertex color, illumination and alpha values of selected vertices and selected polygons.

EditablePoly Paint Deform

New methods added to commit and cancel the Paint Deform data.

Editable_Poly Polygon Material IDs Floater

Two new methods were added to toggle the visibility of a Material IDs Floater version of the Material IDs rollout, and to test the visibility of the floater.

Editable_Poly Polygon Smoothing Groups Floater

Two new methods were added to toggle the visibility of a Smoothing Groups Floater version of the Smoothing Groups rollout, and to test the visibility of the floater.

Edit Poly Modifier

Edit_Poly Polygon Material IDs Floater

Two new methods were added to toggle the visibility of a Material IDs Floater version of the Material IDs rollout, and to test the visibility of the floater.

Edit_Poly Polygon Smoothing Groups Floater

Two new methods were added to toggle the visibility of a Smoothing Groups Floater version of the Smoothing Groups rollout, and to test the visibility of the floater.

Asset Manager and Max File Metadata

Accessing AssetManager, AssetUser and Asset Metadata in MAX Files

The way external assets are created, managed and stored throughout 3ds Max has been rewritten from the ground up. New interfaces, objects and methods have been introduced to handle the Asset Data management:

Interface: AssetManager

A new Core Interface exposing methods to interact with the Asset Manager and AssetUser IObjects.

IObject:AssetUser

Instances of the new AssetUser Class are used to store and manage Asset Data.MAXScript filenames stored in Parameter Blocks can now be coerced to AssetUser Class Instances using the form '<object>.filename as AssetUser'.

MAX File Asset Metadata Stream Access

The.MAX file format now stores all asset data information in a separate stream as metadata which can be accessed and modified by external applications or MAXScript without loading the scene itself.Two methods provide read and write access to the Metadata stored in a .MAX file.

Interface: FileResolutionManager

This new Core Interface exposes methods for resolving asset files.

XRef Objects

XRefObject : Node

A new option dupMtlNameAction: added to the existing xrefs.addNewXRefObject() function to control the merging of materials with duplicate names.

mr_Proxy Object

mr_Proxy : GeometryClass

Two properties of the mr_Proxy exposed back in 3ds Max 2009 collided with node-level properties using the same name. To solve this, two new aliases were added to the .points and .scale properties of the mr_Proxy object. A note was also included in the documentation showing how the values could be accessed alternatively via the .baseobject property of the object.

OBJ Importer and Exporter Settings Access

ObjExp : ExporterPlugin

ObjImp : ImporterPlugin

The two OBJ I/O plugins now store their settings and presets in a pure ASCII INI file format which can be read and modified using the standard getIniSetting() and setIniSetting() MAXScript functions. Both expose methods to access the current INI file name and Preset INI file name.

Cloth

Cloth : Modifier

Several new properties to control the Welding, Pressure and Tearing features have been added to the Cloth Modifier.

Flight Studio

Interface: FlightStudio

Interface: FlightStudioExport

Interface: FlightStudioImport

Interface: FlightStudioImage

These interfaces were previously available in 3ds Max 2009 via the Flight Studio add-on for OpenFlight simulation database I/O and are now integral part of 3ds Max 2010.

User Interface Customization

Interface: qat

The qat interface allows the adding, swapping and removing of Action Items in the Quick Access Toolbar next to the Application Icon. This includes Action Items defined by MacroScripts.

Modify Panel Controls Access

Pin Stack Button

Three new methods added to the existing modPanel struct to access and control the state of the Pin Stack button of the Modify Panel.

Product ID and Language Access

Interface: maxOps

A new property maxOps.productID has been added to the existing interface to determine the "flavour" of 3ds Max the script is running on (3ds Max Entertainment or 3ds Max Design).

sysinfo.getMaxLanguage()

A new system information method has been added to return the 3ds Max Language.

Character Studio

Biped Knuckles And Short Thumb Properties

Two new properties added to control the Knuckles and Short Thumbs.

Biped Layers Retargeting Methods

Several new methods added to control the Biped Layer Retargeting.

Extensions

The following features were initially available as Extension to 3ds Max 2009 for Subscription members and are now an integral part of 3ds Max 2010:

ProOptimizer

ProOptimizer : Modifier

The ProOptimizer modifier provides advanced optimization capabilities.

Interface: BatchProOptimizer

The Batch ProOptimizer Interface allows the batch processing of optimization tasks.

ProSound Extension

ProSound Extension

The ProSound feature provides support for up to 100 sound tracks in stereo and exposes a number of functions to MAXScript.

Particle Flow Advanced

Birth_Paint : Helper

Birth_Texture : Helper

Initial_State : Helper

Group_Operator : Helper

Group_Select : Helper

Lock_Bond : Helper

Mapping_Object : Helper

Placement_Paint : Helper

Split_Group : Helper

Particle_Paint : Helper

The Particle Flow Advanced extensionprovides operators previously available in the Orbaz Particle Flow Toolbox #1.

Express_Save : Helper

The Particle Flow Advanced extension provides the Express_Save operator previously available in the Orbaz Particle Flow Toolbox #1 only for backwards compatibility when loading older scenes containing this operator. The functionality of the operator is now fully integrated into the core of Particle Flow and the operator is obsolete.

shapeLibrary: Helper

The Particle Flow Advanced extension provides a new default Shape operator replacing the old ShapeStandard Helper. The old operator can still be loaded and created by MAXScript, but is not exposed by the Particle Flow Depot anymore.

particleFlow Global Interface

Five new methods have been added to the existing ParticleFlow Interface to implement the cleanup functionality previously available in Orbaz Particle Flow Toolbox #1 via a Particle Flow Utility and a Utility Operator.

MAXScript Language Improvements

The following new features have been added to the MAXScript language in 3ds Max 2010:

Debugging

MAXScript Source Filename Access

Line Numbers are now supported by the MAXScript code tree, allowing error messages and the Debugger to report the line inside the code where an error or break occurred. The new method getSourceFileLine() returns the source file line number it is being called from.

Assert Function

The Assert() function made possible by the support for line numbers allows the developer to assert predicates inside the script code helping to reason about the correctness of the code's execution.

Struct Definitions

Private and Public Members in Structure Definitions

Struct Members (functions and variables) can now be declared as public or private to control their visibility to outside code and the Debugger.

Structure Creation and Cloning Event Handlers

Struct Definitions can now implement private event handlers which will be called on creation or cloning.

DotNet

DotNet Objects and Classes Life Time Control

In previous versions of 3ds Max, performing MAXScript garbage collection could cause DotNet event handlers to be deleted too early. Using a new method, this can be avoided.

MAXScript / DotNet Value Conversions

A new method was added to allow the explicit conversion of MAXScript values to DotNet values, specifically to facilitate the creation of DotNet Arrays from MAXScript arrays.

File and Directory Security Methods

External File Methods

Two new functions, getFileSecurityInfo() and isDirectoryWriteable() have been added to test the security attributes and accessibility of files and directories.

Executing External Commands

The existing hiddenDOSCommand() method has been updated to work correctly without specifying the optional start path argument. In previous releases, it failed if the start path argument was omitted. In addition, a new optional argument to provide access to the return code of the DOS Command via a by-reference variable has been added.

Node Common Methods

Node Common Methods-GroupMethods

Two new functions, attachNodesToGroup() and detachNodesFromGroup() have been added to MAXScript to mirror the Main Menu > Group > Attach and Detach operations.

Create Panel - Object Creation

isCreatingObjectMethod

The method will now return false if the argument is undefined to be consistent with the OkToCreate() method.

Custom Bitmap Compositing

pasteBitmap

The existing function has been enhanced to support a custom MAXScript function to composite two images into one. The function will be passed the colors and positions of the two pixels and returns the resulting pixel color. It will be called internally once per every pair of pixels that have to be combined and is faster than using getPixels() and setPixels() inside MAXScript FOR loops.

MAXScript User Interface Controls

Angle

Checkbox

Combobox

Curve Control

Dropdownlist

HyperLink

Listbox

MultiListBox

ProgressBar

Radiobuttons

Slider

New on rightClick do() handler added to the existing User Interface controls.

Spinner

New tooltip construction parameter and property added to the existing Spinner User Interface control.

Slider

New tooltip construction parameter and property added to the existing Slider User Interface control.

MacroScriptautoUndoEnabledParameter

New autoUndoEnabled construction parameter added to the existing MacroScript constructor to allow the disabling of automatic Undo record generation for the whole MacroScript body.

Group User Interface Item

User Interface controls' Event Handlers can now be included inside the body of a User Interface Group. Previously, including Event Handlers in Groups caused a Syntax Error.

Image Buttons

A new optional 9 th element is now supported by the images: construction parameter and property of buttons, checkbuttons, mapbuttons and materialbuttons to control the use of the Windows Color Theme.

Startup Script Loading Order Improvements

Startup Scripts

The loading order of startup scripts (especially those loaded from the \Startup folder) has been improved to allow #preFileOpen callback events to use code evaluated from the \Startup folder when loading a .MAX file via command line launching or drag-and-drop onto the 3ds Max desktop shortcut icon.

See Also