What was New in MAXScript in 3ds Max 2017

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

3ds Max 2017.1 Update

Collections

The new Dictionary Value class is a new collection type, which is an associative array data structure.

The DataPair Value class can now be specified in a persistent global variable. Both values in the DataPair must be specifiable as a persistent global variable in order for the DataPair to be fully restored on scene file load.

The openLog command now can now take a bufferedWrite parameter to turn off file caching.

System Information Additions

The sysinfo.MAXpriority enum now has additional members to support all Windows process priority classes: #abovenormal, #belownormal, #backgroundBegin, #backgroundEnd, and #realtime are added in this release.

Log System Additions

The logsystem.logEntry function now takes an enum argument to specify warning level. The function still takes a bool to maintain backwards compatibility.

The new logsystem.setLogLevel sets the specified log level on or off.

The new logsystem.getLogLevel returns whether the specified log level is on or off.

Materials and Maps

The new BlendedBoxMap: TextureMap allows you to apply a box map across one or more objects, and to map them from all sides. Blended Box Map projects images from three 90 degree directions, and gives you the ability to blend between the maps for a more seamless result.

Modeling

The Data_Channel: Modifier is a new tool for automating complex modelling operations.

Boolean Objects And Related Interfaces

The new Boolean3 : GeometryClass implements a boolean object with a modern and easier to use interface.

The new Interface:BooleanExplorerManager Core Interface provides MAXScript access to the Boolean Explorer dialog.

The new Interface:BooleanObjectManager Core Interface exposes new Boolean3-related management methods.

Animation Presets / Offset Animation

The new Preset_Maker : modifier is used by the new Animation Presets functionality.

The new offset: floatController allows the shifting of selected animation tracks in time.

The new Interface:OffsetManager exposes methods for creating and applying Animation Presets and Offset Animations to scene objects.

Animation Controllers And Animation System Access

The new Bezier_Point2 : Point2Controller is used to store Point2 animation keys. It derives from a new Point2Controller superclass.

The following new functions can be used to set, restore, and commit value changes in animation controllers:

The following new functions can be used to construct a new controller using the default class customized by the user via the Assign Controller dialog:

The following new properties can be used to enable/disable the default key creation when animating a previously not animated property, as well as set the default keyframe time, which is not limited to frames 0 or 1 anymore:

The new animateMode System Global variable can be used to enable animation without changing the Auto Key button state in the UI.

ART Renderer

The new ART_Renderer : RendererClass exposes the new advanced renderer to MAXScript.

The new ART_Renderer_Noise_Filter : RenderElement allows the noise removal from ART_Render output images via a post process.

Physical Sun And Sky

The new Sun_Positioner : light implements the light and control gizmo of the new Physical Sun and Sky system that integrates with the ART_Renderer.

The new Physical_Sun___Sky_Environment : textureMap implements the environment map which renders the Physical Sun and Sky system based on the Sun_Positioner's settings.

Materials

The new PhysicalMaterial : Material was designed for use with the new ART_Renderer raytracer.

Texture Maps

The new colorMap : textureMap offers a simple way to pass a solid color into any map slot, allowing for example the instancing of a color value among independent Materials and Maps.

The new textMap : textureMap allows the procedural creation of texture maps from one or more TextPlus geometry objects.

The new shapeMap : textureMap allows the procedural creation of texture maps from one or more Spline objects, including the legacy Text shape.

The new MultiTile : textureMap implements support for UDIM, custom, Z-Brush and Mudbox-compatible multi-tile textures.

The new TextureObjMask : textureMap implements a texture for controlling inside/outside or above/below masking based on basic geometry primitives.

mental ray Shaders And Interfaces

The new Interface:NVIDIARenderersHelper Core Interface exposes a function to check for the existence of the mental ray and iRay DLLs which are now an installer option.

The new max_Shapemap : textureMap implements the shapeMap texture map as a mental ray shader.

The new TextureObjMasktextureMap : textureMap implements the textureObjMask texture map as a mental ray shader.

HDPI Support

The Interface: colorMan has new functions: getColorTheme() and setColorTheme(), as well as read/write property, colorTheme. The getColorSchemeType() and setColorSchemeType() functions are removed.

Button UI Control, Checkbox UI Control, Mapbutton UI Control, and Materialbutton UI Control – all now support a simpler syntax for displaying images: iconName and iconSize creation parameters.

