3ds Max is an advanced modeling, rendering, and animation software package. 3ds Max has an plug-in architecture that allows
the core functionality to be extended by third-party developers. Much of the functionality that 3ds Max provides can be attributed
to plug-ins that are implemented as DLLs. Most of the source code to these plug-ins is provided with the 3ds Max SDK, as either
samples or how-to's.
The following diagram provides a representation of the interaction between 3ds Max core, the 3ds Max SDK, and plug-ins.
The plug-ins expose their functionality by providing concrete implementations of a set of abstract classes from the 3ds Max
SDK. Plug-ins also interact with the 3ds Max core by calling concrete classes, or abstract classes (interfaces) implemented
by 3ds Max.
The following is a description of the most important services implemented by a plug-in:
- Identification, creation, destruction of plug-in instances - Plug-ins must expose their type, and a unique identifier that
allows several plug-ins of the same type to coexist within 3ds Max at the same time. Plug-ins must expose a factory method
that allows 3ds Max to create them. They also need to implement a method that 3ds Max calls when it needs to destroy a plug-in
instance. This is done by implementing a class derived from the class descriptor. For more information, see the topic Plug-in Identification.
- Definition of plug-in parameters - Most plug-ins expose parameters of different types the users can interact with via traditional
Windows user interface controls such as edit fields and buttons. For more information see the topic Parameter Blocks.
- Interaction with 3ds Max and other plug-ins - Plug-ins call services exposed by 3ds Max and other plug-ins they work with.
These requests are executed most often in response to messages sent by 3ds Max or other plug-ins aimed at informing the plug-in
of a state change. This is done using the reference system. For more information see the topic Reference System.
- Plug-in type specific custom operations - In general a plug-in's type defines what they can do. For example, a geometrical
object plug-in cannot light the scene, but it can provide 3ds Max with a mesh to be displayed and rendered. This varies from
plug-in to plug-in.
- Saving and loading of plug-in state information - Most plug-ins have state other than the value of their parameters. This
state needs to be saved and loaded by the plug-in itself when 3ds Max gives the plug-in the chance to do so.
- Undo and Redo of plug-in state changes - Actions performed by the user in 3ds Max are for the most part undo-able and redo-able.
When an action changes the state of a plug-in, the plug-in itself needs to ensure that it can restore its own state efficiently
if the action is undone by the user. For more information see the topic Handling Undo and Redo.
- MAXScript automation - Plug-ins should also expose their functionality to MAXScript via the function publishing API, so that
users can manipulate them using MAXScript. For more information see the Function Publishing.