AtNodeEntry methods. More...
Data Structures | |
struct | AtCommonMethods |
Methods common to all nodes. More... | |
struct | AtNodeMethods |
Node methods. More... | |
struct | AtMetaDataEntry |
struct | AtNodeEntry |
This represents a node type in Arnold. More... | |
Variables | |
bool(* | AtCommonMethods::PluginInitialize )(void **) |
void(* | AtCommonMethods::PluginCleanup )(void *) |
void(* | AtCommonMethods::Parameters )(AtList *, AtNodeEntry *) |
void(* | AtCommonMethods::Initialize )(AtRenderSession *, AtNode *) |
void(* | AtCommonMethods::Update )(AtRenderSession *, AtNode *) |
void(* | AtCommonMethods::Finish )(AtNode *) |
const AtCommonMethods * | AtNodeMethods::cmethods |
common methods | |
const void * | AtNodeMethods::dmethods |
derived methods | |
AtString | AtMetaDataEntry::name |
AtString | AtMetaDataEntry::param |
uint8_t | AtMetaDataEntry::type |
AtParamValue | AtMetaDataEntry::value |
AtNodeEntry Methods | |
AI_API AI_PURE const AtNodeEntry * | AiNodeEntryLookUp (const AtString name) |
Look up a node entry from a name string. More... | |
AI_API AI_PURE const char * | AiNodeEntryGetName (const AtNodeEntry *nentry) |
Return the name of the given AtNodeEntry. More... | |
AI_API AI_PURE AtString | AiNodeEntryGetNameAtString (const AtNodeEntry *nentry) |
Return the name of the given AtNodeEntry as an AtString. More... | |
AI_API AI_PURE int | AiNodeEntryGetType (const AtNodeEntry *nentry) |
Return the type of the given AtNodeEntry. More... | |
AI_API AI_PURE const char * | AiNodeEntryGetTypeName (const AtNodeEntry *nentry) |
Return the type of the given AtNodeEntry as a string. More... | |
AI_API AI_PURE int | AiNodeEntryGetDerivedType (const AtNodeEntry *nentry) |
Return the derived type of the given AtNodeEntry. More... | |
AI_API AI_PURE const char * | AiNodeEntryGetDerivedTypeName (const AtNodeEntry *nentry) |
Return the derived type of the given AtNodeEntry as a string, if applicable. More... | |
AI_API AI_PURE int | AiNodeEntryGetOutputType (const AtNodeEntry *nentry) |
Return the output type of the given AtNodeEntry. More... | |
AI_API AI_PURE const char * | AiNodeEntryGetFilename (const AtNodeEntry *nentry) |
Return the filename (so/dll path) of an AtNodeEntry. More... | |
AI_API AI_PURE const char * | AiNodeEntryGetVersion (const AtNodeEntry *nentry) |
Return the version that this node was linked with. More... | |
AI_API AI_PURE int | AiNodeEntryGetCount (const AtNodeEntry *nentry) |
Return the number of instances of a particular node. More... | |
AI_API AI_PURE int | AiNodeEntryGetNumParams (const AtNodeEntry *nentry) |
Return the number of parameters of a given AtNodeEntry. More... | |
AI_API AI_PURE const AtParamEntry * | AiNodeEntryGetParameter (const AtNodeEntry *nentry, int i) |
Return the i'th parameter in an AtNodeEntry. More... | |
AI_API AI_PURE const AtParamEntry * | AiNodeEntryLookUpParameter (const AtNodeEntry *nentry, const AtString param) |
Look up a parameter in a node entry from a name string. More... | |
AI_API AI_PURE int | AiNodeEntryGetNumOutputs (const AtNodeEntry *nentry) |
Return the number of outputs of a given AtNodeEntry. More... | |
AI_API AI_PURE const AtParamEntry * | AiNodeEntryGetOutput (const AtNodeEntry *nentry, int i) |
Return the i'th output AtParamEntry in an AtNodeEntry. More... | |
AI_API AI_PURE const AtParamEntry * | AiNodeEntryLookUpOutput (const AtNodeEntry *nentry, const AtString param) |
Look up an output parameter in a node entry from a name string. More... | |
AI_DEPRECATED const AtNodeEntry * | AiNodeEntryLookUp (const char *name) |
AI_DEPRECATED const AtParamEntry * | AiNodeEntryLookUpParameter (const AtNodeEntry *nentry, const char *param) |
AI_API AtParamIterator * | AiNodeEntryGetParamIterator (const AtNodeEntry *nentry) |
Creates and returns a new AtParamIterator for this node entry. More... | |
AI_API AtMetaDataIterator * | AiNodeEntryGetMetaDataIterator (const AtNodeEntry *nentry, const char *param=NULL) |
Creates and returns a new AtMetaDataIterator for this node entry. More... | |
AI_API void | AiNodeEntryInstall (int type, uint8_t output_type, const char *name, const char *filename, const AtNodeMethods *methods, const char *version) |
Install a new node in the system. More... | |
AI_API void | AiNodeEntryUninstall (const char *name) |
Uninstall a node from the system. More... | |
AtParamIterator Methods | |
AI_API void | AiParamIteratorDestroy (AtParamIterator *iter) |
Destroys a param iterator when it is no longer needed. More... | |
AI_API const AtParamEntry * | AiParamIteratorGetNext (AtParamIterator *iter) |
Returns current param entry and points param iterator to the next one. More... | |
AI_API bool | AiParamIteratorFinished (const AtParamIterator *iter) |
Returns true if there are no more parameters to iterate over. More... | |
AtMetaDataIterator Methods | |
AI_API void | AiMetaDataIteratorDestroy (AtMetaDataIterator *iter) |
Destroys a metadata iterator when it is no longer needed. More... | |
AI_API const AtMetaDataEntry * | AiMetaDataIteratorGetNext (AtMetaDataIterator *iter) |
Returns current metadata entry and points metadata iterator to the next one. More... | |
AI_API bool | AiMetaDataIteratorFinished (const AtMetaDataIterator *iter) |
Returns true if there is no more metadata to iterate over. More... | |
Node Types | |
#define | AI_NODE_UNDEFINED 0x0000 |
Undefined type. | |
#define | AI_NODE_OPTIONS 0x0001 |
Options node (following the "singleton" pattern, there is only one options node) | |
#define | AI_NODE_CAMERA 0x0002 |
Camera nodes (persp_camera , fisheye_camera , etc) | |
#define | AI_NODE_LIGHT 0x0004 |
Light source nodes (spot_light , etc) | |
#define | AI_NODE_SHAPE 0x0008 |
Geometry nodes (sphere , polymesh , etc) | |
#define | AI_NODE_SHADER 0x0010 |
Shader nodes (lambert , etc) | |
#define | AI_NODE_OVERRIDE 0x0020 |
EXPERIMENTAL: override nodes support "delayed parameter overrides" for procedural nodes. | |
#define | AI_NODE_DRIVER 0x0040 |
Output driver nodes (driver_tiff , etc) | |
#define | AI_NODE_FILTER 0x0080 |
Pixel sample filter nodes (box_filter , etc. | |
#define | AI_NODE_COLOR_MANAGER 0x0800 |
Color manager nodes (Syncolor , OCIO, etc) | |
#define | AI_NODE_OPERATOR 0x1000 |
Operator plug-in nodes. | |
#define | AI_NODE_IMAGER 0x2000 |
Imager nodes (imager_tonemap , etc. | |
#define | AI_NODE_ALL 0xFFFF |
Bitmask including all node types, used by AiASSWrite() | |
Derived Node Types | |
#define | AI_NODE_SHAPE_PROCEDURAL 0x0100 |
Procedural shape node. | |
#define | AI_NODE_SHAPE_VOLUME 0x0200 |
Volume shape node. | |
#define | AI_NODE_SHAPE_IMPLICIT 0x0400 |
Implicit shape node. | |
AtNodeEntry methods.
Arnold AtNodeEntry class provides information about the structure of a given node type. For a discussion of Arnold's object-oriented system of pluggable nodes, please refer to AtNode API.
AI_API AI_PURE const AtNodeEntry * AiNodeEntryLookUp | ( | const AtString | name | ) |
Look up a node entry from a name string.
Search all installed node entries for a given node name. If found, return a pointer to the node entry.
name | input node name (such as "lambert") |
AI_API AI_PURE const char * AiNodeEntryGetName | ( | const AtNodeEntry * | nentry | ) |
Return the name of the given AtNodeEntry.
nentry | input node entry |
AI_API AI_PURE AtString AiNodeEntryGetNameAtString | ( | const AtNodeEntry * | nentry | ) |
Return the name of the given AtNodeEntry as an AtString.
nentry | input node entry |
AI_API AI_PURE int AiNodeEntryGetType | ( | const AtNodeEntry * | nentry | ) |
Return the type of the given AtNodeEntry.
nentry | input node entry |
AI_NODE_SHADER
, etc), or 0 if nentry is NULL AI_API AI_PURE const char * AiNodeEntryGetTypeName | ( | const AtNodeEntry * | nentry | ) |
Return the type of the given AtNodeEntry as a string.
For example, a node of type AI_NODE_LIGHT
would return "light"
nentry | input node entry |
AI_API AI_PURE int AiNodeEntryGetDerivedType | ( | const AtNodeEntry * | nentry | ) |
Return the derived type of the given AtNodeEntry.
nentry | input node entry |
AI_NODE_SHAPE_VOLUME
, etc), or 0 if nentry is either NULL or a non-derived type AI_API AI_PURE const char * AiNodeEntryGetDerivedTypeName | ( | const AtNodeEntry * | nentry | ) |
Return the derived type of the given AtNodeEntry as a string, if applicable.
For example, a node of type AI_NODE_SHAPE_VOLUME
would return "volume"
nentry | input node entry |
AI_API AI_PURE int AiNodeEntryGetOutputType | ( | const AtNodeEntry * | nentry | ) |
Return the output type of the given AtNodeEntry.
nentry | input node entry |
AI_TYPE_RGB
, etc) AI_API AI_PURE const char * AiNodeEntryGetFilename | ( | const AtNodeEntry * | nentry | ) |
Return the filename (so/dll path) of an AtNodeEntry.
nentry | input node entry |
AI_API AI_PURE const char * AiNodeEntryGetVersion | ( | const AtNodeEntry * | nentry | ) |
Return the version that this node was linked with.
There are restrictions as to what previously-compiled plug-in nodes can function with a given Arnold library. For example, a plug-in node compiled and linked with Arnold 3.1.x can't be loaded (installed) on Arnold 3.2.x.
nentry | input node entry |
AI_API AI_PURE int AiNodeEntryGetCount | ( | const AtNodeEntry * | nentry | ) |
Return the number of instances of a particular node.
nentry | input node entry |
AI_API AI_PURE int AiNodeEntryGetNumParams | ( | const AtNodeEntry * | nentry | ) |
Return the number of parameters of a given AtNodeEntry.
nentry | input node entry |
AI_API AI_PURE const AtParamEntry * AiNodeEntryGetParameter | ( | const AtNodeEntry * | nentry, |
int | i | ||
) |
Return the i'th parameter in an AtNodeEntry.
nentry | input node entry |
i | parameter index, in 0..num_params-1 |
AI_API AI_PURE const AtParamEntry * AiNodeEntryLookUpParameter | ( | const AtNodeEntry * | nentry, |
const AtString | name | ||
) |
Look up a parameter in a node entry from a name string.
Searches the parameter entries of a given node looking for a parameter that matches the name string. If found, returns a pointer to the parameter entry.
nentry | input node entry |
name | parameter name that we are looking for (such as "samples") |
AI_API AI_PURE int AiNodeEntryGetNumOutputs | ( | const AtNodeEntry * | nentry | ) |
Return the number of outputs of a given AtNodeEntry.
nentry | input node entry |
AI_API AI_PURE const AtParamEntry * AiNodeEntryGetOutput | ( | const AtNodeEntry * | nentry, |
int | i | ||
) |
Return the i'th output AtParamEntry in an AtNodeEntry.
nentry | input node entry |
i | output index, in 0..num_outputs-1 |
AI_API AI_PURE const AtParamEntry * AiNodeEntryLookUpOutput | ( | const AtNodeEntry * | nentry, |
const AtString | name | ||
) |
Look up an output parameter in a node entry from a name string.
Searches the output parameter entries of a given node looking for an output parameter that matches the name string. If found, returns a pointer to its parameter entry.
nentry | input node entry |
name | output parameter name that we are looking for (such as "result") |
AI_API AtParamIterator * AiNodeEntryGetParamIterator | ( | const AtNodeEntry * | nentry | ) |
Creates and returns a new AtParamIterator for this node entry.
nentry | node entry whose parameters will be iterated over |
AI_API AtMetaDataIterator * AiNodeEntryGetMetaDataIterator | ( | const AtNodeEntry * | nentry, |
const char * | param | ||
) |
Creates and returns a new AtMetaDataIterator for this node entry.
nentry | node entry whose metadata will be iterated over |
param | selects a specific parameter to get its metadata or NULL for node metadata |
AI_API void AiNodeEntryInstall | ( | int | type, |
uint8_t | output_type, | ||
const char * | name, | ||
const char * | filename, | ||
const AtNodeMethods * | methods, | ||
const char * | version | ||
) |
Install a new node in the system.
An Arnold-based app can use this function to extend the renderer with custom types of nodes, such as new shaders or cameras. The user must provide the node type, name, and methods. Successive calls to AiNode() can create nodes of this type.
Examples:
type | type of node (AI_NODE_CAMERA , AI_NODE_SHADER , etc) |
output_type | for shader nodes, which can link their output to the input of another shader, this is the output type (AI_TYPE_RGB , etc) |
name | name string of the newly created node type |
filename | string identifier that hints at how this node was created, usually the path of the dynamic library where it was loaded from but, in general, it should be set to whatever makes sense for the app that's installing the node |
methods | pointer to the node methods |
version | Arnold version string that this node is linked with |
AI_API void AiNodeEntryUninstall | ( | const char * | name | ) |
Uninstall a node from the system.
Remove the node with the given name from the system. Successive calls to AiNode() using this node name will fail.
name | name of the node to be removed from the system |
AI_API void AiParamIteratorDestroy | ( | AtParamIterator * | iter | ) |
Destroys a param iterator when it is no longer needed.
iter | param iterator that will be deallocated |
AI_API const AtParamEntry * AiParamIteratorGetNext | ( | AtParamIterator * | iter | ) |
Returns current param entry and points param iterator to the next one.
This function is designed to be used inside a loop, as illustrated by the following example, which prints all the built-in parameters of a given AtNodeEntry:
iter | a param iterator |
NULL
if there are no more parameters to iterate over AI_API bool AiParamIteratorFinished | ( | const AtParamIterator * | iter | ) |
Returns true if there are no more parameters to iterate over.
iter | a param iterator |
AI_API void AiMetaDataIteratorDestroy | ( | AtMetaDataIterator * | iter | ) |
Destroys a metadata iterator when it is no longer needed.
iter | metadata iterator that will be deallocated |
AI_API const AtMetaDataEntry * AiMetaDataIteratorGetNext | ( | AtMetaDataIterator * | iter | ) |
Returns current metadata entry and points metadata iterator to the next one.
This function is designed to be used inside a loop, as illustrated by the following example, which prints all the metadata of a given AtNodeEntry:
iter | a metadata iterator |
NULL
if there is no more metadata to iterate over AI_API bool AiMetaDataIteratorFinished | ( | const AtMetaDataIterator * | iter | ) |
Returns true if there is no more metadata to iterate over.
iter | a metadata iterator |