The function publishing system allows plug-ins to publish their major functions and operations in such a way that code outside
the plug-in can discover and make enquiries about these functions and is thus able to call them though a common calling mechanism.
Functionality that is exposed through function publishing can be controlled from scripts written in MAXScript.
The whole system is very similar to Window's COM and OLE Automation systems and share many similar concepts in the architecture.
However, the Function Publishing System is not based on COM and OLE but instead is a custom architecture more suited and optimized
for 3ds Max.
Some of the purposes of the API are:
- Modularizing plug-in code into various "engines" that are able to supply services to other parts of 3ds Max and other plug-ins
and can be delivered to the user through various different user-interfaces.
- Providing automatic scripting capabilities by exposing the published functions directly to MAXScript. Each plug-in class
appears in MAXScript as a 3ds Max class object, that can be used to construct instances of the plug-in, do class tests, etc.
If a plug-in publishes interfaces, they are visible in MAXScript as properties on this class object. The internal name for
the interface is used as the property name. All the functions in the interface are accessible.
- Providing alternate means of invoking plug-in functions in the UI, such as via the new manipulator system, scripted menus,
quad menus, hot keys, macro scripts, toolbar buttons, etc.
- Allowing the MAXScript Macro Recorder to automatically generate calls to the published functions, in the event that these
are invoked by the expanded ParamMap2 system or other UI mechanisms such as hot keys or menu items.
- Facilitate automatic generation of COM interfaces and OLE Type Libraries in such a way that external COM clients can invoke
the published functions in the plug-in code.