Plug-In Directory Search Mechanism

3DS Max Plug-In SDK

Plug-In Directory Search Mechanism

See Also: DLL Functions and Class Descriptors.

This section discusses the system 3ds max uses to search for plug-in DLLs. This includes path searching and the standard file name extensions required by plug-ins.

DLL Path Search

In the root directory with the 3ds max executable is a file PLUGIN.INI. This file contains a one-line entry for each plug-in search location. When 3ds max begins execution it searches each path listed in this file looking for plug-in DLLs. When a plug-in DLL is found it is loaded. This system allows developers to store their plug-ins in whatever sub-directory structure they wish. The format for the PLUGIN.INI file is:

Descriptive Text=Search Path

Here's what a sample PLUGIN.INI might look like:

Standard MAX plug-ins=C:\3DSMAX\STDPLUGS

Miscellaneous free plug-ins=C:\3DSMAX\MISCPLUG

From the 3ds max File menu is a choice Configure Paths... The dialog page for Plug Ins lists the paths defined in PLUGIN.INI. The user may use the interactive tools in this page to edit PLUGIN.INI and add or remove search paths. Manual maintenance shouldn't be required often, however, since a plug-in's install routine can automatically write a string to the PLUGIN.INI file that contains all the information required after creating the sub-directory and copying its files into it. Mostly, manual maintenance will be used to create directories for freebie plug-ins, and to de-install directories for plug-ins that are no longer used.

Standard File Name Extensions

There are certain file name extensions that plug-in DLLs must use. 3ds max uses these standard extensions as part of its search algorithm to determine which files it will attempt to load. Below is a list of the extensions and the plug-in types associated with each one:

BMI - Bitmap Manager IO DLLs.

BMF - Bitmap Manager Filter Plug-Ins.

BMS - Bitmap Manager Storage DLLs.

DLB - Shader Plug-Ins.

DLC - Controllers.

DLE - Scene Export Plug-Ins.

DLF - Font Loaders.

DLH - Sampler Plug-Ins

DLI - Scene Import Plug-Ins.

DLK - Filter Kernels (Anti-aliasing filters)

DLM - Modifiers.

DLO - Procedural Objects.

DLR - Renderers.

DLS - Object Snap Plug-Ins.

DLT - Materials and Textures.

DLU - Utility Plug-Ins.

DLV - Rendering Effects

FLT - Image Filter Plug-Ins.

GUP - Global Utility Plug-Ins.

 

Note that it is acceptable to have several different plug-in types present in a single DLL. As long as the DLL uses one of the file name extensions listed above, 3ds max will load ALL the plug-ins present. For example, if a developer created a system plug-in using both a procedural object and a controller, he or she could place them both in the same DLL. 3ds max would load them all (provided the file name extension matched one of those above).