What was New in MAXScript in 3ds Max 6

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

Nodes

Align Pivot and Reset Transform Methods

New methods were added to provide access to the ResetXForm Utility functionality and to the Hierarchy Tab Pivot alignment and transformation resetting functions.

HideByCategory Properties and Methods

The hideByCategory structure provides properties and methods to control the Hide By Category checkboxes found in the Display panel.

General Node Properties

New properties .isNodeHidden, .isHiddenInVpt and .isNodeFrozen added for enhanced access to the Hidden and Frozen state of nodes.

Interface : INode

New . vertexColorMapChannel property exposed by INode Interface, new enum value #map_channel in . vertexColorType

Display Panel: Wireframe and Shaded Colors

New displayColor.wireframe and displayColor.shaded read/write variables. Valid values are #object and #material . These variables correspond to the Wireframe and Shaded radio buttons in the Display panel, Display Color rollout

Shapes

Arc : Shape, Donut : Shape, Ellipse : Shape, Helix : Shape, NGon : Shape, Rectangle : Shape, Section : Shape, Text : Shape

.sides property value class changed from Float to Integer in all the above classes.

Editable Spline Modify Panel Command Modes and Operations

startCopyTangent(), startPasteTangent() methods added to splineOps structure.

PolymorphicGeomshape : shape

New PolymorphicGeomshape Shape added.

StPathClass : shape

New StPathClass Shape added.

Spline Shape Common Properties, Operators, and Methods

applyOffset() and measureOffset() methods previously available in Autodesk VIZ added.

Geometry

Editable_Poly Properties

Added new .isolineDisplay property to control the Isoline Display.

BlobMesh : GeometyClass

New compound object class whose instances can turn any geometry or Particle Flow particle system into a Metaball system.

patchOps

New methods added to the patchOps structure: . growSelection, .shrinkSelection, .selectEdgeRing, .selectEdgeLoop, .patchSmooth, .toggleShadedFaces

PolymorphicGeom : GeometryClass

New PolymorphicGeom class added.

AEC Objects and Autodesk VIZ Features

Geometry - Doors and Windows

All Doors and Windows AEC Objects have been made available again in 3ds Max 6. These include Awning, BiFold, Casement, Fixed, Pivot, Pivoted, Projected, SlidingDoor and SlidingWindow.

Geometry - Stairs

Al Stairs AEC Objects are now available in 3ds Max 6.

These include L_Type_Stair,Spiral_Stair,Straight_Stair and U_Type_Stair : GeometryClass.

Geometry - AEC Extended Objects

All Extended AEC Objects are now available in 3ds Max 6. These include Foliage, Railing and Wall.

Luminaire : Helper

The Luminaire Helper class was introduced in Autodesk VIZ4 and is now available in 3ds Max 6.

ShineExp : UtilityPlugin

The ShineExp plugin and the related ShineExport Interface were introduced in Autodesk VIZ4 and are now available in 3ds Max 6.

DWG Import - Related Classes

A number of internal classes have been added. There is no MAXScript access to their properties or methods though.

ADT_Category : ReferenceTarget

This class provides access to the Category of Architectural Desktop objects Imported into 3ds Max

ADT_Style : ReferenceTarget

This class provides access to the Category of Architectural Desktop objects Imported into 3ds Max

Modifiers

Shell : Modifier

New Shell Modifier gives geometry objects thickness by extruding the surface by amount or using a control spline.

CamPerspCorrect : Modifier

New camera modifier for perspective correction, previously available in Autodesk VIZ.

Edit_Normals : Modifier

Several new methods added, existing methods enhanced. Modifier supports TriMeshes now.

MapScaler : modifier

Object-space version of the MapScaler. The original MapScaler WSM has been renamed to MapScalerSpacewarpModifier.

Unwrap_UVW : Modifier

New Unwrap3 interface providing access to AutoBackground and Relax functionality added to the Unwrap_UVW modifier.

