Data Structures | Variables
AtNodeEntry API

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 AtCommonMethodsAtNodeMethods::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 AtNodeEntryAiNodeEntryLookUp (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 AtNodeEntryAiNodeEntryLookUp (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 AtMetaDataEntryAiMetaDataIteratorGetNext (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.
 

Detailed Description

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.

Function Documentation

◆ AiNodeEntryLookUp()

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.

Parameters
nameinput node name (such as "lambert")
Returns
pointer to the AtNodeEntry that matches the input name

◆ AiNodeEntryGetName()

AI_API AI_PURE const char * AiNodeEntryGetName ( const AtNodeEntry nentry)

Return the name of the given AtNodeEntry.

Parameters
nentryinput node entry
Returns
name string, or NULL if nentry is NULL

◆ AiNodeEntryGetNameAtString()

AI_API AI_PURE AtString AiNodeEntryGetNameAtString ( const AtNodeEntry nentry)

Return the name of the given AtNodeEntry as an AtString.

Parameters
nentryinput node entry
Returns
AtString name string, or NULL AtString if nentry is NULL

◆ AiNodeEntryGetType()

AI_API AI_PURE int AiNodeEntryGetType ( const AtNodeEntry nentry)

Return the type of the given AtNodeEntry.

Parameters
nentryinput node entry
Returns
type of node (AI_NODE_SHADER, etc), or 0 if nentry is NULL

◆ AiNodeEntryGetTypeName()

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"

Parameters
nentryinput node entry
Returns
type string, or NULL if nentry is NULL

◆ AiNodeEntryGetDerivedType()

AI_API AI_PURE int AiNodeEntryGetDerivedType ( const AtNodeEntry nentry)

Return the derived type of the given AtNodeEntry.

Parameters
nentryinput node entry
Returns
derived type of node (AI_NODE_SHAPE_VOLUME, etc), or 0 if nentry is either NULL or a non-derived type

◆ AiNodeEntryGetDerivedTypeName()

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"

Parameters
nentryinput node entry
Returns
type string, or NULL if nentry is NULL or not a derived type

◆ AiNodeEntryGetOutputType()

AI_API AI_PURE int AiNodeEntryGetOutputType ( const AtNodeEntry nentry)

Return the output type of the given AtNodeEntry.

Parameters
nentryinput node entry
Returns
output type (AI_TYPE_RGB, etc)

◆ AiNodeEntryGetFilename()

AI_API AI_PURE const char * AiNodeEntryGetFilename ( const AtNodeEntry nentry)

Return the filename (so/dll path) of an AtNodeEntry.

Parameters
nentryinput 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

◆ AiNodeEntryGetVersion()

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.

Parameters
nentryinput node entry
Returns
string containing the Arnold version that this node was linked with.

◆ AiNodeEntryGetCount()

AI_API AI_PURE int AiNodeEntryGetCount ( const AtNodeEntry nentry)

Return the number of instances of a particular node.

Parameters
nentryinput 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 nentry is NULL

◆ AiNodeEntryGetNumParams()

AI_API AI_PURE int AiNodeEntryGetNumParams ( const AtNodeEntry nentry)

Return the number of parameters of a given AtNodeEntry.

Parameters
nentryinput node entry
Returns
number of parameters in the node, or 0 if nentry is NULL

◆ AiNodeEntryGetParameter()

AI_API AI_PURE const AtParamEntry * AiNodeEntryGetParameter ( const AtNodeEntry nentry,
int  i 
)

Return the i'th parameter in an AtNodeEntry.

Parameters
nentryinput node entry
iparameter index, in 0..num_params-1
Returns
the i'th parameter entry in this node

◆ AiNodeEntryLookUpParameter()

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.

Parameters
nentryinput node entry
nameparameter name that we are looking for (such as "samples")
Returns
pointer to the AtParamEntry that matches the parameter name, or NULL if either nentry is NULL or the parameter is not found

◆ AiNodeEntryGetNumOutputs()

AI_API AI_PURE int AiNodeEntryGetNumOutputs ( const AtNodeEntry nentry)

Return the number of outputs of a given AtNodeEntry.

Parameters
nentryinput node entry
Returns
number of outputs in the node, or 0 if nentry is NULL

◆ AiNodeEntryGetOutput()

AI_API AI_PURE const AtParamEntry * AiNodeEntryGetOutput ( const AtNodeEntry nentry,
int  i 
)

Return the i'th output AtParamEntry in an AtNodeEntry.

Parameters
nentryinput node entry
ioutput index, in 0..num_outputs-1
Returns
the i'th output parameter entry in this node

◆ AiNodeEntryLookUpOutput()

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.

Parameters
nentryinput node entry
nameoutput parameter name that we are looking for (such as "result")
Returns
pointer to the AtParamEntry that matches the output parameter name, or NULL if either nentry is NULL or the output parameter is not found

◆ AiNodeEntryGetParamIterator()

AI_API AtParamIterator * AiNodeEntryGetParamIterator ( const AtNodeEntry nentry)

Creates and returns a new AtParamIterator for this node entry.

Parameters
nentrynode entry whose parameters will be iterated over
Returns
an iterator over all built-in parameters on this node entry

◆ AiNodeEntryGetMetaDataIterator()

AI_API AtMetaDataIterator * AiNodeEntryGetMetaDataIterator ( const AtNodeEntry nentry,
const char *  param 
)

Creates and returns a new AtMetaDataIterator for this node entry.

Parameters
nentrynode entry whose metadata will be iterated over
paramselects a specific parameter to get its metadata or NULL for node metadata
Returns
an iterator over metadata on this node entry

◆ AiNodeEntryInstall()

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:

AiNodeEntryInstall(AI_NODE_SHAPE, AI_TYPE_UNDEFINED, "sphere", "<built-in>", SphMethods, AI_VERSION);
AiNodeEntryInstall(AI_NODE_SHADER, AI_TYPE_FLOAT, "fBm_noise", "./shaders/fBm_noise.so", fBmMethods, AI_VERSION);
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.
Definition: ai_nodeentry.cpp:308
#define AI_NODE_SHAPE
Geometry nodes (sphere, polymesh, etc)
Definition: ai_node_entry.h:41
#define AI_NODE_SHADER
Shader nodes (lambert, etc)
Definition: ai_node_entry.h:42
#define AI_TYPE_FLOAT
float (Single-precision floating point number)
Definition: ai_params.h:74
#define AI_TYPE_UNDEFINED
Undefined, you should never encounter a parameter of this type.
Definition: ai_params.h:88
#define AI_VERSION
Full Arnold version as string.
Definition: ai_version.h:58
Parameters
typetype of node (AI_NODE_CAMERA, AI_NODE_SHADER, etc)
output_typefor shader nodes, which can link their output to the input of another shader, this is the output type (AI_TYPE_RGB, etc)
namename string of the newly created node type
filenamestring 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
methodspointer to the node methods
versionArnold version string that this node is linked with

◆ AiNodeEntryUninstall()

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
namename of the node to be removed from the system

◆ AiParamIteratorDestroy()

AI_API void AiParamIteratorDestroy ( AtParamIterator *  iter)

Destroys a param iterator when it is no longer needed.

Parameters
iterparam iterator that will be deallocated

◆ AiParamIteratorGetNext()

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:

AtParamIterator *iter = AiNodeEntryGetParamIterator(nentry);
{
AtParamEntry *pentry = AiParamIteratorGetNext(iter);
printf("%s\n", AiParamGetName(pentry));
}
AI_API void AiParamIteratorDestroy(AtParamIterator *iter)
Destroys a param iterator when it is no longer needed.
Definition: ai_nodeentry.cpp:351
AI_API const AtParamEntry * AiParamIteratorGetNext(AtParamIterator *iter)
Returns current param entry and points param iterator to the next one.
Definition: ai_nodeentry.cpp:377
AI_API bool AiParamIteratorFinished(const AtParamIterator *iter)
Returns true if there are no more parameters to iterate over.
Definition: ai_nodeentry.cpp:391
AI_API AtParamIterator * AiNodeEntryGetParamIterator(const AtNodeEntry *nentry)
Creates and returns a new AtParamIterator for this node entry.
Definition: ai_nodeentry.cpp:341
AI_API AI_PURE AtString AiParamGetName(const AtParamEntry *pentry)
Return the name of a given parameter.
Definition: ai_paramentry.cpp:86
Parameters
itera param iterator
Returns
the current param entry pointed by the iterator, or NULL if there are no more parameters to iterate over

◆ AiParamIteratorFinished()

AI_API bool AiParamIteratorFinished ( const AtParamIterator *  iter)

Returns true if there are no more parameters to iterate over.

Parameters
itera param iterator
Returns
true if the param iterator has moved past the last parameter

◆ AiMetaDataIteratorDestroy()

AI_API void AiMetaDataIteratorDestroy ( AtMetaDataIterator *  iter)

Destroys a metadata iterator when it is no longer needed.

Parameters
itermetadata iterator that will be deallocated

◆ AiMetaDataIteratorGetNext()

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:

AtMetaDataIterator *iter = AiNodeEntryGetMetaDataIterator(nentry);
{
printf("%s\n", entry->name);
}
AI_API bool AiMetaDataIteratorFinished(const AtMetaDataIterator *iter)
Returns true if there is no more metadata to iterate over.
Definition: ai_metadata.cpp:176
AI_API AtMetaDataIterator * AiNodeEntryGetMetaDataIterator(const AtNodeEntry *nentry, const char *param=NULL)
Creates and returns a new AtMetaDataIterator for this node entry.
Definition: ai_nodeentry.cpp:403
AI_API const AtMetaDataEntry * AiMetaDataIteratorGetNext(AtMetaDataIterator *iter)
Returns current metadata entry and points metadata iterator to the next one.
Definition: ai_metadata.cpp:165
AI_API void AiMetaDataIteratorDestroy(AtMetaDataIterator *iter)
Destroys a metadata iterator when it is no longer needed.
Definition: ai_metadata.cpp:139
Definition: ai_node_entry.h:92
Parameters
itera metadata iterator
Returns
the current metadata entry pointed by the iterator, or NULL if there is no more metadata to iterate over

◆ AiMetaDataIteratorFinished()

AI_API bool AiMetaDataIteratorFinished ( const AtMetaDataIterator *  iter)

Returns true if there is no more metadata to iterate over.

Parameters
itera metadata iterator
Returns
true if the metadata iterator has moved past the last entry

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