3ds Max C++ API Reference
PluginPackageManager Class Reference

The PluginPackageManager is a service implemented by 3ds Max. More...

#include <PluginPackageManager.h>

+ Inheritance diagram for PluginPackageManager:

Public Types

enum class  Components {
  Plugins , Assemblies , UIScheme , DefaultSetting ,
  PreStartUpScripts , MacroScripts , PostStartUpScripts , MetaSLShaderPath ,
  MiFile , MRShader , LightIconPaths , DarkIconPaths ,
  OSLFolders , AMGFolders , SceneConverterFolders , TotalComponents
}
 PluginPackage component types. More...
 

Public Member Functions

virtual ~PluginPackageManager ()
 
 PluginPackageManager (const PluginPackageManager &)=delete
 
PluginPackageManageroperator= (const PluginPackageManager &)=delete
 
const MCHARGetPrivatePackageInstallPath () const
 Get the path (belonging to the current user) that is scanned for discovering user specific plugin packages. More...
 
const MCHARGetPublicPackageInstallPath () const
 Get the path (shared by all users) that is scanned for discovering plugins that are globally installed (for all users of the machine), For example: ALLUSERSPROFILE%\Autodesk\ApplicationPlugins\. More...
 
const MCHARGetPackageInstallPathByUpgradeCode (const MCHAR *upgradeCode) const
 Get the install path of the plugin package specified by upgradeCode. More...
 
size_t GetPackageCount () const
 Get the count of installed plugin packages. More...
 
const PluginPackageInfoGetPackage (size_t i) const
 Get the available information about the ith plugin package as PluginPackageInfo object. More...
 
const PluginPackageInfoGetPackageByUpgradeCode (const MCHAR *upgradeCode) const
 Get the available information about the plugin package specified by upgradeCode. More...
 
size_t GetPackageComponentCount (size_t i, Components component) const
 Get the component count of a given plugin package. More...
 
const PluginPackageComponentGetPackageComponent (size_t i, Components component, size_t n) const
 Get a given component from a plugin package. More...
 
size_t GetComponentCount (Components component) const
 Get the global count of a given component. More...
 
const PluginPackageComponentGetComponent (Components component, size_t i) const
 Get the information that is available for the specified component (as a PluginPackageComponent object) More...
 
void CollectPackageInfo ()
 Browse all plugin package folders and collect all plugin package information. More...
 

Static Public Member Functions

static PluginPackageManagerGetInstance ()
 Get the single instance of the plugin package manager. More...
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

The PluginPackageManager is a service implemented by 3ds Max.

It loads and manages plugin packages that conform to the Autodesk Application Package Format. The PluginPackageManager class allows client code to discover what plugin packages have been loaded during the startup of 3ds Max, what these packages contain (plugin dlls, managed assemblies, maxscripts, etc.) and from which directories all these components are loaded. The details of the packaging format can be found in the "Packaging Plug-ins" topic in the 3ds Max Developer's Guide.

Member Enumeration Documentation

◆ Components

enum Components
strong

PluginPackage component types.

PluginPackages contain components that need to be installed together on a system to provide a usable function to the user.

Enumerator
Plugins 

Plugins are unmanaged dlls loaded by 3ds Max usually during startup.

Assemblies 

Assemblies are managed dlls.

UIScheme 

UIScheme is a file that can be used by the defaults switcher.

DefaultSetting 

DefaultSetting is a folder where defaults are stored.

PreStartUpScripts 

PluginScripts are run after the dll is loaded.

MacroScripts 

MacroScripts are 3ds Max scripts.

PostStartUpScripts 

PostStartupScripts are startup scripts run when the UI system is fully in place.

MetaSLShaderPath 
MiFile 
MRShader 
LightIconPaths 

LightIconPaths provides a path to the CUI frame manager to load light icons.

DarkIconPaths 

LightIconPaths provides a path to the CUI frame manager to load dark icons icons.

OSLFolders 

OSLFolders defines folders to load OSL shaders from.

AMGFolders 

AMGFolders defines folders to load AMG node definitions and shaders fragment implementations from.

SceneConverterFolders 

