What was New in MAXScript in 3ds Max 2020 and Updates

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

New in MAXScript in 3ds Max 2020.3 Update

Previously Undocumented Items

These items were previously undocumented:

getProperty() for dotNetObject

The getProperty() method now returns a dotNetObject if the asDotNetObject keyword argument is passed as true. Previously it returned a dotNetMethod if the specified property name referred to a method.

In addition, there is a new topic dealing with generic methods and classes: dotNet Generics.

New in MAXScript in 3ds Max 2020.2 Update

Unwrap_UVW Modifier

The Unwrap_UVW modifier has a new option, "Filter Map", that turns map smoothing/filtering on or off. It is exposed by the getFilterMap() and setFilterMap() methods.

Decimal Separator

formmatedprint has a new userLocale keyword argument that specifies whether to use the decimal separator defined by the user's locale

There is a new localeinfo struct that contains methods that get and set locale-related information.

Chamfer Improvements

New items have been added as a result of improvements to chamfer tools.

The Editable_Poly Geometry class has additional properties:
  • edgeChamferMiteringType (which replaces the now obsolete edgeChamferType and edgeChamferQuadIntersections properties)
  • edgeChamferDepth
  • edgeChamferEndBias
  • edgeChamferRadialBias

ATF Based Sketchup Importer

The new Autodesk Translation Framework (ATF) based Sketchup importer is exposed in the ATF_SKETCHUP_Import plugin class.

TextPlus

Several new methods have been added to TextPlus to support scripting access to the "Set value as text" feature for inserting number, script, and expression controller macros into the text string:

  • SetValueAsText()
  • GetCursorPos(), SetCursorPos()
  • GetFinalString()
  • GetMacroIndex()
  • GetMacroFormat(), SetMacroFormat()
  • GetMacroNumWhole(), SetMacroNumWhole()
  • GetMacroNumDecimal(), SetMacroNumDecimal()
  • GetMacroUniformWidth(), SetMacroUniformWidth()

Previously Undocumented Items

These items were previously undocumented:

New in MAXScript in 3ds Max 2020.1 Update

MAXScript Editor Autocomplete

3ds Max now automatically generates and sends to the MAXScript Editor a MAXScript API keyword list, so users no longer need to generate and configure a keyword file to enable autocomplete in the MAXScript Editor. This function is enabled by default, but can be disabled by setting autocompleteword.automatic=0 in the MXS_Editor.properties file.

The generateAPIList() function saves the MAXScript API keyword list to a StringStream.

See MAXScript Editor Autocomplete for more information.

Message Boxes

3ds Max dialogs are being converted to Qt from Win32. There are several new dialog types now available to MAXScript: cancelTryContinueBox(), retryIgnoreAbortBox(), okCancelBox() and retryCancelBox(). There are also several new optional arguments you can specify for all dialog types.

Hotkey Editor Exposure

Some functionality of the new Hotkey Editor is exposed in the new UiCustomization core interface, specifically the ability to open the Hotkey Editor dialog, and to convert legacy hotkey files to the new format.

The actionMan.loadKeyboardFile() method now automatically converts the shortcut file if it is in legacy .kbdx format.

Floating Viewports

Several new methods in the ViewPanelManager interface expose the new Floating Viewport feature.

MAXScript Listener and Macro Recorder Custom Colors

New MAXScript system global variables control the color of selected text in the MAXScript Listener and Macro Recorder: macroRecorderSelectionForegroundColor, macroRecorderSelectionBackgroundColor, macroRecorderSelectionAlpha, listenerSelectionForegroundColor, listenerSelectionBackgroundColor, and listenerSelectionAlpha.

EditText MultiLine Mode Control

New multiLine:<bool> keyword argument when creating an editText control specifies whether the control has multiple lines.

File Post Merge / XRef Notification

New #postFileMerge3 general event callback notification that contains the merged scene path, and the merge operation success status, as well as the information from #postFileMerge and #postFileMerge2.

Chamfer Modifier

There are new properties in the Chamfer Modifier: depthType, insetType, radiusBias, scale, and biasEndPoints. There is an additional option for amountType, "By Weight".

Scene Archive Options

Two new properties in the MaxOps interface expose the Preferences > File options for scene archiving: archiveProgramName and archiveOptions.

Previously Undocumented Items

These items were previously undocumented:

  • defaultBreak:<bool> keyword argument to the throw() function
  • IVertexPaint and VertexPaintState interfaces in the VertexPaint modifier (introduced in 3ds Max 2019.3 Update)
  • errorAtEOF:<bool> keyword parameter for the readChars method for FileStream and StringStream
  • The Python interface import() and reload() methods.

New in MAXScript in 3ds Max 2020

LogSystem

The logSystem struct has two new items:

  • logSystem.enabled - gets or sets whether output is saved to the log file.
  • logSystem.loadState() - loads settings previously saved with logSystem.saveState().

File importing

The mergeMAXFile() function has a new named parameter, includeFullGroup:<bool>, that when true, indicates that if an imported node is part of a group, then all the nodes in that group are imported.

Managing Plug-ins

The ExchangeStorePackageManager interface is renamed PluginPackageManager. However, a global variable named ExchangeStorePackageManager points to the re-named interface, to prevent older scripts from breaking.

The new PluginPackageManager.GetPackageInstallPathByUpgradeCode() function returns the plug-in's install path based on its upgrade code. This function replaces the undocumented pathConfig.GetExchangeStorePlugInInstallPath <string>productCode which used the product code as the key.

Symbolic Pathnames

New symbolic pathnames have been added to support new or existing features:

  • $fluidSimulations
  • $userSettings
  • $userTools
  • $privatePluginPackageInstallPath
  • $publicPluginPackageInstallPath

MAXScript Listener customizable colors

New MAXScript system global variables hold values that get/set colors for additional customization of the MAXScript Listener: listenerBackgroundColor, macroRecorderBackgroundColor, macroRecorderTextColor, and pythonPromptColor.

Rollouts

New width and height properties are exposed on rollout label UI controls.

Rollout Floater Windows have a new hwnd property that contains the floater's window handle.

Chamfer Modifier

The Chamfer Modifier has several new options exposed to MAXScript.

Editable Poly

The Edit_Poly modifier and Editable_Poly interface have a new method to access the last performed operation, GetLastOperation().

Preview Animation Playback

The new preferences.playPreviewWhenDone global specifies whether to play or display the preview created by createPreview().

Revit Importer

The Simplify Mesh feature performs some simplification even at a setting of 0. To disable this option completely, you can now set the "simplifymesh" value to -1 in the Revit_Importer Plugin.

What's New Previous

Review new features in previous releases.

Icon made by Freepik from www.flaticon.com.