Autodesk Application Plug-in Package Format Specification
This topic describes the elements that can make up a package XML (PackageContents.xml) file for a 3ds Max plug-in.
- Autodesk Application Plug-in Package Format Specification
XML version (required)
Example: <?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage> (required)
Each PackageContents.xml file must contain an ApplicationPackage element. The ApplicationPackage element's attributes contain general information about the plug-in. It also encapsulates other XML elements (nodes) that help to define the contents of the plug-in.
The <ApplicatonPackage> must have a <CompanyDetails> node.
It can optionally contain a <RuntimeRequirements> node.
It also contains an array of 0 or more <Components> nodes.
Starting with 3ds Max 2023 it can optionally contain one or more <EnvironmentVariables> node.
<ApplicationPackage> Attributes
| Name | Description |
|---|---|
| AutodeskProduct (required) | Must be set to "3ds Max" |
| ProductType (required) | Must be set to "Application" |
| Name (optional) | Plug-in name |
| Description (optional) | Plug-in description |
| AppVersion (required) | Version string in the form of "MMM.mmm.bbb" (major.minor.build) |
| UpgradeCode (required) | Unique identifier (GUID) for the plug-in that should be used for all its versions. If 3ds Max finds two packages with the same UpgradeCode, it will load the one with the higher AppVersion. Note: You must increment AppVersion in order to allow for proper upgrading of a plug-in. When you upload your plugin package to the Autodesk App Store in order to publish it, this code is used for generating an installer that will upgrade existent installations of previous versions of your plugin, without the need to uninstall the old version first. |
| ProductCode (optional/required) | This property is not required by 3ds Max. However, if the plug-in package is distributed through the Autodesk App Store, it is required, and the following description applies: This is the unique identifier (GUID) for a specific version of the plug-in. The ProductCode is used for first run notifications and as the installer ID for Add/Remove Programs in Windows when installed from the Autodesk App Store website. A new ProductCode should be used whenever the AppVersion is changed. This is so upgrade installs of the plugin package work properly. On Windows, you can use the MSI installer ProductCode or generate a GUID using an application such as GuidGen.exe. There are also websites that allow you to generate a GUID. |
<CompanyDetails> (required)
The plug-in will not load if this element is not defined. All attributes are optional.
<CompanyDetails> Attributes
| Name | Description |
|---|---|
| Url | URL to reference back to the company |
| E-mail, read as a string, no format required | |
| Phone | Phone, read as a string, no format required |
| Name | Company name |
<RuntimeRequirements>
This element enables the plug-in's host application to quickly process an application plug-in package. It identifies which operating systems, Autodesk products and releases the package is compatible with.
Optional in the <ApplicationPackage> node.
Required in the <Components> nodes.
<RuntimeRequirements> Attributes
| Name | Description |
|---|---|
| OS | Must be set to "Win64" |
| Platform | Must be set to "3ds Max" |
| SeriesMin | The minimum 3ds Max release the plug-in is compatible with. Currently this should be the 3ds Max product release number the application is compatible with. For example, it might be "2020". Year, build, update, and hotfix versions are also supported - see below. If not specified, a value of 0 is used. |
| SeriesMax | The maximum 3ds Max release the plug-in is compatible with. Currently this should be the 3ds Max product release number the application is compatible with. For example, it might be "2020". Year, build, update, and hotfix versions are also supported - see below. |
The SeriesMin and SeriesMax attributes support version specification in the form of YYYYY.u.h.bbbb (e.g. "2021.2.1.4567"), where:
- YYYY is the product release year (e.g. "2022")
- u is the update number (e.g. "2" for 2022 Update 2)
- h is the hotfix number (e.g. "1" for 2022 Update 2, Hotfix 1)
- bbbb is the build number (e.g. "4567")
Recommended practice:
When creating a DLL that is compiled with the 3ds Max SDK, SeriesMin and SeriesMax should specify the "release year" range the plug-in is compatible with.
The plug-in DLL should be binary compatible with all the application releases that fall between the values specified in SeriesMin and SeriesMax.
Note that 3ds Max does not test for binary compatibility. Even if the current version of 3ds Max is binary compatible with an older SeriesMax version, the plugin is not loaded. For example, if the SeriesMin and SeriesMax is 2015, 3ds Max 2016 is binary compatible, but will not load the plug-in.
The SeriesMax attribute is mandatory.
<Components>
<Components Description="xxx">
...
</Components>
This node describes a component, its runtime requirements, and a list of component entries. The "Description" attribute is required and defines how to load the component entries. Possible valid values are listed below.
<Components> Sub Nodes
| Name | Description |
|---|---|
<RuntimeRequirements> (required) |
See above table for runtime requirements which can be specified for more specific modules here. For example, SeriesMin and SeriesMax may be different for a specific component. |
<ComponentEntry ModuleName="XXX" /> |
List of ComponentEntry nodes. At least one needs to be present. Each defines a file to be loaded through its "ModuleName" attribute, which can be an absolute or relative file path to the package XML file. You can specify a wildcard in the file name, such as "*.ms" to specify all MAXScript files. Wildcards are supported in file names only, not in file paths. If a file is specified twice, 3ds Max will display an error message. |
<Components> Description attribute values
| Tag | Description |
|---|---|
| plugins parts | Loads the file defined by the ModuleName attribute of the ComponentEntry element as a 3ds Max plug-in DLL. |
| assemblies parts | Loads the file defined by the ModuleName attribute of the ComponentEntry element as a managed assembly DLL. |
| ui schemes parts | The file defined by the ModuleName attribute of the ComponentEntry element defines a UI scheme file that can be used by the defaults switcher. |
| default setting paths parts | The path in the ModuleName attribute of the ComponentEntry element defines a folder where defaults are stored. |
| pre-start-up scripts parts | Loads the file defined by the ModuleName attribute of the ComponentEntry element as a plug-in script. This is done after plug-in DLLs are loaded. The UI system is not yet in place so scripts have "limited" functionality. Only MAXScript scripts are supported here. |
| macroscripts parts | Loads the file defined by the ModuleName attribute of the ComponentEntry element as a macroscript. |
| post-start-up scripts parts | Loads the file defined by the ModuleName attribute of the ComponentEntry element as a startup script. The UI system is fully in place. MAXScript and Python scripts are supported here. |
| light icon paths parts | The path defined by the ModuleName attribute of the ComponentEntry element will be added as a path to the CUI frame manager to load light icons from. Note: multi-resolution icons in .PNG and .SVG format are supported as of 3ds Max 2024.2 Update. |
| dark icon paths parts | The path defined by the ModuleName attribute of the ComponentEntry element will be added as a path to the CUI frame manager to load dark icons from. Note: multi-resolution icons in .PNG and .SVG format are supported as of 3ds Max 2024.2 Update. |
| scene converter folders parts | The path defined by the ModuleName attribute of the ComponentEntry element is used by the Scene Converter to load preset and conversion scripts. Presets are loaded from a sub-directory named ConversionPresets, and have pattern [name]_preset.ms. Conversion scripts are loaded from a sub-directory named ConversionScripts. |
| osl folders parts | The path defined by the ModuleName attribute of the ComponentEntry element is parsed for OSL shaders and loaded. The last (main) directory in this path must be named OSL. Sub-directories are added as categories in the list of OSL shaders. |
| amg folders parts | The path defined by the ModuleName attribute of the ComponentEntry element is parsed for AMG shaders and loaded. Any sub-directory that exists in the system AMG directory can also exist under this folder, and will be used in the same way. AMG files in the system AMG directory are loaded first. |
| hotkey parts | The .hsx file defined by the ModuleName attribute of the ComponentEntry element is parsed for hotkey definitions. |
See Example Plug-in Package for an example of how to use <ComponentEntry>.
<EnvironmentVariables> (optional)
This element provides a way for plug-ins to define environment variables for the 3ds Max process. This element contains a <RuntimeRequirements> element (required) and one or more optional <EnvironmentVariable> elements that define environment variables available to the running 3ds Max process. Environment variables can be defined, modified, or removed.
<EnvironmentVariable> (optional)
Each <EnvironmentVariable> element defines an environment variable that is created when the package is loaded, and is available to that instance of 3ds Max. All environment variables are processed before 3ds Max loads any components. An environment variable can only be defined once, but can be appended or prepended multiple times. Two plug-ins cannot define the same environment variable, but they can append to an already defined environment variable.
<EnvironmentVariable> Attributes
| Tag | Description |
|---|---|
| Name (required) | The name of the environment variable. Note: environment variable names are case sensitive. |
| Value (required) | The value of the environment variable, specified as a string. |
| Type (required) | The type of the environment variable, either "string" or "path". |
You can use OS defined variables in the value, which get expanded when the environment variable is created. For example, %LOCALAPPDATA%/Renderer/Cache is expended to C:/Users/<username>/AppData/Local/Renderer/Cache. If the expansion fails (the variable is not defined, for example), no environment variable is created and an error is written to max.log.
The value can optionally start with one of these operators:
<- prepends the value to the existing definition+- appends the value to the existing definition, or if the type is a path, adds the path if it is not already in the list-- removes the value from the existing definition, or if the type is a path, removes the path from the list
Operators can be escaped by using the backslash character, eg: \+.
For example:
Defining a new environment variable:
<EnvironmentVariable Name="GPU_PLATFORMS" Value="titan;gtx 980" Type="string"></EnvironmentVariable>Results in the environment variable: GPU_PLATFORMS=titan;gtx 980
Appending a value (note that the separator is part of the appended string):
<EnvironmentVariable Name="GPU_PLATFORMS" Value="+;amd" Type="string"></EnvironmentVariable>The environment variable is now GPU_PLATFORMS=titan;gtx 980;amd
Removing a substring:
<EnvironmentVariable Name="GPU_PLATFORMS" Value="-;gtx 980" Type="string"></EnvironmentVariable>Results in: GPU_PLATFORMS=titan;amd
If the environment variable is a "path" type: 3ds Max normalizes and resolves relative paths before creating the environment variable. Paths that are not fully qualified are resolved relative to the PackageContents.xml that defines them. Plugins do not need to resolve relative paths themselves. If the path is invalid, the environment variable is not defined and the error is logged to max.log. 3ds Max continues to execute and load plugins.
For example:
Adding a path to PYTHONPATH:
<EnvironmentVariable Name="PYTHONPATH" Value="\+;.\Contents" Type="PATH"/></EnvironmentVariable>
When appending to an existing path, the + symbol needs to be escaped with a \.
<DependentBundles> (optional)
Available in 3ds Max 2025.
To be able to specify for a package what other packages are required in order for the package to be loaded. For example, CRaySuperCam package may require that the CRay package be present. Along with the required package, specific versions of that package may be required.
To be able to specify for a package what other packages (if present) should be loaded before the package. For example, CRaySuperCam package may require that the VRay package be loaded first.
To meet these intents, package files can now specify DependentBundles and LoadAfterBundles.
Within a DependentBundles element, zero or more DependentBundle elements can be specified. The attributes of a DependentBundle element are UpgradeCode, VersionMin and VersionMax. The VersionMin and VersionMax attributes are optional.
If UpgradeCode is specified, other package(s) must be present. If not present, this package is not loaded.
The VersionMin and VersionMax values, if specified, are compared to the AppVersion specification for the package associated with UpgradeCode. The format of the VersionMin and VersionMax values is the same as for AppVersion.
An example specification is:
<DependentBundles>
<DependentBundle UpgradeCode="{10A09F68-8A8B-432C-97EF-63430FD84997}" VersionMin="1" VersionMax="1" />
</DependentBundles>
<LoadAfterBundles> (optional)
Available in 3ds Max 2025.
Within a LoadAfterBundles element, zero or more LoadAfterBundle elements can be specified. The only attribute of a LoadAfterBundle element is UpgradeCode.
An example specification is:
<LoadAfterBundles>
<LoadAfterBundle UpgradeCode="{2024147C-9C98-4C54-B59A-E1A583DDB62B}" />
</LoadAfterBundles>It is possible that the LoadAfterBundles specifications for a set of bundles results in a circular dependency. As the LoadAfterBundle elements are processed they are checked to ensure that a circular dependency does not occur. If one does occur, an error message is logged to the Plug-in Package Manager Error Messages dialog and the LoadAfterBundle is ignored.
The UpgradeCode value for DependentBundle and LoadAfterBundle elements is validated to ensure it is valid (in the form "{2024147C-9C98-4C54-B59A-E1A583DDB62B}" or "2024147C-9C98-4C54-B59A-E1A583DDB62B"), and if not an error message is logged to the Plug-in Package Manager Error Messages dialog and the element is ignored.
When LoadAfterBundle elements are present after loading all package specifications and the pruning of any packages excluded via DependentBundle specifications, the lists of components will be sorted to reflect the LoadAfterBundle specifications. The order of component entries are maintained for a package, and component entries for packages not affected by the LoadAfterBundle specifications are placed above those affected by the specifications.
For example, with a Components specification of:
<Components Description="post-start-up scripts parts">
<RuntimeRequirements OS="Win64" Platform="3ds Max" SeriesMin="0" SeriesMax="9999" />
<ComponentEntry ModuleName="./Contents/Scripts/Script1.ms" />
<ComponentEntry ModuleName="./Contents/Scripts/Script2.ms" />
</Components>
Script1.ms will always be run before Script2.ms, regardless of LoadAfterBundle specifications.
If you have three packages A, B, and C where the LoadAfterBundle specifications specify that package A load after package C, the component entries for the various component lists would be sorted such that the component entries associated with B would be first (since not affected by LoadAfterBundle specifications), then C, then A.
Note that in order for DependentBundles and LoadAfterBundles to work correctly, the UpgradeCode for all packages must be proper guid string values.
Example error messages:
Bad UpgradeCode value "{x10a09f68-8a8b-432c-97ef-63430fd84997}" in DependentBundle for package "package_1_5" in folder "G:\2025\3dswin\bin\x64\Hybrid\ApplicationPlugins\package_1_5\", ignored.
Bad UpgradeCode value "{x2024147c-9c98-4c54-b59a-e1a583ddb62b}" in LoadAfterBundle for package "package_1_5" in folder "G:\2025\3dswin\bin\x64\Hybrid\ApplicationPlugins\package_1_5\", ignored.
Circular dependendency detected while handling LoadAfterBundle "{407924df-767d-48ad-bcaf-9cac9ffb8349}" for package "package_4_4" in folder "g:\2025\3dswin\bin\x64\hybrid\applicationplugins\package_4_4\", ignored. DependentBundles specification in ComponentEntry node
Available in 3ds Max 2025.
DependentBundles specification in ComponentEntry node is supported so that the ComponentEntry is not loaded if the specified DependentBundle(s) are not present.
For example:
<Components Description="post-start-up scripts parts">
<RuntimeRequirements OS="Win64" Platform="3ds Max" SeriesMin="0" SeriesMax="9999" />
<ComponentEntry ModuleName="./Contents/Scripts/testScript.ms">
<DependentBundles>
<DependentBundle UpgradeCode="{10A09F68-8A8B-432C-97EF-63430FD84997}" VersionMin="1" VersionMax="1" />
</DependentBundles>
</ComponentEntry>
</Components>
testScript.ms would not be loaded unless package with upgrade code of {10A09F68-8A8B-432C-97EF-63430FD84997} is present and has app version of 1.
