23struct AtUserParamEntry;
24struct AtUserParamIterator;
72#define node_parameters \
73static void Parameters(AtList* params, AtNodeEntry* nentry)
76#define node_plugin_initialize \
77static bool PluginInitialize(void** plugin_data); \
78AI_OPTIONAL_METHOD_INSTALL(ai_common_mtds, PluginInitialize) \
79static bool PluginInitialize(void** plugin_data)
82#define node_plugin_cleanup \
83static void PluginCleanup(void* plugin_data); \
84AI_OPTIONAL_METHOD_INSTALL(ai_common_mtds, PluginCleanup) \
85static void PluginCleanup(void* plugin_data)
102#define node_initialize \
103static void Initialize(AtRenderSession* render_session, AtNode* node)
117static void Update(AtRenderSession* render_session, AtNode* node)
132static void Finish(AtNode* node)
136AI_EXPORT_LIB bool NodeLoader(int i, AtNodeLib* node)
140#define AI_INSTANCE_COMMON_METHODS \
145static AtCommonMethods ai_common_mtds = { \
155#define AI_INSTANCE_COMMON_SHAPE_METHODS \
157static AtCommonMethods ai_common_mtds = { \
206#ifdef AI_CPU_COMPILER
229AI_API
void AiNodeSetByte (
AtNode* node,
const AtString param, uint8_t val);
231AI_API
void AiNodeSetUInt (
AtNode* node,
const AtString param,
unsigned int val);
232AI_API
void AiNodeSetBool (
AtNode* node,
const AtString param,
bool val);
233AI_API
void AiNodeSetFlt (
AtNode* node,
const AtString param,
float val);
234AI_API
void AiNodeSetPtr (
AtNode* node,
const AtString param,
void* val);
238AI_API
void AiNodeSetRGB (
AtNode* node,
const AtString param,
float r,
float g,
float b);
239AI_API
void AiNodeSetRGBA (
AtNode* node,
const AtString param,
float r,
float g,
float b,
float a);
240AI_API
void AiNodeSetVec (
AtNode* node,
const AtString param,
float x,
float y,
float z);
241AI_API
void AiNodeSetVec2 (
AtNode* node,
const AtString param,
float x,
float y);
243#ifdef AI_CPU_COMPILER
245inline AI_DEPRECATED
void AiNodeSetByte (
AtNode* node,
const char* param, uint8_t val) { AiNodeSetByte (node,
AtString(param), val); }
247inline AI_DEPRECATED
void AiNodeSetUInt (
AtNode* node,
const char* param,
unsigned int val) { AiNodeSetUInt (node,
AtString(param), val); }
248inline AI_DEPRECATED
void AiNodeSetBool (
AtNode* node,
const char* param,
bool val) { AiNodeSetBool (node,
AtString(param), val); }
249inline AI_DEPRECATED
void AiNodeSetFlt (
AtNode* node,
const char* param,
float val) { AiNodeSetFlt (node,
AtString(param), val); }
250inline AI_DEPRECATED
void AiNodeSetPtr (
AtNode* node,
const char* param,
void* val) { AiNodeSetPtr (node,
AtString(param), val); }
252inline AI_DEPRECATED
void AiNodeSetMatrix(
AtNode* node,
const char* param,
AtMatrix val) { AiNodeSetMatrix(node,
AtString(param), val); }
253inline AI_DEPRECATED
void AiNodeSetStr (
AtNode* node,
const char* param,
const char* str) { AiNodeSetStr (node,
AtString(param),
AtString(str)); }
254inline AI_DEPRECATED
void AiNodeSetRGB (
AtNode* node,
const char* param,
float r,
float g,
float b) { AiNodeSetRGB (node,
AtString(param), r, g, b); }
255inline AI_DEPRECATED
void AiNodeSetRGBA (
AtNode* node,
const char* param,
float r,
float g,
float b,
float a) { AiNodeSetRGBA (node,
AtString(param), r, g, b, a); }
256inline AI_DEPRECATED
void AiNodeSetVec (
AtNode* node,
const char* param,
float x,
float y,
float z) { AiNodeSetVec (node,
AtString(param), x, y, z); }
257inline AI_DEPRECATED
void AiNodeSetVec2 (
AtNode* node,
const char* param,
float x,
float y) { AiNodeSetVec2 (node,
AtString(param), x, y); }
268AI_API uint8_t AiNodeGetByte (
const AtNode* node,
const AtString param);
270AI_API
unsigned int AiNodeGetUInt (
const AtNode* node,
const AtString param);
271AI_API
bool AiNodeGetBool (
const AtNode* node,
const AtString param);
272AI_API
float AiNodeGetFlt (
const AtNode* node,
const AtString param);
278AI_API
void* AiNodeGetPtr (
const AtNode* node,
const AtString param);
279AI_API AtArray* AiNodeGetArray (
const AtNode* node,
const AtString param);
282#ifdef AI_CPU_COMPILER
284inline AI_DEPRECATED uint8_t AiNodeGetByte (
const AtNode* node,
const char* param) {
return AiNodeGetByte (node,
AtString(param)); }
286inline AI_DEPRECATED
unsigned int AiNodeGetUInt (
const AtNode* node,
const char* param) {
return AiNodeGetUInt (node,
AtString(param)); }
287inline AI_DEPRECATED
bool AiNodeGetBool (
const AtNode* node,
const char* param) {
return AiNodeGetBool (node,
AtString(param)); }
288inline AI_DEPRECATED
float AiNodeGetFlt (
const AtNode* node,
const char* param) {
return AiNodeGetFlt (node,
AtString(param)); }
289inline AI_DEPRECATED
AtRGB AiNodeGetRGB (
const AtNode* node,
const char* param) {
return AiNodeGetRGB (node,
AtString(param)); }
290inline AI_DEPRECATED
AtRGBA AiNodeGetRGBA (
const AtNode* node,
const char* param) {
return AiNodeGetRGBA (node,
AtString(param)); }
291inline AI_DEPRECATED
AtVector AiNodeGetVec (
const AtNode* node,
const char* param) {
return AiNodeGetVec (node,
AtString(param)); }
292inline AI_DEPRECATED
AtVector2 AiNodeGetVec2 (
const AtNode* node,
const char* param) {
return AiNodeGetVec2 (node,
AtString(param)); }
293inline AI_DEPRECATED
AtString AiNodeGetStr (
const AtNode* node,
const char* param) {
return AiNodeGetStr (node,
AtString(param)); }
294inline AI_DEPRECATED
void* AiNodeGetPtr (
const AtNode* node,
const char* param) {
return AiNodeGetPtr (node,
AtString(param)); }
295inline AI_DEPRECATED AtArray* AiNodeGetArray (
const AtNode* node,
const char* param) {
return AiNodeGetArray (node,
AtString(param)); }
296inline AI_DEPRECATED
AtMatrix AiNodeGetMatrix(
const AtNode* node,
const char* param) {
return AiNodeGetMatrix(node,
AtString(param)); }
302#define AiNodeDeclareGPULocalData(type) namespace {}
DLL export prefix for API functions (necessary for multi-platform development)
AtNodeEntry type and methods.
AtString class for fast comparisons.
Arnold String allows for fast string comparisons.
Definition: ai_string.h:54
AI_API void AiNodeClearDependency(AtNode *consumer, const AtNode *producer)
Removes any update dependency between a specific consumer and producer nodes.
Definition: ai_nodes.cpp:1174
AI_API AtNode * AiNode(AtUniverse *universe, const AtString nentry_name, const AtString name=AtString(), const AtNode *parent=NULL)
Create a fresh instantiation of a node in a specific Arnold universe.
Definition: ai_nodes.cpp:281
AI_API void AiNodeSetLocalData(AtNode *node, void *data)
Sets local data pointer in the node.
Definition: ai_nodes.cpp:232
AI_API AtNode * AiNodeGetProcessedGeometry(AtNode *source_node, AtUniverse *dest_universe)
Returns a node representing the final processed/baked geometry which Arnold renders.
Definition: ai_nodes.cpp:1042
AI_API AtNode * AiNodeGetLinkOutput(const AtNode *node, const char *input, int &output_param, int &output_comp)
Returns the node, node output, and output component connected to a given node input parameter.
Definition: ai_nodes.cpp:515
AI_API AI_PURE AtNode * AiNodeGetParent(const AtNode *node)
Returns the procedural parent of a node.
Definition: ai_nodes.cpp:997
AI_API bool AiNodeUnlink(AtNode *node, const char *input)
Removes a connection from a node input parameter.
Definition: ai_nodes.cpp:433
AI_API AI_PURE const char * AiNodeGetName(const AtNode *node)
Return the node's name.
Definition: ai_nodes.cpp:191
AI_API const AtUserParamEntry * AiUserParamIteratorGetNext(AtUserParamIterator *iter)
Returns current user param entry and points user param iterator to the next one.
Definition: ai_nodes.cpp:164
AI_API AI_PURE bool AiNodeIs(const AtNode *node, AtString str)
Compare the node type against a string.
Definition: ai_nodes.cpp:542
AI_API bool AiNodeLink(AtNode *src, const char *input, AtNode *target)
Creates a connection between two shader nodes.
Definition: ai_nodes.cpp:349
AI_API AtNode * AiNodeGetLink(const AtNode *node, const char *input, int *comp=NULL)
Returns the node connected to a given node input parameter.
Definition: ai_nodes.cpp:485
AI_API AI_PURE bool AiNodeIsDisabled(const AtNode *node)
Check if a node has been disabled or not.
Definition: ai_nodes.cpp:978
AI_API bool AiUserParamIteratorFinished(const AtUserParamIterator *iter)
Returns true if there are no more user parameters to iterate over.
Definition: ai_nodes.cpp:175
AI_API AI_PURE bool AiNodeIsLinked(const AtNode *node, const char *input)
Returns true if the input parameter is linked.
Definition: ai_nodes.cpp:460
AI_API void AiNodeAddDependencyParam(AtNode *consumer, const AtNode *producer, const AtString param)
Use AiNodeAddDependency instead.
Definition: ai_nodes.cpp:1146
AI_API AtUserParamIterator * AiNodeGetUserParamIterator(const AtNode *node)
Creates and returns a new AtUserParamIterator for this node.
Definition: ai_nodes.cpp:123
AI_API AI_PURE AtUniverse * AiNodeGetUniverse(const AtNode *node)
Returns the universe a node belongs to.
Definition: ai_nodes.cpp:1010
AI_API void AiNodeSetArray(AtNode *node, const AtString param, AtArray *val)
Set the value of an array parameter.
Definition: ai_nodes.cpp:877
AI_API void AiNodeSetAttributes(AtNode *node, const char *attributes)
Set the parameters of a node through an attributes string.
Definition: ai_nodes.cpp:946
AI_API void AiNodeReplace(AtNode *old_node, AtNode *new_node, bool remove)
Replace an existing node with another, updating all references to that node.
Definition: ai_nodes.cpp:664
AI_API AI_PURE AtNode * AiNodeLookUpByName(const AtUniverse *universe, const AtString name, const AtNode *parent=NULL)
Search for a specific node in the given universe using the specified name string (which can be a simp...
Definition: ai_nodes.cpp:56
AI_API AI_DEPRECATED void AiNodeAddDependency(AtNode *consumer, const AtNode *producer)
This version of the AiNodeAddDependency API is deprecated.
Definition: ai_nodes.cpp:1161
AI_API int AiNodeGetInt(const AtNode *node, const AtString param)
Return the value of an integer parameter.
Definition: ai_nodes.cpp:758
AI_API void AiUserParamIteratorDestroy(AtUserParamIterator *iter)
Destroys a user param iterator when it is no longer needed.
Definition: ai_nodes.cpp:133
AI_API AI_PURE void * AiNodeGetLocalData(const AtNode *node)
Returns a pointer to the local data in the node.
Definition: ai_nodes.cpp:213
AI_API AI_PURE const AtUserParamEntry * AiNodeLookUpUserParameter(const AtNode *node, const AtString param)
Return the user-defined parameter entry that matches a given name.
Definition: ai_nodes.cpp:111
AI_API AtNode * AiNodeClone(const AtNode *node, const AtString new_name=AtString(), const AtNode *parent=NULL)
Return an exact clone of a source node.
Definition: ai_nodes.cpp:616
AI_API AI_PURE void * AiNodeGetPluginData(const AtNode *node)
Returns a pointer to the per plugin data for the node type, as created in the node_plugin_initialize ...
Definition: ai_nodes.cpp:250
AI_API bool AiNodeDeclare(AtNode *node, const AtString param, const char *declaration)
Declare a user-defined parameter for this node.
Definition: ai_nodes.cpp:720
AI_API bool AiNodeDestroy(AtNode *node)
Destroy an existing node.
Definition: ai_nodes.cpp:640
AI_API AI_PURE const AtNodeEntry * AiNodeGetNodeEntry(const AtNode *node)
Return the node entry for this node.
Definition: ai_nodes.cpp:202
AI_API void AiNodeResetParameter(AtNode *node, const char *param)
Reset a node parameter to its default value and remove any links to that parameter.
Definition: ai_nodes.cpp:578
AI_API bool AiNodeLinkOutput(AtNode *src, const char *output, AtNode *target, const char *input)
Creates a connection between two shader nodes.
Definition: ai_nodes.cpp:408
AI_API void AiNodeReset(AtNode *node)
Reset all node parameters to their default values and remove any input links.
Definition: ai_nodes.cpp:557
AI_API void AiNodeSetDisabled(AtNode *node, bool disabled)
Disable or enable any node in the scene.
Definition: ai_nodes.cpp:966
AI_API void AiNodeSetInt(AtNode *node, const AtString param, int val)
Set the value of an integer parameter.
Definition: ai_nodes.cpp:746
Definition: ai_matrix.h:30
This represents a node type in Arnold.
This represents a node in Arnold.
RGB color + alpha.
Definition: ai_color.h:267
RGB color.
Definition: ai_color.h:32
This represents a universe in Arnold.
2D point
Definition: ai_vector.h:255
3D point (single precision)
Definition: ai_vector.h:30