Go to the documentation of this file.
1 // Copyright 2020 Autodesk, Inc. All rights reserved.
2 //
3 // Use of this software is subject to the terms of the Autodesk license
4 // agreement provided at the time of installation or download, or which
5 // otherwise accompanies this software in either electronic or hard copy form.
12 #pragma once
13 #include "ai_params.h"
14 #include "ai_string.h"
16 // forward declarations
17 struct AtNode;
18 struct AtList;
19 struct AtParamIterator;
20 struct AtMetaDataIterator;
36 #define AI_NODE_UNDEFINED 0x0000
37 #define AI_NODE_OPTIONS 0x0001
38 #define AI_NODE_CAMERA 0x0002
39 #define AI_NODE_LIGHT 0x0004
40 #define AI_NODE_SHAPE 0x0008
41 #define AI_NODE_SHADER 0x0010
42 #define AI_NODE_OVERRIDE 0x0020
43 #define AI_NODE_DRIVER 0x0040
44 #define AI_NODE_FILTER 0x0080
45 #define AI_NODE_COLOR_MANAGER 0x0800
46 #define AI_NODE_OPERATOR 0x1000
47 #define AI_NODE_ALL 0xFFFF
48 /* \}*/
53 #define AI_NODE_SHAPE_PROCEDURAL 0x0100
54 #define AI_NODE_SHAPE_VOLUME 0x0200
55 #define AI_NODE_SHAPE_IMPLICIT 0x0400
56 /* \}*/
65 struct AtNodeEntry;
71 {
72  bool (*PluginInitialize)(void**);
73  void (*PluginCleanup )(void*);
74  void (*Parameters )(AtList*, AtNodeEntry*);
75  void (*Initialize )(AtNode*);
76  void (*Update )(AtNode*);
77  void (*Finish )(AtNode*);
78 };
84 {
86  const void* dmethods;
87 };
90 {
91  AtString name;
92  AtString param;
93  uint8_t type;
94  AtParamValue value;
95 };
101 AI_API AI_PURE const AtNodeEntry* AiNodeEntryLookUp (const AtString name);
102 AI_API AI_PURE const char* AiNodeEntryGetName (const AtNodeEntry* nentry);
103 AI_API AI_PURE AtString AiNodeEntryGetNameAtString (const AtNodeEntry* nentry);
104 AI_API AI_PURE int AiNodeEntryGetType (const AtNodeEntry* nentry);
105 AI_API AI_PURE const char* AiNodeEntryGetTypeName (const AtNodeEntry* nentry);
106 AI_API AI_PURE int AiNodeEntryGetDerivedType (const AtNodeEntry* nentry);
107 AI_API AI_PURE const char* AiNodeEntryGetDerivedTypeName(const AtNodeEntry* nentry);
108 AI_API AI_PURE int AiNodeEntryGetOutputType (const AtNodeEntry* nentry);
109 AI_API AI_PURE const char* AiNodeEntryGetFilename (const AtNodeEntry* nentry);
110 AI_API AI_PURE const char* AiNodeEntryGetVersion (const AtNodeEntry* nentry);
111 AI_API AI_PURE int AiNodeEntryGetCount (const AtNodeEntry* nentry);
112 AI_API AI_PURE int AiNodeEntryGetNumParams (const AtNodeEntry* nentry);
113 AI_API AI_PURE const AtParamEntry* AiNodeEntryGetParameter (const AtNodeEntry* nentry, int i);
114 AI_API AI_PURE const AtParamEntry* AiNodeEntryLookUpParameter (const AtNodeEntry* nentry, const AtString param);
116 #ifdef AI_CPU_COMPILER
117 // these are slower than the AtString versions
118 inline AI_DEPRECATED const AtNodeEntry* AiNodeEntryLookUp(const char* name) { return AiNodeEntryLookUp(AtString(name)); }
119 inline AI_DEPRECATED const AtParamEntry* AiNodeEntryLookUpParameter(const AtNodeEntry* nentry, const char* param) { return AiNodeEntryLookUpParameter(nentry, AtString(param)); }
120 #endif
122 AI_API AtParamIterator* AiNodeEntryGetParamIterator (const AtNodeEntry* nentry);
123 AI_API AtMetaDataIterator* AiNodeEntryGetMetaDataIterator(const AtNodeEntry* nentry, const char* param = NULL);
124 AI_API void AiNodeEntryInstall (int type, uint8_t output_type, const char* name, const char* filename, const AtNodeMethods* methods, const char* version);
125 AI_API void AiNodeEntryUninstall (const char* name);
126 /* \}*/
132 AI_API void AiParamIteratorDestroy(AtParamIterator* iter);
133 AI_API const AtParamEntry* AiParamIteratorGetNext(AtParamIterator* iter);
134 AI_API bool AiParamIteratorFinished(const AtParamIterator* iter);
135 /* \}*/
141 AI_API void AiMetaDataIteratorDestroy(AtMetaDataIterator* iter);
142 AI_API const AtMetaDataEntry* AiMetaDataIteratorGetNext(AtMetaDataIterator* iter);
143 AI_API bool AiMetaDataIteratorFinished(const AtMetaDataIterator* iter);
144 /* \}*/
146 /*\}*/
AI_API AI_PURE int AiNodeEntryGetDerivedType(const AtNodeEntry *nentry)
Return the derived type of the given AtNodeEntry.
Definition: ai_nodeentry.cpp:117
AI_API AI_PURE const char * AiNodeEntryGetName(const AtNodeEntry *nentry)
Return the name of the given AtNodeEntry.
Definition: ai_nodeentry.cpp:54
AI_API AI_PURE AtString AiNodeEntryGetNameAtString(const AtNodeEntry *nentry)
Return the name of the given AtNodeEntry as an AtString.
Definition: ai_nodeentry.cpp:65
const AtCommonMethods * cmethods
common methods
Definition: ai_node_entry.h:85
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.
Definition: ai_nodeentry.cpp:235
This represents a node in Arnold.
AI_API AtParamIterator * AiNodeEntryGetParamIterator(const AtNodeEntry *nentry)
Creates and returns a new AtParamIterator for this node entry.
Definition: ai_nodeentry.cpp:299
const void * dmethods
derived methods
Definition: ai_node_entry.h:86
Arnold String allows for fast string comparisons.
Definition: ai_string.h:46
AI_API void AiParamIteratorDestroy(AtParamIterator *iter)
Destroys a param iterator when it is no longer needed.
Definition: ai_nodeentry.cpp:309
AI_API void AiNodeEntryUninstall(const char *name)
Uninstall a node from the system.
Definition: ai_nodeentry.cpp:287
AI_API AI_PURE const char * AiNodeEntryGetVersion(const AtNodeEntry *nentry)
Return the version that this node was linked with.
Definition: ai_nodeentry.cpp:204
AI_API AI_PURE const char * AiNodeEntryGetDerivedTypeName(const AtNodeEntry *nentry)
Return the derived type of the given AtNodeEntry as a string, if applicable.
Definition: ai_nodeentry.cpp:130
Node methods.
Definition: ai_node_entry.h:83
AI_API const AtMetaDataEntry * AiMetaDataIteratorGetNext(AtMetaDataIterator *iter)
Returns current metadata entry and points metadata iterator to the next one.
Definition: ai_metadata.cpp:163
Methods common to all nodes.
Definition: ai_node_entry.h:70
AI_API AI_PURE int AiNodeEntryGetType(const AtNodeEntry *nentry)
Return the type of the given AtNodeEntry.
Definition: ai_nodeentry.cpp:76
AI_API AI_PURE int AiNodeEntryGetCount(const AtNodeEntry *nentry)
Return the number of instances of a particular node.
Definition: ai_nodeentry.cpp:217
AI_API bool AiMetaDataIteratorFinished(const AtMetaDataIterator *iter)
Returns true if there is no more metadata to iterate over.
Definition: ai_metadata.cpp:174
AI_API AI_PURE int AiNodeEntryGetOutputType(const AtNodeEntry *nentry)
Return the output type of the given AtNodeEntry.
Definition: ai_nodeentry.cpp:152
This represents a node type in Arnold.
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:361
AI_API AI_PURE const AtParamEntry * AiNodeEntryGetParameter(const AtNodeEntry *nentry, int i)
Return the i'th parameter in an AtNodeEntry.
Definition: ai_nodeentry.cpp:175
Actual parameter value for each supported type.
Definition: ai_params.h:105
AI_API bool AiParamIteratorFinished(const AtParamIterator *iter)
Returns true if there are no more parameters to iterate over.
Definition: ai_nodeentry.cpp:349
Definition: ai_node_entry.h:89
AI_API AI_PURE int AiNodeEntryGetNumParams(const AtNodeEntry *nentry)
Return the number of parameters of a given AtNodeEntry.
Definition: ai_nodeentry.cpp:163
Node parameters.
AI_API AI_PURE const char * AiNodeEntryGetTypeName(const AtNodeEntry *nentry)
Return the type of the given AtNodeEntry as a string.
Definition: ai_nodeentry.cpp:89
AI_API void AiMetaDataIteratorDestroy(AtMetaDataIterator *iter)
Destroys a metadata iterator when it is no longer needed.
Definition: ai_metadata.cpp:137
AI_API AI_PURE const AtNodeEntry * AiNodeEntryLookUp(const AtString name)
Look up a node entry from a name string.
Definition: ai_nodeentry.cpp:43
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:266
AI_API const AtParamEntry * AiParamIteratorGetNext(AtParamIterator *iter)
Returns current param entry and points param iterator to the next one.
Definition: ai_nodeentry.cpp:335
AI_API AI_PURE const char * AiNodeEntryGetFilename(const AtNodeEntry *nentry)
Return the filename (so/dll path) of an AtNodeEntry.
Definition: ai_nodeentry.cpp:187
AtString class for fast comparisons.

© 2020 Autodesk, Inc. · All rights reserved ·