New Skin Properties in 3ds Max 6

New properties added to the Skin modifier: . mirrorPlane, .mirrorOffset, .mirrorUseInitialTM, .mirrorEnabled, .mirrorThreshold, .mirrorProjection, .manualUpdate, .mirrorFast, .ignoreBoneScale, .rightJustifyBoneText

Skin Modifier

New Skin Mirror-related methods skinOps.pasteAllBones and skinOps.pasteAllVerts added to the SkinOps structure.

Interface: SkinUtils

New SkinUtils interface provides additional methods for controlling the Skin Modifier.

VertexPaint : Modifier

The original VertexPaint Class from older 3ds Max versions has been renamed to OldVertexPaint in 3ds Max 6. The new implementation has exactly the same class name but a different classID and completely replaces the old one.

UVW_Xform : Modifier

New properties added to the modifier: . Map_Channel,. Rotation_Angle, .Rotation_Center

Select_By_Channel : modifier

New Select_By_Channel modifier added.

UVW_Mapping_Add : modifier

New UVW_Mapping_Add modifier added.

UVW_Mapping_Clear : modifier

New UVW_Mapping_Clear modifier added.

UVW_Mapping_Paste : modifier

New UVW_Mapping_Paste modifier added.

Linked_XForm : Modifier

New property added to the modifier: .backTransform

Modifier Common Properties, Operators, and Methods

New property added to all modifiers: .enabledInRenders

Lights and Shadows

Adv__Ray_traced : Shadow

New . noAreaShadows property added to Adv. Ray Traced shadows generator.

Skylight : Light

New . rays_per_sample,.ray_bias and . castShadows properties explosed by Slylight. Removed the obsolete .rayengine property.

IES_Sky : Light

New .rays_per_sample, .ray_bias and . castShadows properties explosed by Slylight. Removed the obsolete .rayengine property.

IES_Sun : Light

Removed the following properties: .EmitterCausticPhotons, .EmitterDecay, .EmitterEnable, .EmitterEnergy, .EmitterGlobalIllumPhotons

Helpers

Substitute_Object : helper

New Substitute_Object Helper added.

Controllers and Trackview

Point4Controller : MAXWrapper

New point4Controller superClass added to 3ds Max. A number of Point4 controllers deriving from this superClass have been implemented. They support an alpha value and are used by DirectX and mental ray shaders.

'This' Local Variable in Scripted Controllers

The this local variable in scripted controllers will contain a MAXWrapper value wrapping the scripted controller.

Interface: trackviews

New #positionW, #alpha, #curveW, #boneobjects, #keyableTracks filter options added to the existing method trackviews.current.setFilter() . Also added a list of all valid filter names for this method's description. Same additions made to the setFilter() and clearFilter() methods in the Track View structure.

Materials and Maps

Architectural : Material

New Architectural Material

Standardmaterial_interfaces

New Interface ExposureMaterialControl added to Standard Material

RaytraceMaterial_interfaces

New Interface ExposureMaterialControl added to RaytraceMaterial

InkNPaint : Material

New property .samplerUseGlobal added to InkNPaint.

DirectX_9_Shader : Material

New material providing access to DirectX 9 shader files.

Material Common Properties, Operators, and Methods

The following new methods were added: getNumSubMtls, getSubMtl, setSubMtl, getSubMtlSlotName, getNumSubTexmaps, getSubTexmap, setSubTexmap, getSubTexmapSlotName

Material/Map Renderer Compatibility Method

The method areMtlAndRendererCompatible checks the compatibility between a material or texture map and a renderer class instance. It returns true when the map/material is supported by the specified renderer, false otherwise.

BitmapTexture : TextureMap

The new property .tieTimeToMatIDs corresponds to the new "Sync Frames to Particle Age" checkbox in the "Time" rollout.

FoliagetextureMap : TextureMap

A special textureMap class used by the Foliage GeometryClass.

