Packaging Plug-ins

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:

  1. Create an xml file named PackageContents.xml that describes your plug-in's components. See the detailed description below and the Autodesk Application Plug-in Package Format Specification topic.
  2. Create the physical layout of your plug-in consisting in all the files and folders that it needs. Besides the main binary, or script that represents your plug-in, it may have additional binary dependencies, macro scripts, icons, help file, etc. Place the PackageContents.xml file in the root folder of your plug-in package. To test it, you can set the ADSK_APPLICATION_PLUGINS environment variable to the root folder of your plug-in package. This environment variable is recognized by 3ds Max starting with version 2019.
  3. Optionally, you can create a zip archive of your plug-in package (including the PackgeContents.xml file) to upload to the Autodesk App Store. The App Store also provides a method of uploading all the files and creating a zip.

Install Locations

3ds Max supports these locations for plug-in installation using the Autodesk Application Plug-in Package format:

%ALLUSERSPROFILE%\Autodesk\ApplicationPlugins\[plugin_name]
Example:
C:\ProgramData\Autodesk\ApplicationPlugins\MyPlugin

This is the preferred install location when a plug-in is installed by the Autodesk store installer. Plug-ins installed to this location are available to all users on the machine.
%APPDATA%\Autodesk\ApplicationPlugins\[plugin_name]
Example:
C:\Users\<username>\AppData\Roaming\Autodesk\ApplicationPlugins\MyPlugin
This is the fallback install location when a user does not have administrator privileges, and it allows only that user to access the plug-in through 3ds Max.
Custom folder for development workflows
Starting with 3ds Max 2019, all directories listed in the ADSK_APPLICATION_PLUGINS environment variable are searched for plugin packages. Each path is searched for sub-directories that contain a package XML file. For example, if you are testing a package in c:\Mybuildouput\bin\MyPlugin\PackageContents.xml You would set: ADSK_APPLICATION_PLUGINS="c:\Mybuildouput\bin" If this bin directory contains more than one package, they are all read on startup of 3ds Max. For production deployments this approach is not recommended. This method is intended for plug-in development workflows. Note: The standard enforces the location of the package file, not the location of the 3ds Max plug-in files. The package file format uses paths to the files. These can be anything you want.

A basic package XML file

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.

Debugging Plugin Packages

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