What was New in MAXScript in 3ds Max 2009

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

Viewport

Viewport Navigation Tools

Interface: SteeringWheelsOps

This new interface exposes all settings of the Steering Wheel viewport navigation system.

Interface: ViewCubeOps

This new interface exposes all settings of the View Cube viewport navigation system.

Viewport Shading

Interfac e: IViewportShadingMgr

New property added to the existing IViewportShadingMgr Interface to set the maximum number of active lights in the viewports.

Two more properties and five methods were available but not documented in 3ds Max 2008 and have now been included.

Viewport Access

Accessing Active Viewport Info, Type, and Transforms

New index: optional keyword parameter added to viewport.getType() and viewport.getCamera() to query viewports by index instead of the active one.

Viewport.GetID

New method viewport.getID() added to returns the ID of an indexed viewport. When a viewport is maximized, its index will be 1 but its ID will be the viewport's index when not maximized.

Texture Mapping

Texture Maps

CompositeTextureMap : TextureMap

The Composite Map has been completely reimplemented, while still providing backwards compatibility with old scenes containing the previous version of the map.

Color_Correction : TextureMap

The new Color_Correction TextureMap provides means to alter the color information of an incoming texture map by modifying its Brightness, Contrast, Saturation, Exposure, Gain, Gamma, Color Channels and so on.

Unwrap_UVW Spline Mapping

Unwrap_UVW Modifier - Spline Mapping

New properties and methods have been added to the Unwrap_UVW modifiers, exposing the new Spline Mapping functionality.

Lighting and Rendering

Image Viewer (a.k.a. VFB or Rendered Image Window)

Image Viewer DisplayNotifications

Two new notifications added to the General Event Callbacks: #preImageViewerDisplay and #postImageViewerDisplay

Interface: IVFB

This new interface is returned as notification parameter of the above callbacks before or after a Rendered Frame Window or Image Viewer is opened and can be used to customize the custom User Interface panels.

Rollout Adding and Removing

A new optional keyword border: has been added to the existing addRollout() method to allow for borderless rollouts in the Image Viewer.

Interface: EditRenderRegion

This new interface provides access to the new Render Region rubberband gizmo in the Rendered Image Window and in the Viewport.

Controlling the Renderer

A new optional keyword pos: has been added to the render() method to allow the opening of the Rendered Frame Window (also known as Virtual Frame Buffer) at a particular location of the screen or at the last known position (the new default behavior).

Render Scene Dialog (a.k.a. Render Setup Dialog)

Viewport Index, Lock Button and Render Presets

New properties have been added to expose the Lock Button, Viewport Index list and Last Used Render Presets list at the bottom of the Render Scene Dialog.

mental ray Renderer

mentalray renderer > Rendering Algorithms Rollout > Raytrace Acceleration

A new BSP2 option has beenadded to the existing . RaytraceMethod property,theold Grid and Large BSP options have been removed.

mental ray renderer > Rendering Algorithms Rollout > Trace Depth

Two new .ReflectionsEnable and . RefractionsEnable propertieshave been added tothemental ray renderer to enable and disable trancing ofreflections and refractions.

mentalray renderer > Rendering Algorithms Rollout > Subset Pixel Rendering

The new .enable_subset_pixel_rendering propertyhas been added to mental ray renderer to enable and disable the rendering of changed objects only.

mental ray renderer > Translator Options Rollout > Geometry Caching

The new .Enable_Geometry_Cache, .isGeometryCacheEmpty and .LockGeometryCache properties have been added to the mental ray renderer to control the caching of geometry between iterative renders.

mental_ray_renderer_functions Interfaces

This new interface exposes properties and methods related to managing Final Gather Presets, Final Gather Maps and the clearing of the Mesh Cache.

mental ray Proxy

mr_Proxy : GeometryClass

This new geometry object allows the creation of proxy files on disk which can be loaded by mental ray at render time. This lets you replace very complex geometry with simple stand-ins and load their actual geometry ony when rendering.

mental ray Lights

mr_Sky : light

Several new properties have been added to the existing mental ray Sky light.

Photometric Lights

Photometric Light Classes

The Photometric Lights have been rewritten to allow easier creation, conversion between all types and more Area Light shapes.

Photometric Lights Common Properties, Operators, and Methods

All Photometric Lights share the same set of properties and methods. The list of properties has been updated and has also been redesigned to reflect the order the related controls appear in the User Interface.

Daylight System Assembly Head

DaylightAssemblyHead : Helper

New properties and methods related to weather file handling have been added to the Daylight Assembly Head helper.

Hair and Fur

HairEffect : RenderEffect

New properties have been added to the Hair RenderEffect, exposing the tile memory usage and transparency depth parameters and the Global Illumination/Skylight options.

Lighting Analysis Tools - 3ds Max Design Only

Lighting_Analysis_Overlay : RenderEffect

This new Render Effect allows the generation of lighting analysis data in screen or world space.

Lighting_Analysis_Data : RenderElement

This new Render Element can be used to output the lighting analysis data to an image file.

LightMeter : Helper

This new Helper can be used to define lighting analysis grids in world space to be used in conjunction with the Lighting Analysis Overlay RenderEffect.

Interface: LightMeterManager

This new Interface provides tools to perform lighting calculations and CSV file data export using any number of active LightMeter Helpers in the scene.

Interface: DaylightSimulationUtilities

Interface: DaylightSimulationUIOps

These two new Interfaces provide access to the functionality and the User Interface of the Daylight Simulation Utility.

Interface: PseudoColorManager

This new interface can be used to set up the PseudoColor range and type (Linear or Logarithmic).

Interface: LuminosityUtil

This new interface exposes a method for converting RGB data into Illumination data by taking into account the different contribution of the three channels.

Scripting Tools

User Interface Controls

Label

An optional keyword argument style_sunkenedge: has been added to the existing Label control to display a half-sunken border around it.

Button

Checkbutton

Mapbutton

Materialbutton

An optional keyword argument border: has been added to the existing Button controls to control the display of the border around them. When set to false, the button will appear as one with the UI background. This keyword is NOT available in the pickbutton control.

Checkbox

Dropdownlist

An optional keyword argument tooltip: and a tooltip: propery have been added to the existing Checkbox and Dropdownlist controls to get and set a tooltip string. Also note that 3ds Max 2009 will now automatically split long tooltips into multiple lines.

Binary Search In Array

Bsearch()Method

Using Bsearch For Fast Table Lookup

The new bsearch() method isused to efficiently find an item in a sorted array.

Network Manager

Interface: NetworkManager

This new Interface exposes a method to send emails via MAXScript.

Macro Recorder Performance

The Macro Recorder

The performance of the Macro Recorder when selecting a large number of objects has been improved significantly.

Miscellaneous MAXScript Additions

Accessing the Last Rendered Image

An option was added to the getLastRenderedImage() method to copy the image or reference the same bitmap value as the renderer.

General Event Callback Mechanism

Two options were added to the callbacks.show() method to show callbacks by type and/or by ID.

Interface: batchRenderMgr

Two properties of the batchRenderViewOps interface were hooked up to incorrect methods internally, making it impossible to access the scene state name and the enabled property. These have been fixed.

See Also