Plugins can be created to add new tools, commands, texture filters and model filters. Currently Sculpture development is done in C++.
The details of the plugin system may change. The discussion below details the plugin system as of 1.0, but the development source code is always the most up-to-date source of documentation. Check the plugins directory in the Sculpture model distribution for an example. The ImLib2 Texture plugin contains a documented, non-trivial example.
A Sculpture plugin is a dynamic library which contains three required functions
and two optional functions, declared as extern "C"
.
Functions marked with a * are optional.
The contents of the init and uninit functions will depend on what the purpose of the plugin is. In most cases it will register a new tool, command, or filter through the appropriate manager singleton. The version and description functions are optional, but are useful in providing information to the end user about the version and purpose of the plugin. These details can be viewed from the Plugins Window.
The plugin_mm3d_version
function should return
the VERSION_STRING constant that is defined in version.h.
See the ImLib2 Texture plugin for an introduction to writing a plugin. The example also contains pointers to other files in the codebase which contain classes to derive from and documentation on how to use the manager singletons. The source code for the latest stable or development release is always the authoritative reference. I try to keep documentation in the relevant header files current.