This topic will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 2022 and updates. For details on each feature, please follow the links to the respective documentation pages.
New additions to MAXScript in 3ds Max 2022 are marked with NEW in 3ds Max 2022:... throughout the MAXScript Reference. The word NEW links back to this page.
Error Dialog Improvements | When an auto-loaded startup script contains an error, the error dialog now displays the full script path and name in the dialog itself, rather than in the title bar where it can be truncated. The line number is also displayed. |
New Unwrap UVW Pack Option | The Unwrap_UVW.pack() method has a new option for the method argument to specify the Unfold3d algorithm. |
Startup Scripts and Hidden Directories | In previous versions, startup scripts that were in a directory tree where any directory in the tree was hidden would not load. This meant that the 3ds Max install directory or directories above it could not be set to hidden. Now you can set the 3ds Max install directory or directories above it to hidden, and startup scripts contained in them will be loaded. |
LookAt_Constraint Defaults | The default values for two LookAt_Constraint properties have changed. The .lookat_vector_length property now defaults to 0.0, and .viewline_length_abs defaults to false . |
Previously undocumented items | The .AutoExpand property of the SceneExplorerInterface is now documented.The MultiOutputChannelTexmapToTexmap class is now documented. The "Updates" flag for INodeExposureR.isExposed() is now documented. |
Hyperlink Control | When a hyperlink control in an embedded scene script is clicked, a security warning dialog is displayed to confirm that the user trusts the target website. |
INI Default Value | The getINISetting() function now takes an optional defaultValue keyword parameter that defines a value to return if the specified key is not found. |
Text File Encoding | The new getEncoding() function returns the character encoding of a specified text file. |
Bitmaptexture Output | Two new properties are added to the TexOutputClass class to expose previously unexposed UI controls: .enableColorMap and .useRGBColorMap . |
Auto Backup | New methods have been added to the autosave interface: secondsUntilNextAttempt() , canProceed() and isRequired() . |
Mouse Window Capture | The windows struct has a new function, getCapture() , that returns the HWND of the window that is capturing mouse input. |
Safe Script Execution | The safeExecute() function is a new version of execute() that always evaluates the string expression as if Safe Scene Script Execution is enabled.The .end() RolloutCreator function now has an optional executeDefinition:<bool> to specify whether to evaluate the rollout definition using safeExecute() . The safeReadValue() and safeReadExpr() functions are new versions of readValue() and readExpr() that always evaluates the value or expression as if Safe Scene Script Execution is enabled. |
Script Planting Mitigation | To reduce the risk of script planting, the way 3ds Max searches for and loads scripts has changed. The list of directories searched is reduced to the currently running script directory (if applicable), the user scripts directory, and the 3ds Max system scripts directory. Windows system directories and directories in the PATH are no longer searched. This change affects any function that can take an unqualified script name, including fileIn() , callbacks.addScript() , the mzip utility, and the Particle Flow script operator. This change also affects how startup.ms is searched for. |
String to point conversion | You can now use the as operator to coerce string values to point2, point3, or point4 values. |
Dynamic Script Type | The getCurrentScriptSourceType() function has a new possible return type, #dynamicScript . |
Viewport Settings | The ViewportViewSettingImpl object representing current viewport settings has a new AmbientOcclusionSamples property. |
Environment Variables | The systemTools struct has a new getEnvVariables() function that returns an array of all currently defined environment variables |
Safe Scene Loading | The new getCurrentScriptSourceType() function returns whether the current script has the Safe Scene Script Execution security policies applied to it. The new SceneScriptSecurityManager interface lets you obtain information about the state of Safe Scene Script Execution. |
Box2 and Box3 | New methods and operators have been added. Operator +, enlargeBy() and expandToInclude() for Box2, and Operator + for Box3 |
Bounding Box property | These value types have a new .boundingBox property that returns a Box3 value representing the contained nodes' bounding box: node, NodeChildrenArray, pathname, SelectionSetArray, and ObjectSet. |
Bounding Box methods | The Node bounding box methods nodeGetBoundingBox() and nodeLocalBoundingBox() now take an optional asBox3:<bool> argument that, when true, cause the methods to return the bounding box as a Box3 value. |
Spinner and Slider controls | The type of the value returned by the .value property and on changed event for both the Spinner and Slider ui controls now matches the type of the control specified when it was created, either #float or #integer. |
Custom Attributes array | The Custom Attributes virtual array class MAXCustAttribArray now supports the isDeleted() method as well as standard comparison operators == and != . |
Non Localized Name Access |
Scripted Plug-in Parameters can take a new nonLocalizedName:<string> that defines the parameter name when it is accessed in a script The maxclass value has a new read-only nonLocalizedName property that contains the non-localized name of the class. |
ATSOps | New keyword arguments have been added to ATSOps methods GetDependencyFileList() and SelectFiles() to control how to repath and compare files. |
Localized Name Access | Several methods now have a localizedName:<bool> parameter (or localizedNames:<bool> when they return an array) to control whether they return the localized or non-localized name for the target object: getObjectName() getSubAnimName() getSubMtlSlotName() getSubTexmapSlotName() getClassName() WM3_MC_GetName() WM3_MC_SetName() getSubAnimNames()
|
Previously Undocumented Items | Box2 methods: <bool>intersects() , <box2>copy() Box3 methods: <box3>copy() , <box3>rectify() pathConfig struct methods: doSetProjectFolderSteps() and doSetProjectFolderStepsUsingDirectory() <ViewportViewSettingImpl>.ProgressiveRenderingEnabled
|
Deprecated Items |
Airflow_Node and Airflow_Spline are now deprecated |
Several terms in the 3ds Max user interface, class, and method names in MAXScript have been changed or removed because they were not aligned with Autodesk values of diversity and inclusion. We want everyone to feel welcome when using 3ds Max as an end user or tool developer.
Therefore, the names of several MAXScript APIs that included words such as "master" or "slave" have been changed to use the terms "driver" and "driven" respectively. We tried to keep MAXScript as backward compatible as possible; however, there may be cases where scripts break.
Here is a list of all the MAXScript API names that were updated, followed by their new name:
BipSlave_Control -> BipDriven_Control
GetMasterController -> GetPointControllerContainer
NewDefaultMasterPointController -> NewDefaultPointControllerContainer
Master_Controller_plugin_not_found -> Driver_Block_Control_plugin_not_found
Master_Point_Controller -> Point_Controller_Container
MasterPointController -> PointControllerContainer
RetimerMasterCtrl -> RetimerDriverCtrl
Slave_Control -> Driven_Control
Slave_Point3 -> Driven_Point3
SlaveFloat -> DrivenFloat
SlaveMatrix3 -> DrivenMatrix3
SlavePoint3 -> DrivenPoint3
SlavePoint4 -> DrivenPoint4
SlavePos -> DrivenPos
SlaveRotation -> DrivenRotation
SlaveScale -> DrivenScale
Daylight_Slave_Controller -> Daylight_Driven_Controller
Daylight_Slave_Intensity_Controller -> Daylight_Driven_Intensity_Controller
Sunlight_Daylight_Slave_Controller -> Sunlight_Daylight_Driven_Controller
Sunlight_Daylight_Slave_ControllerMatrix3Controller -> Sunlight_Daylight_Driven_ControllerMatrix3Controller
Sunlight_Daylight_Slave_Intensity_Controller -> Sunlight_Daylight_Driven_Intensity_Controller
Sunlight_Daylight_Slave_Intensity_ControllerFloatController -> Sunlight_Daylight_Driven_Intensity_ControllerFloatController
Sunlight_Slave_Controller -> Sunlight_Driven_Controller
Sunlight_Slave_Intensity_Controller -> Sunlight_Driven_Intensity_Controller
MasterBlock -> DriverBlock
MasterBlockController -> DriverBlockController
MasterList -> BlockControl
Master_Layer -> Main_Layer
MasterLayer -> MainLayer
MasterLayerControlManager -> MainLayerControlManager
Master_Motion_Clip -> Driver_Motion_Clip
MasterClip -> DriverClip
Max_Master_Clip -> Max_Driver_Clip
MaxMotionClipMaster -> MaxMotionClipDriver
Motion_Clip_SlaveFloat -> Motion_Clip_DrivenFloat
Motion_Clip_SlavePoint3 -> Motion_Clip_DrivenPoint3
Motion_Clip_SlavePos -> Motion_Clip_DrivenPos
Motion_Clip_SlaveRotation -> Motion_Clip_DrivenRotation
Motion_Clip_SlaveScale -> Motion_Clip_DrivenScale
Reaction_Master -> Reaction_Driver
ReactionMaster -> ReactionDriver
SprayMaster -> SprayDriver
StereoCameraSlave -> StereoCameraDriven
MAXScript properties
<ClipAssigner>.masterblocks -> driverblocks
<MassFX_RBody>.GetRBMeshOverrideMasterMat -> GetRBMeshOverrideDriverMat
<MassFX_RBody>.SetRBMeshOverrideMasterMat -> SetRBMeshOverrideDriverMat
<nvpx>.GetRBMeshOverrideMasterMat -> GetRBMeshOverrideDriverMat
<nvpx>.SetRBMeshOverrideMasterMat -> SetRBMeshOverrideDriverMat
<MaxLiquidSolver>.masterVoxelSize -> baseVoxelSize
<Point_Cache>.loadTypeSlave -> loadTypeNetwork
<Point_CacheSpacewarpModifier>.loadTypeSlave -> loadTypeNetwork
<Select_the_Biped_for_use_as_a_retargeting_reference>.masterMaxClip -> driverMaxClip
<Float_Wire>.isMaster -> isDriver
<Float_Wire>.isSlave -> isDriven
<Float_Wire>.slaveAnimation -> drivenAnimation
<Point3_Wire>.isMaster -> isDriver
<Point3_Wire>.isSlave -> isDriven
<Point3_Wire>.slaveAnimation -> drivenAnimation
<Point4_Wire>.isMaster -> isDriver
<Point4_Wire>.isSlave -> isDriven
<Point4_Wire>.slaveAnimation -> drivenAnimation
<Position_Wire>.isMaster -> isDriver
<Position_Wire>.isSlave -> isDriven
<Position_Wire>.slaveAnimation -> drivenAnimation
<Rotation_Wire>.isMaster -> isDriver
<Rotation_Wire>.isSlave -> isDriven
<Rotation_Wire>.slaveAnimation -> drivenAnimation
<Scale_Wire>.isMaster -> isDriver
<Scale_Wire>.isSlave -> isDriven
<Scale_Wire>.slaveAnimation -> drivenAnimation
MAXScript Enums
<SchematicView>.testIncludeFilter: #masterPoint -> #pointControllerContainers
<SchematicView>.setIncludeFilter: same
<SchematicView>.clearIncludeFilter: same
MAXScript interfaces
Interface: IRingArrayMaster -> IRingArrayDriver
MAXScript SubAnim Names
#Master_Point_Controller -> #Point_Controller_Container
#Master -> #Point_Controller_Container
#Master_CV_Control -> #CV_Controller_Container
Others
gxmlio.wireparams: #(..., #isMaster, #isSlave, #slaveAnimation,...) -> #(..., #isDriver, #isDriven, #drivenAnimation,...)