Data Structures | Macros | Functions
Plug-in Loading API

Loading of external dynamically linked plugins into Arnold. More...

Data Structures

struct  AtNodeLib
 Used by dynamically-linked nodes to return node info. More...
 

Macros

#define AI_EXPORT_LIB   AI_EXTERN_C AI_DLL_EXPORT
 Used by dynamically-linked nodes to export the entry-point function.
 

Functions

AI_API void AiLoadPlugins (const char *directory)
 Dynamically load plug-ins from a list of libraries. More...
 

Detailed Description

Loading of external dynamically linked plugins into Arnold.

Function Documentation

AI_API void AiLoadPlugins ( const char *  file_or_dir)

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_dira 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

© 2020 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com