|
Plugin Architecture
A plugin is made known to Softimage by a .cus file which must be located in the module
subdirectory in which it appears. This means that if a plugin appears in a pulldown menu
in the Matter module, then that plugin's .cus file must be in SI_LOCATION/custom/matter.
The .cus file contains many things, but the first is a menu ID which specifies on which
button pulldown menu it will appear. Plugins are often referred to as custom effects. We
use the terms interchangeably, "plugin" being favored when we are discussing
programming, and "effect" when we are discussing use by an animator.
Softimage calls out to plugins using entry points
specified in the plugins .cus file. A plugin can specify 6 different entry points for
Softimage to call If a given entry point is specified in the .cus file it will be
called. If it is missing then it won't be called. The entry points, listed in the order in
which they get called. are:
- Setup: Called once. This entry point is called when the user picks the plugin
from the pulldown menu specified in the .cus file. This entry point is called before Soft
puts up a dialog box. Your .cus file must contain a definition of a valid dialog (no
matter how trivial) for this entry point to be called. This means that even if your .cus
file has an entry for the Setup break point it will NOT be called unless the .cus file
also has a dialog section.
- Edit: Same as Setup but called instead of Setup when the user selects the plugin
from the Effects->Custom->Edit Parameters menu item.
- Init: Called once when the plugin starts. Note that Init is NOT called when the
user chooses the Effects->Custom->Edit Parameters menu item.
- Update: Called once for immediate plugins and called each time Softimage updates
a scene for persistent plugins.
- Cleanup: Called once when the plugin is finished.
- Save: Called whenever a scene is saved.
The Softimage Plugin architecture supports 2 kinds of plugins:
- immediate effects: These are plugins which run once and are finished.
- persistent effects: These are plugins which run each time Softimage updates a
scene. Persistent effects become a part of a scene. A persistent effect requires an icon
to be defined in the .cus file. This icon is displayed in the scene. Deleting the icon
removes the persistent effect from the scene.
|