[Closed] 3dsmax 2019.1 Scripting Improvements
A few useful things in here.
Scripting improvements
- Python dictionaries now support any MaxScript value as keys.
- Working with user-defined object properties through MaxScript now supports all value types correctly.
- The maxVersion() MaxScript command now reports the full product version.
- Converting a large object set from MaxScript (pymxs.runtime.objects) to a Python list is now instantaneous.
Using a short MaxScript command (FBXExportSetParam ExportAnimationOnly true) allows you to export FBX animation data without needing to include geometry.
MAXX-39800
MAXX:MAXScript
maxVersion() MAXScript command was returning nondescript release information. Now, it reports the full product version including major, minor, hotfix and build number. For more information, see MAXScript documentation.
MAXX-42988
MAXX:MAXScript
Fixed issue where enumerating the elements of an array using ‘for <vear_name> in <sequence>’ would cause functions extracted from the sequence to lose the structure or plugin instance associated with the function (if any). This would result in the function being unable to properly access local variables in the instance.
MAXX-43538
MAXX:MAXScript
Improved error message reported by the addModifierWithLocalData MAXScript function, when source modifier not found on source node.
MAXX-43300
MAXX:MAXScript
Fixed access violation when setting the value of a null sub-anim object through MAXScript. A MAXScript runtime error is generated instead.
Example:
t=teapot()
t[#visibility].value = 1 –> was access violation, now reports Runtime error: Cannot set property on null subAnim object: Visibility
t[#visibility].object –> undefined
MAXX-42201
MAXX:MAXScript
The xrefs.addNewXrefObject MAXScriptAPI respects quiet mode when it needs to reparent an xrefed object. Reparenting behavior can be fine-tuned through the new reparentAction keyword argument. For more information, see MAXScript documentation.
MAXX-42145
MAXX:MAXScript
Improved handling of end-of-stream markers in the readline(), peekchar(), and readChar() functions of memStreamMgr in MAXScript.readline(), peekchar(), and readChar() functions of memStreamMgr in MAXScript.
MAXX-42144
MAXX:MAXScript
The xrefs.addNewXRefObject MAXScript API now allows for specifying how to re-parent an xrefed object. For more information, see MAXScript documentation.
MAXX-42153
MAXX:MAXScript
Improved error reporting in scripted dialogs by explicitly calling out the causing the error in the MAXScript Listener.
MAXX-37372
MAXX:MAXScript
Fixed issue with getHandleByAnim Python API not returning correct values.
A few more bits and pieces from the update:
The File > Archive command is now exposed in MAXScript as archiveMAXFile()
The SystemTools struct now has a new function, GetOSVersion(), to report the OS version that works with Windows 10.
Two new methods provide better control over how user-defined node properties are stored and retrieved, getUserPropVal() and setUserPropVal().
The doesUserPropExist() method checks whether a user-defined node property exists, and deleteUserProp() removes a user-defined node property.
Several new methods have been added to the AlembicImport Import Plugin to expose Alembic file inspection functionality.
The scene compression setting is now exposed in the maxOps interface methods getCompressSceneFileOnSave() and setCompressSceneFileOnSave().
New function createFloatControllerWithRandomValues() added for creating random data for testing.
Previously undocumented items:
The pathConfig.removeProjectDirectoryCreateFilter() function removes a single specified Project Directory Filter.
The pathConfig.getProjectDirectoryCreateFilters function returns an array of all currently set Project Directory Filters.
The getFiles() and getDirectories() methods have a recurse:<bool> parameter to indicate whether to recursively search for files or directories.
Some parameter clauses for scripted plug-ins were previously undocumented: readOnly:<boolean>, readOnlyAsset:<boolean>, and enumAsAsset:<boolean>.
The convertIntToDirID() function returns the system directory name for the specified integer.
The addModifierWithLocalData() function can be used for copying a modifier with its local data (also briefly mentioned in MAXX-43538).
The NetworkRTT() function for creating network render to texture jobs.
The dontRepeatMessages context is now documented.
The <maxclass>.isMSPluginClass property and <string>getObjectName <maxwrapper> method are now documented.
Btw. the correct exporter setter method name is FBXExporterSetParam.