Plug-ins can be packaged using the Autodesk Application Plug-in Package format, which makes it easy to distribute them on the Autodesk App Store, and simplifies plug-in development and installation in 3ds Max.
A plug-in package, or bundle, consists of a folder structure containing all files related to the plug-in, and an XML file that defines the various components of the plug-in. Deploying plug-ins in this format, makes it easier to target multiple operating systems and product releases since the parameters of your plug-in are defined in the XML file of the package.
Plug-ins using the package format can be installed without having to know the location where 3ds Max is installed, and their installers can simply copy the plug-in package into one of ApplicationPlugins folders described below in 'Install Locations'. 3ds Max scans the ApplicationPlugins folders and loads all applicable plug-ins.
Setting up a plug-in package is straight-forward. To do so you:
3ds Max supports these locations for plug-in installation using the Autodesk Application Plug-in Package format:
The following is an example of a simple Autodesk Application Plug-in package file for a utility plugin named MyPlugin.dlu that is compatible with 3ds Max 2020:
<?xml version="1.0" encoding="utf-8"?> <ApplicationPackage SchemaVersion="1.0" AutodeskProduct="3ds Max" ProductType="Application" Name="My 3ds Max Plugin" AppVersion="1.0.0" UpgradeCode="{bef4b961-c3dc-4197-b663-ed8dde1197ee}" ProductCode="{07849d02-b914-4593-bf03-49bdd74526d0}"> <CompanyDetails /> <Components Description="plugin parts"> <RuntimeRequirements OS="Win64" Platform="3ds Max" SeriesMin="2020" SeriesMax="2020" /> <ComponentEntry ModuleName="./Contents/MyPlugin.dlu" /> </Components> </ApplicationPackage>
At the top level, the package format requires a node called <ApplicationPackage>.
The "AutodeskProduct" attribute defines which product the package is meant for, in this case 3ds Max.
The "ProductType", in the context of 3ds Max plug-ins, is always "Application".
The "AppVersion" is a version string in the format "MMM.mmm.bbb" (major.minor.build). Using the version string, two packages with different versions can co-exist. The package with the higher version will be loaded.
The "UpgradeCode" is the unique identifier for the plug-in package. Only one package with a particular product code will be loaded.
The "ProductCode" is a unique identifier that needs to be changed everytime the AppVersion changes.
The <CompanyDetails> node can contain publisher details. It is mandatory, but the content is optional.
The <Components> node lists a group of files that need to be managed by the application. These are associated with a "Description", which defines what to do with these files. See the Autodesk Application Plug-in Package Format Specification topic for a list of valid description strings.
The "plugin parts" value tells the application to load these as plug-in DLLs.
The <RuntimeRequirement> needs to be defined for each <Components> node.
Defining runtime requirements per components can be valuable when creating a plug-in that targets multiple releases of 3ds Max. In this case, a <Components> node per 3ds Max release would define the appropriate component (plug-in dll) and run-time requirement (version of 3ds Max the plug-in dll was built for).
Generally, plug-in DLLs will need to be matched with a version of 3ds Max they have been built for, while scripts and other files could be shared for all supported 3ds Max releases.
The folder structure for the above plug-in package could look like:
C:\Plugins\bin\MyPlugin\PackageContents.xml
C:\Plugins\bin\MyPlugin\Contents\MyPlugin.dlu
C:\Plugins\bin\MyPlugin\Contents\en-US\MyPlugin.dlu.mui
For a more complete example of a plug-in package see the Example Plug-in Package topic.
When an error occurs while loading plugin packages, 3ds Max will display an error message.
In case you need to turn off this behaviour, you will need to create an entry in 3dsmax.ini:
[PluginPackageManager] ShowMessageDialogOnError=0