Vertex_Color : TextureMap

New properties added to the Vertex_Color TextureMap (originally it had none): .map and .subid

MatEditor - Open and Close the Material Editor

New methods to open and close the Material Editor and check whether it is open.

Renderer

Renderers

New SystemGlobals .medit and .medit_locked added to the Renderers structure providing access to the Material Editor Renderer and the "Lock To Current Renderer" checkbutton in the Assign Renderer rollout of the Render Scene dialog. The .draft property has been removed.

New .supportsTextureBaking read-only boolean property added to all RendererClass classes.

New #mask channel name corresponding to the Sub-Pixel Mask channel in the RPF File Format added to the possible bitmap channels in the render method, Bitmap Values andScripted RenderEffect Plug-ins

Default_Scanline_Renderer : RendererClass

New Global Super-Sampler related properties .globalSamplerEnabled, .globalSamplerClassByName, .globalSamplerSampleMaps, .globalSamplerQuality, .globalSamplerAdaptive, .globalSamplerAdaptiveThresh exposed by the props interface.

Atmospheric Effects Common Properties, Operators, and Methods

New behavior:Calling editAtmosphere() or editAtmospheric() without an argument will open the Environment tab in the Environment and Effects tabbed dialog.

Render Effects Common Properties, Operators, and Methods

New behavior:Calling editEffect() without an argument will open the Effects tab in the new Environment and Effects tabbed dialog.

Controlling the Renderer

New parameter: rendSimplifyAreaLights lets the renderer simplify area lights by rendering them as point lights when appropriate.

New parameter: quiet plus related flags.

3ds Max System Globals

New system global: rendSimplifyAreaLights lets the renderer simplify area lights by rendering them as point lights when appropriate.

envEffectsDialog - Open and Close the Environment and Effects dialog

New methods to open and close the Environment and Effects dialog and check whether it is open.

TabbedDialogs - Controlling Tabbed Dialogs

New methods to control all Tabbed dialogs in 3ds Max including the Render dialog, Environment and Effects, Configure Paths, Object Properties etc.

Bitmap IO

RLA : BitmapIO

New BitmapIO Interface provides access to the options of the RLA file format.

RPF : BitmapIO

New BitmapIO Interface provides access to the options of the RPF file format.

mental ray

Mental_Ray_Renderer : RendererClass

Represents the mental ray Renderer.

Interface:mental_ray_Preferences

This Interface lets you enable and disable the mental ray Extensions..

MAXScriptExtensionsfor mental ray

This chapter lists some currently unsupported mental ray-related classes accessible through MAXScript.

Radiosity

Radiosity : RadiosityEffect

New methods added to the srrOps Interface: GetPointIlluminance, GetPointLuminance, GetPointReflectance, GetPointTransmittance. These methods let you script your own Lighting Analysis utilities.

Radiosity : RadiosityEffect

New Interface: srrRadiosityMesh provides access to the Radiosity Mesh and allows MAXScript access to the radiosity solution.

Interface: RadiosityPreferences

New property .updateDataWhenRequiredOnStart added, old property .displayWarningOnGIPropsChange removed.

Fix_Ambient : UtilityPlugin

New Utility for fixing the Ambient color for Radiosity processing by enabling the Ambient-Diffuse lock.

Vertex Colors

Interface: AssignVertexColors

This new Interface lets you assign vertex colors to a specified node, optionally specifying an existing VertexPaint modifier

Render Elements and Bake Elements

AlphaMap : BakeElement

New .targetMapSlotName property added to all Bake Elements.

diffuseRenderElement - superclass: MAXObject

New .lightingOn property added.

Lighting : RenderElement

New Lighting RenderElemen tadded.

Illumination_Render_Element : RenderElement

New Illumination RenderElement added.

MatteRenderElement : RenderElement

New Matte RenderElement added.

Lumination_Render_Element : RenderElement

New Lumination RenderElement added.