Several functions in the windows structure and systemTools structure now take a new applyUIScaling parameter to deal with HDPI displays.

There are new "unscaled" versions of these System Globals:

New function to get the scale factor for High DPI displays: GetUIScaleFactor monitorID:<int>.

New arguments have been added to the existing function to get the size of a string in pixels if it was displayed on a command panel: <point2> getTextExtent <string> removeUiScaling:<true> useQtTextWidth:<true>.

The getProperty() and setProperty() functions now have optional removeUIScaling:<bool>/applyUIScaling:<bool> parameters.

These methods now have an optional applyUIScaling:<bool> parameter:

The windows.getWindowPos function now has an optional removeUIScaling:<bool> parameter.

The Bitmap and imgTag classes have new iconName:<filename> and iconSize:<point2> parameters.

The new getIconAsBitmap() function in imgTag gets a bitmap from a loaded icon.

The dotNet Struct has a new dotNet.loadIcon() function to load icons.

The getColorSchemeType() and setColorSchemeType() functions are removed from the Interface: colorMan.

Core Interfaces

The new Interface:MaxThumbnailMgr Core Interface exposes the saving of viewport thumbnails with the saved .MAX file.

The new Interface:IAutoCamMax Core Interface exposes the new viewport navigation Pivot Ball to MAXScript.

The new Interface:SceneConverter Core Interface exposes properties and methods for setting up the scene converter system and its rules.

Import/Export Dialogs Access

The following new functions can be used to control the FBX settings dialog:

The following new functions can be used to control the display of the Game Exporter dialog represented by the GameExporter: UtilityPlugin:

Debugging Support

The following new functions have been added to the systemTools struct:

The following functions have been removed from the systemTools struct since the respective platforms are not supported by 3ds Max anymore:

New MXSCallstackCaptureEnabled context allows you to better control how the MAXScript callstack is captured.

New function <array>getLastMergedNodes() - returns an array of merged nodes after a merge operation.

The Stack() function has a new exlcudeOwner:<bool> parameter.

The globalVars.gather function in globalVars Structure now has an optional filter function parameter.

Several new functions are available with the Try Expression to support advanced debugging:

The new getMaxExtensionVersion() function returns the version number of the current Extension, or 0 if no Extension is installed.

The new isValidValue() function returns False if a value has been deleted, True if it is still valid.

The new refs.getAddr() method can be used to acquire the memory address of any MaxObject as a Pointer value.

The following new System Globals and functions are used internally to control the dependency notification optimizations, and collect related statistics:

Miscellaneous Changes

OpenEXR : BitmapIO has new functions:

<maxObject>fopenxr.getRenderElementByLayer <integer>layer
<bool>fopenxr.getLayerEnabled <integer>layer

The Interface: AssetManager has a new function:

<IObject>GetAssetById <&TSTR>assetid

It returns the AssetUser object of the asset with the given asset ID.

The following FFD functions now support FFD Spacewarp objects:

Tooltips are now supported for MultiListBox, Listbox, Colorpicker, EditText, ComboBox and Label UI Controls.

The Slider UI Control has a new height creation parameter.

The filename being imported/exported is now returned in callbacks.notificationParam() for callbacskaddScript #postImport and #postExport.

There is a new max command, max align to view, that displays the Align to View dialog.

The Deformable gPoly is deprecated and removed. In MAXScript, the Turn_to_gPoly modifier is no longer available. To maintain backwards compatibility with older scene files, the Deformable_gPoly class is still available, but cannot be created.

Miscellaneous Functions

The new convertKelvinToRGB() function returns the RGB color corresponding to black body radiation at the specified temperature in Kelvin.

The new mesh_weld_overlapping_vertices() function welds overlapping vertices in the TriMesh of an Editable_Mesh base object.

Bug Fixes

Strings are no longer truncated when passed as parameters to an invoked dotNetMethod.

The classof, superclassof and isKindOf functions now report the proper information for rollout control classes and instances.

New in 3dx Max 2016 Extension 1

New Scripted Animation Controller Plug-ins

The new Scripted Animation Controller Plug-ins allow you to write scripted plug-ins in MAXScript for several controller types.

New TextPlus Tool

The new TextPlus GeometryClass class, and related TextObject2 Mixin interface provide MAXScript exposure for the new TextPlus tool.