SceneConverter defines the base path of where ConversionPresets and ConversionScripts are found Preset files are found in the sub directory ConversionPresets and are named XXXX_preset.ms Conversions files are found in the sub directory ConversionScripts.

TotalComponents 

TotalComponents gives the number of defined component types.

27  {
29  Plugins,
31  Assemblies,
33  UIScheme,
35  DefaultSetting,
37  PreStartUpScripts,
39  MacroScripts,
41  PostStartUpScripts,
42  MetaSLShaderPath,
43  MiFile,
44  MRShader,
46  LightIconPaths,
48  DarkIconPaths,
50  OSLFolders,
52  AMGFolders,
56  SceneConverterFolders,
58  TotalComponents
59  };

Constructor & Destructor Documentation

◆ ~PluginPackageManager()

virtual ~PluginPackageManager ( )
virtual

◆ PluginPackageManager()

Member Function Documentation

◆ operator=()

PluginPackageManager& operator= ( const PluginPackageManager )
delete

◆ GetPrivatePackageInstallPath()

const MCHAR* GetPrivatePackageInstallPath ( ) const

Get the path (belonging to the current user) that is scanned for discovering user specific plugin packages.

For Example: APPDATA%\Autodesk\ApplicationPlugins\

Returns
The private install path

◆ GetPublicPackageInstallPath()

const MCHAR* GetPublicPackageInstallPath ( ) const

Get the path (shared by all users) that is scanned for discovering plugins that are globally installed (for all users of the machine), For example: ALLUSERSPROFILE%\Autodesk\ApplicationPlugins\.

Returns
The public install path

◆ GetPackageInstallPathByUpgradeCode()

const MCHAR* GetPackageInstallPathByUpgradeCode ( const MCHAR upgradeCode) const

Get the install path of the plugin package specified by upgradeCode.

Parameters
upgradeCodethe plugin package version-independent unique GUID that has been specified for the plugin package
Returns
The install path for the specified plugin package

◆ GetPackageCount()

size_t GetPackageCount ( ) const

Get the count of installed plugin packages.

Returns
the number of installed plugin packages

◆ GetPackage()

const PluginPackageInfo* GetPackage ( size_t  i) const

Get the available information about the ith plugin package as PluginPackageInfo object.

Parameters
ithe index of the plugin package (between 0 and GetPackageCount() - 1)
Returns
package information as a PluginPackageInfo object or nullptr

◆ GetPackageByUpgradeCode()

const PluginPackageInfo* GetPackageByUpgradeCode ( const MCHAR upgradeCode) const

Get the available information about the plugin package specified by upgradeCode.

Parameters
upgradeCodethe version-independent unique GUID that has been specified for the plugin package
Returns
package information as a PluginPackageInfo object or nullptr

◆ GetPackageComponentCount()

size_t GetPackageComponentCount ( size_t  i,
Components  component 
) const

Get the component count of a given plugin package.

Parameters
ithe index of the plugin package (between 0 and GetPackageCount() - 1)
componentthe requested plugin package component
Returns
the count of component items in the ith plugin package

◆ GetPackageComponent()

const PluginPackageComponent* GetPackageComponent ( size_t  i,
Components  component,
size_t  n 
) const

Get a given component from a plugin package.

Parameters
ithe index of the plugin package (between 0 and GetPackageCount() - 1)
componentthe requested plugin package component
nthe index of the component (between 0 and GetPackageComponentCount(i, component))
Returns
the information about the component

◆ GetComponentCount()

size_t GetComponentCount ( Components  component) const

Get the global count of a given component.

This count represents the number of instances of this component in all plugin packages.

Parameters
componentthe requested plugin package component
Returns
the global count for the specified component type

◆ GetComponent()

const PluginPackageComponent* GetComponent ( Components  component,
size_t  i 
) const

Get the information that is available for the specified component (as a PluginPackageComponent object)

Parameters
componentthe requested plugin package component
ithe index of the component (between 0 and GetComponentCount() - 1)
Returns
the information about the requested component or nullptr

◆ CollectPackageInfo()

void CollectPackageInfo ( )

Browse all plugin package folders and collect all plugin package information.

◆ GetInstance()

static PluginPackageManager* GetInstance ( )
static

Get the single instance of the plugin package manager.