Utility Plug-ins

Channel_Info : UtilityPlugin

New UtilityPlugin provides Map Channel Info. No properties exposed.

Clean_MultiMaterial : UtilityPlugin

Cleans unused sub-materials in scene Multi-Materials.

Fix_Ambient : UtilityPlugin

Fix Ambient Color values in materials by locking them to the Diffuse Color for use in Radiosity calculations.

Instance_Duplicate_Maps : UtilityPlugin

Finds all duplicate materials Bitmaps and makes them instances instead of copies

Material_XML_Exporter: UtilityPlugin

A utility to export materials to XML format.

Panorama_Exporter: UtilityPlugin

A utility to export and view 360 degrees panoramas of 3ds Max scenes.

ShineExp : UtilityPlugin

Renders the active viewport to a TIFF file which includes luminance and illuminance data that can be used for lighting analysis.

SkinUtilities : UtilityPlugin

New Utility to extract Skin data to Mesh and import Skin Data from Mesh. No MAXscript properties or methods exposed.

Particle Flow

Shape_Mark : Helper

New properties .Surface_Offset_Variation and . Vertex_Noise added to the Shape_Mark helper.

Position_Icon : Helper

New property .Subframe_Sampling added to the Position_Icon helper.

rotation : Helper

New properties .Restrict_Divergence_To_Axis, .Divergence_Axis_X, .Divergence_Axis_Y, .Divergence_Axis_Z added to the Rotation helper.

reactor

MAXScript Extensions for reactor

All reactor Helpers, Spacewarps and Modifiers have been fully exposed to MAXScript.

Interface: reactorInterface

This Interface provides properties and methods to access the reactor Utility's settings and simulation data including collision information.

Interfaces

Interface: InstanceMgr

This new interface controls the new material propagation to instances and provides methods to collect instanced nodes and make nodes, modifiers and controllers unique.

Interface: blockMgr

New blockMgr Interface added.

Interface: styleMgr

New styleMgr Interface added.

Interface: ChannelInfo

This new interface gives access to the new Map Channel Info dialog and provides methods for managing the Map Channels of selected objects.

Interface: quadMenuSettings

A number of methods have been changed to use RGB colors instead of RGBA.

Interface: XMLMaterial

Provides means to export a material to XML format.

Interface: radiosityMeshOps

This Interface provides access to the internal radiosity mesh generated by the Radiosity Advanced Lighting effect

Interface: SkinUtils

This Interface provides access to some new Skin-related methods related to skin data import and export and bone binding transformation matrices.

Interface: mental_ray_Preferences

The mental_ray_Preferences Interface lets you enable and disable the mental ray Extensions.

Interface: renderpresets

The renderpresets Interface provides access to the new render presets system

Interface: globalDXDisplayManager

The globalDXDisplayManager Interface controls how DirectX shaders are being drawn in the viewports.

Interface: MtlBrowserFilter_Manager

Internal use, no properties or methods exposed.

Interface: SubstManager

Internal use, no properties or methods exposed.

Interface: FlowRaytraceInterface

Internal use, no properties or methods exposed.

Layers

Interface: LayerProperties

New .nodes() method added to the LayerProperties Interface, returns an array containing all nodes on the layer.

New layerAsRefTarg property returns the layer as ReferenceTarget.

Schematic View

Interface: SchematicViews

The SchematicViews Core Interface provides access to the updated Schematic Views system in 3ds Max 6.

Interface: SchematicView

This SchematicView MixinInterface provides access to the properties and methods of a single Schematic View.

Schematic View Callbacks

New Schematic View-related callbacks have been added to the General Event Callback Mechanism: #svSelectionSetChanged, #svDoubleClickGraphNode, #svPreLayoutChange, #svPostLayoutChange

MaxOps Interface Additions

Interface: maxOps

New #vizR enum value added to the .productAppId property.

New .autoGrid property enables/disables AutoGrid mode.

