SoDBAddPlugin Method |
Loads a plugin library.
Namespace: OIV.Inventor
A plugin library may implement one or more classes extending Open Inventor classes. For example a custom node or a custom file reader derived from OIV.Inventor.SoInputReader.
A plugin library must implement the initPlugin() and exitPlugin() C-formatted entry-points. The initPlugin() function is responsible for registering the new class (or classes) in the Open Inventor database through the standard SoType type creation mechanism. The exitPlugin() function is used to disable the use of the custom class(s) by removing the corresponding type(s) from the Open Inventor database.
By default, Open Inventor attempts to load all files that may be plugins (files with the extension .dll or .so depending on the platform) from the following locations:
Application specified directories, defined using the OIV_PLUGINS_DIRECTORY environment variable, or the OIV.Inventor.SoDB.AddPluginsDirectory(System.String) method.
The current application working directory.
The directory containing the Open Inventor libraries.
Specific plugin libraries can be loaded and unloaded by direct calls to the OIV.Inventor.SoDB.AddPlugin(System.String) and OIV.Inventor.SoDB.RemovePlugin(System.String) methods.
Different plugins can be designed depending on their usage. Please refer to the Open Inventor plugin section in the documentation