What's New in MAXScript in 3ds Max 2024
This topic will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 2024 and updates. For details on each feature, please follow the links to the respective documentation pages.
Note:
New in MAXScript in 3ds Max 2024.2 Update
Conform Modifier | The Conform : Modifier exposes the new conform modifier functionality to MAXScript. |
Data Channel Modifier | The Data Channel Modifier has a new MAXScript Process operator for modifying channel data via scripting. |
Python Callbacks | The callbacks.addScript() function can now take a fileName: keyword argument that is a Python script. |
Editor Improvements | The Scripting Editor now highlights all instances of a selected word. This behavior can be controlled with settings in the Properties File Settings. |
quiet Argument Consistency |
The importFile() , exportFile() , and resetMaxFile() functions now take a quiet keyword argument, which is consistent with quitMax() . |
New thehold members |
The thehold struct contains two new functions for getting the strings shown when you right-click the Undo and Redo buttons: getUndoNames() and getRedoNames() . |
Animation Time Scaling | A new maxOps function, GlobalTimeScale() , allows you to re-scale a segment of animation keys. |
LoadSaveAnimation Additions |
The LoadSaveAnimation interface contains new methods for getting map files and directories: getAnimFileDirectories() , getMapFiles() and getMultLoadAndMapFileFromDlg() . |
Scripting Editor File Commands | Two new commands have been added to the Scripting Editor File Menu: Copy Path (to copy the path of the current script to the clipboard) and Open Containing Folder (to open the folder for the current script). |
Nitrous Settings | Existing settings for controlling the display of textures in the viewport are now exposed to MAXScript via the NitrousGraphicsManager Interface: <ViewportViewSettingImpl>.UseTextureEnabled , <ViewportViewSettingImpl>.TextureSizeLimit , <ViewportViewSettingImpl>.ProceduralTextureSizeLimit , and <ViewportViewSettingImpl>.BackgroundTextureSizeLimit . |
New in MAXScript in 3ds Max 2024.1 Update
Set Scene File Name | The new setSceneFileName() function allows you to set or change the file name for the current scene. |
Deep Copy Optimization | The deepCopy() function now has a copyAllValuesAsUnique:boolean keyword parameter that improves performance when set to true . |
Ignore SSSE State Keyword | The safeExecute() , safeReadValue() and safeReadExpr() functions now have an ignoreSSSEState:<boolean> keyword argument that specifies, when true that restricted security policies are applied regardless of Safe Scene Script Execution state. |
BitArray Equivalence | The equivalence operators == and != are now implemented for BitArray Values. |
Array, Dictionary, DataPair Equivalence | The Array, Dictionary, and DataPair values can now be compared using the deepEqual() function. |
Intervals | Two new constructor options have been added for creating Interval Values: #forever and #never . |
User Properties | Two new functions allow you to get and set user-defined properties on nodes using Dictionary values: getUserPropsAsDict() and setUserPropsAsDict() . |
Color Conversion | The ColorPipelineMgr interface has a new ConvertColor() method for converting a color (as a Point4) in one color space to another.There is also a new global colorConvert() method for converting a bitmap from one color space to another. |
SME File Drop Callback | The Slate Material Editor SME Interface has a new property, .fileDropCallback , that allows you to handle files dragged and dropped into the editor with a callback. |
Boolean Modifier | A new interface BooleanModifierInterface has a single property .saveFinalResult that allows you to turn off caching so that scenes are compatible with 3ds Max 2024. |
SME NodeView Methods | New methods have been added to the NodeView interface for selecting and laying out nodes: GetSelectedSceneMaterials() , GetAllSceneMaterials() , and LayoutAll() . |
New in MAXScript in 3ds Max 2024
Boolean Modifier | Functionality for the new Boolean Modifier is exposed in the BooleanMod : Modifier. |
Color Pipeline Manager Interface | The new ColorPipelineMgr interface exposes properties and methods for the new OCIO color management feature, as well as legacy gamma mode color management. |
IDisplayGamma |
This interface is now deprecated, the new ColorPipelineMgr interface should be used instead. These properties are removed from the IDisplayGamma interface: LUTFileName , affectColorPickers , and affectMEdit . The #LUT enum is removed from colorCorrectionPrefMode . |
Color Management Viewport Settings | Several new properties are added to the ViewportViewSettingImpl interface for color management-related settings: .ColorPipelineViewTransformEnabled , .ColorPipelineAffectsBackground , .ColorPipelineSceneLinearExposure , .ColorPipelinePostDisplayGamma , .ColorPipelineViewTransform , .ColorPipelineDisplaySpace , and .ColorPipelineRenderingSpace .Two new settings on NitrousGraphicsManager : .ViewportColorPipelineOCIOBased and .ColorPipelineTargetFormat |
Pass-through modifier object type | The EmptyModifier no longer converts the incoming object to a mesh on the stack. |
Bitmap values | The Bitmap object has several new read-only attributes added as part of the new Color Management support, and the openBitmap() method has a new optional colorSpace: keyword parameter. There is are also new validateColorSpace() and SetOutputColorConversion() methods for bitmaps. |
Material Switcher | The new Material_Switcher class exposes the functionality of the new Material Switcher. |
Compound Material Nodes | The Slate Material Editor now supports compound nodes to collect and organize complex shader graphs. This feature is exposed to MAXScript with the Compound , CompoundIO , CompoundMember and CompoundIndexedConnection interfaces, as well as new methods in the SME NodeView interface: PackageNodesIntoCompound() , PackageSelectionIntoCompound() , UnpackageCompound() and EditCompound() . |
Other Changes | |
SME Compound Node | The Slate Material Editor jas a new Compound node that allows you to combine complex shader graphs into a single node object. |
Display Editor Setting | You can now specify whether to display a running script that encounters an error in the Scripting Editor. This setting is exposed as preferences.displayScriptEditorOnError and scriptEditor.displayOnError , and on the Preferences > MAXScript dialog as Display Editor On Error. The new scriptEditor struct exposes two other properties: hwnd and isVisible . |
Controller Removal | Now you can easily remove a property controller by setting the controller value to undefined using setPropertyController() or setting the <object>.<property>.<controller> . |
Display Warning Settings | Two settings for displaying warnings are now exposed as system globals: preferences.displayTopoMessage and preferences.displayCollapseMessage . |
WindowStream Handle | The <WindowStream> value has a new property .hwnd , which contains the windows handle for its associated Script Editor window. |
New Windows Functions | The windows struct has several new functions: windows.isWindow() , windows.isWindowVisible() ,windows.showWindow() , windows.getWindowPlacement() , windows.setWindowPlacement() , windows.setFocus() , windows.setForegroundWindow() , windows.getWindowLong() , and windows.setWindowLong() . |
Windows Functions Parameters | All windows struct functions that take a HWND argument for the window to operate on now can take a RolloutFloater, Rollout, or the main 3ds Max window (specified by the name #max ), making it easier to operate on these types of windows without having to query their window handle first. |
Disable error tracebacks | The new errTracebackDisabled system global specifies whether to disable error tracebacks in the listener window. Intended for testing / internal use only. |
Disable / enable change handlers | The <ChangeHandler> value has a new .enabled property that allows you specify whether the handler is enabled. This allows you to disable handlers without having to de-register or delete them. |
Spinner UI Control Properties | The spinner UI control has a new property autoscale:<boolean> , and these existing creation keyword parameters are now exposed as properties that can be accessed at runtime: scale and type . |
Assert Functions | Two new Assert Functions have been added: assert_eulerAngles_equal() and assert_matrix_equal() . |
Make Preview Dialog | Some missing parameters from the Make Preview dialog are now exposed to the createPreview() method: dspCamViewName , autoPlay , vpPreset , vpStyle , and vpEdgedFaces . |
XRef Improvements | The objXRefMgr.AddXRefItemsFromFile() method now takes a new keyword parameter objHandles which allows you to specify an array of node handles to merge. The xrefOptions parameter has a new option #mergeChildren , which allows you to specify whether or not to merge the children of specified objects.The same options are also available in mergeMaxFile() : #mergeChildren option and mergeByHandles parameter. |
Viewport | The FixedViewportPipeline interface has two new methods: SetViewportShadingFragment() and RestoreDefaultShadingFragment() . The SetShadingFragment() method is now deprecated. The NitrousGraphicsManager interface has two new methods: SetDefaultViewShadeFragment() and ResetDefaultViewShadeFragment() . |
Scripted Plug-ins | Scripted plug-ins have two new event handlers for when they are added or removed as custom attributes on objects: on refAdded and on refDeleted . |
File Information | The new getMaxFileObjects() function is similar to the existing getMaxFileObjectNames() , but returns an array of node information including node handles. |