For a discussion of Arnold's object-oriented system of pluggable nodes, please refer to AtNode API.
More...
|
#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_ALL 0xFFFF |
| Bitmask including all node types, used by AiASSWrite()
|
|
For a discussion of Arnold's object-oriented system of pluggable nodes, please refer to AtNode API.
AI_API const AtNodeEntry* AiNodeEntryLookUp |
( |
const char * |
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.
- Parameters
-
name | input node name (such as "lambert") |
- Returns
- pointer to the AtNodeEntry that matches the input name
AI_API const char* AiNodeEntryGetName |
( |
const AtNodeEntry * |
node_entry | ) |
|
Return the name of the given AtNodeEntry.
- Parameters
-
node_entry | input node entry |
- Returns
- name string, or NULL if node_entry is NULL
AI_API int AiNodeEntryGetType |
( |
const AtNodeEntry * |
node_entry | ) |
|
Return the type of the given AtNodeEntry.
- Parameters
-
node_entry | input node entry |
- Returns
- type of node (
AI_NODE_SHADER
, etc), or 0 if node_entry is NULL
AI_API const char* AiNodeEntryGetTypeName |
( |
const AtNodeEntry * |
node_entry | ) |
|
Return the type of the given AtNodeEntry as a string.
For example, a node of type AI_NODE_LIGHT
would return "light"
- Parameters
-
node_entry | input node entry |
- Returns
- type string, or NULL if node_entry is NULL
AI_API int AiNodeEntryGetOutputType |
( |
const AtNodeEntry * |
node_entry | ) |
|
Return the output type of the given AtNodeEntry.
- Parameters
-
node_entry | input node entry |
- Returns
- output type (
AI_TYPE_RGB
, etc)
AI_API const char* AiNodeEntryGetFilename |
( |
const AtNodeEntry * |
node_entry | ) |
|
Return the filename (so/dll path) of an AtNodeEntry.
- Parameters
-
node_entry | input node entry |
- Returns
- string with the path ot the dynamic library where this node was installed from, NULL if this is a built-in node
AI_API const char* AiNodeEntryGetVersion |
( |
const AtNodeEntry * |
node_entry | ) |
|
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.
- Parameters
-
node_entry | input node entry |
- Returns
- string containing the Arnold version that this node was linked with.
AI_API int AiNodeEntryGetCount |
( |
const AtNodeEntry * |
node_entry | ) |
|
Return the number of instances of a particular node.
- Parameters
-
node_entry | input node entry |
- Returns
- number of nodes of this type that have been created so far (for example, how many "sphere" nodes exist in memory), or 0 if node_entry is NULL
AI_API int AiNodeEntryGetNumParams |
( |
const AtNodeEntry * |
node_entry | ) |
|
Return the number of parameters of a given AtNodeEntry.
- Parameters
-
node_entry | input node entry |
- Returns
- number of parameters in the node, or 0 if node_entry is NULL
AI_API const AtParamEntry* AiNodeEntryGetParameter |
( |
const AtNodeEntry * |
node_entry, |
|
|
int |
i |
|
) |
| |
Return the i'th parameter in an AtNodeEntry.
- Parameters
-
node_entry | input node entry |
i | parameter index, in 0..num_params-1 |
- Returns
- the i'th parameter entry in this node
AI_API const AtParamEntry* AiNodeEntryLookUpParameter |
( |
const AtNodeEntry * |
node_entry, |
|
|
const char * |
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.
- Parameters
-
node_entry | input node entry |
name | parameter name that we are looking for (such as "samples") |
- Returns
- pointer to the AtParamEntry that matches the parameter name, or NULL if either node_entry is NULL or the parameter is not found
AI_API AtParamIterator* AiNodeEntryGetParamIterator |
( |
const AtNodeEntry * |
nentry | ) |
|
Creates and returns a new AtParamIterator for this node entry.
- Parameters
-
nentry | node entry whose parameters will be iterated over |
- Returns
- an iterator over all built-in parameters on this node entry
AI_API AtMetaDataIterator* AiNodeEntryGetMetaDataIterator |
( |
const AtNodeEntry * |
nentry, |
|
|
const char * |
param |
|
) |
| |
Creates and returns a new AtMetaDataIterator for this node entry.
- Parameters
-
nentry | node entry whose metadata will be iterated over |
param | selects a specific parameter to get its metadata or NULL for node metadata |
- Returns
- an iterator over metadata on this node entry
AI_API void AiNodeEntryInstall |
( |
int |
type, |
|
|
AtByte |
output_type, |
|
|
const char * |
name, |
|
|
const char * |
filename, |
|
|
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:
- Parameters
-
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.
- Parameters
-
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.
- Parameters
-
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:
- Parameters
-
- Returns
- the current param entry pointed by the iterator, or
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.
- Parameters
-
- Returns
- true if the param iterator has moved past the last parameter
AI_API void AiMetaDataIteratorDestroy |
( |
AtMetaDataIterator * |
iter | ) |
|
Destroys a metadata iterator when it is no longer needed.
- Parameters
-
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:
{
printf("%s\n", entry->name);
}
- Parameters
-
- Returns
- the current metadata entry pointed by the iterator, or
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.
- Parameters
-
- Returns
- true if the metadata iterator has moved past the last entry