New #all and #other e num values added to .setKeyFilters .

New method startNewShape() pressed the Start New Shape button, new . startNewShapeLock property enables/disables "Start New Shape" mode.

New . inProgressiveMode read-only property, new method beginProgressiveMode() enables Progressive mode, new method endProgressiveMode() disables Progressive mode.

User Interface Items, Rollouts and Dialogs

Colorpicker

New parameter alpha :<boolean> added to the colorpicker UI item. When set to true , the color picker will open with alpha support.

CreateDialog

New optional lockHeight and lockWidth keywords added to CreateDialog . When set to true , the height resp. width of the dialog cannot be interactively changed

Utility and Rollout Properties, Methods, and Event Handlers

New .placement property valid for rollouts and rollout floaters gets/sets whether the dialog is minimized, maximized, or normal.

Scripted Plug-ins

Scripted Plug-ins

The new optional autoPromoteDelegateProps : parameter gives control over whether the delegate’s properties are automatically searched if a property access is performed on the plug-in, but the property is not defined by the plug-in.

Scripted Plug-in Event Handlers

New event handlers added :postCreate and postLoad .

Loading Scripted Plug-in Local Variable

The new .loading local variable in Scripted Plug-ins will return true while the plug-in instance is in the process of being loaded.

Rollouts and related Event Handlers

New optional keyword argument added to rollout definitions of scripted plug-ins that extend an existing class: usePBValidity.

classID

The Super Class ID and the Class ID

New optional keyword argument added to genClassID to allow a return value rather than printing to the Listener: returnValue.

Callbacks

General Event Callback Mechanism

Over 50 new callback events have been added to the system. The callbacks documentation has been reworked to list both callback names and notificationParam() return values together.

Watch for the NEW in 3ds Max 6 symbol!

External Files Access and System Information

3ds Max File Loading and Saving

New optional keywords added to mergeMAXFile: [#promptMtlDups|#useMergedMtlDups|#useSceneMtlDups|#renameMtlDups], [#promptReparent|#alwaysReparent|#neverReparent]

Two new optional parameters added to saveMAXFile : clearNeedSaveFlag and useNewFile .

System Information

New method added to the sysInfo structure: .getLanguage returns a 3 element array describing the current system language.

logsystem_Struct

New method added to the logsystem structure: .logEntry outputs a user-defined string to the Log File.

Accessing INI File Keys

The getIniSetting method has been enhanced. If only the .ini file is specified, the method will return an array of the sections in the .ini file. If only the .ini file and section are specified, the method will return an array of the keys in the section.

The new delIniSetting method will delete a specified key from the supplied section of the given INI file, or a complete section with all keys when only filename and section are supplied.

External File Methods

Accessing INI File Keys

The new getMAXIniFile() method returns the current 3dsmax.ini file as a string.

3ds Max System Directories

New #defaults value returns the market specific defaults directory.

SessionPathsStruct

Session paths are identical to bitmap/photometric paths and xref paths, except they are never saved when 3ds Max exits. A possible use for session paths is to create a project management system.

Command Line

Command Line Rendering

Provides access to the renderer from the command line, including pre-render scripts via MAXScript.

Command Line Option: -mxs

This new command line option allows the execution of MAXScript commands from the command line.

Command Line Option: -silent

This new command line option suppresses dialogs participating in the new Default Actions system.

Mouse Tools

Mouse Tool Clauses

New behavior: While running a mouse tool, if you click in a viewport where the construction plane is on edge, the tool will exit with a return value of #abort

Ray Mesh Intersection

RayMeshGridIntersect : ReferenceTarget

Provides advanced ray-to-mesh intersection methods.

Text Values

Stricmp String Comparison Method

This new method performs a lower-case comparison of two strings and returns an integer value.

Internet

Internet Methods

This new structure provides a .CheckConnection method used to check whether a connection to a specified URL can be established.

See Also