Dynamically load plug-ins from a list of libraries.
Dynamically loads plug-in nodes from a list of libraries given by their file names or by the paths to the directories where they reside.
Plug-in nodes are stored in dynamic libraries, or library modules. The extension of these files is system-dependent:
- Windows: .dll
- Linux: .so / .sog
- OSX: .dylib (although the Linux-like form .so/.sog is also supported)
Library modules must define an entry-point function (the plug-in "hook") called NodeLoader()
. The Arnold API provides a handy wrapper for this hook called node_loader, which plug-in writers are encouraged to use.
A single library module can contain one or more Arnold nodes of any of the available node classes, such as shaders, cameras, drivers, etc.
- Note
- Using a .sog extension in Linux or Mac OS X will trigger the global export of the symbols from the plugin (whereas .so plugins will only expose symbols locally).
- Warning
- This function is not thread-safe. It is typically called before the scene is created and before actual rendering starts.
- Parameters
-
file_or_dir | a list of multiple entries (separated by ':' in Linux/OSX or ';' in Windows), where each entry can be a library file name or a directory, that will be searched for library files |