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:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="3ds Max" ProductType="Application" ProductCode="07849d02-b914-4593-bf03-49bdd74526d0" Name="My 3ds Max Plugin">
<CompanyDetails />
<Components Description="plugin parts">
<RuntimeRequirements OS="Win64" Platform="3ds Max" SeriesMin="2019" SeriesMax="2019" />
<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 "ProductCode" is the unique identifier for the plug-in package. Only one plug-in with a particular product code will be loaded.
It is possible to version a plug-in. Using the version string, two package with the same version can co-exist. The plug-in with the higher version will be loaded.
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 testing a plug-in package it can be useful to enable error messaging to see when problems occur. You need to create an entry in 3dsmax.ini:
[ExchangeStore] ShowExchangeStoreMessageDialog=1
When this setting is present, a message dialog appears in 3ds Max when there is an error in loading the plug-in package.