9 #ifndef __HOM_OpNode_h__
10 #define __HOM_OpNode_h__
30 virtual std::vector<std::string> _getArgumentAutoComplete(
31 const char *method_name,
const char *arguments,
32 bool meta_info_only =
false) = 0;
41 virtual int opTypeIdAsInt() = 0;
46 virtual int objTypeAsInt() = 0;
49 virtual void setCreatorState(
const char *state) = 0;
51 virtual bool isBuiltExplicitly() = 0;
52 virtual void setBuiltExplicitly(
bool built_explicitly) = 0;
55 virtual void setExpressionLanguage(
HOM_EnumValue &language) = 0;
58 virtual HOM_Parm *parm(
const char* parm_path) = 0;
66 bool search_label=
false,
67 bool single_pattern=
false) = 0;
69 virtual std::vector<HOM_ElemPtr<HOM_Parm> > parms() = 0;
71 virtual std::vector<HOM_ElemPtr<HOM_Parm> > parmsReferencingThis() = 0;
73 virtual std::vector<HOM_ElemPtr<HOM_ParmTuple> > parmTuples() = 0;
75 virtual std::vector<HOM_ElemPtr<HOM_Parm> > spareParms() = 0;
76 virtual void removeSpareParms() = 0;
78 virtual void syncNodeVersionIfNeeded(
const std::string &from_version) = 0;
80 SWIGOUT(%kwargs setParmTemplateGroup;)
81 virtual void setParmTemplateGroup(
83 bool rename_conflicting_parms=
false) = 0;
85 virtual std::vector<HOM_ElemPtr<HOM_ParmTuple> > parmTuplesInFolder(
86 const std::vector<std::string> &folder_names) = 0;
88 virtual std::vector<HOM_ElemPtr<HOM_Parm> > parmsInFolder(
89 const std::vector<std::string> &folder_names) = 0;
91 SWIGOUT(%newobject parmTemplateGroup;)
94 virtual std::vector<std::string> localVariables() = 0;
95 virtual std::vector<std::string> localAttributes() = 0;
100 references(
bool include_children=
true) = 0;
103 dependents(
bool include_children=
true) = 0;
104 SWIGOUT(%kwargs fileReferences;)
105 SWIGOUT(%newobject fileReferences;)
107 fileReferences(
bool recurse =
true,
108 const char* project_dir_variable =
"HIP",
109 bool include_all_refs =
true) = 0;
110 virtual bool isTimeDependent() = 0;
113 SWIGOUT(%kwargs allowEditingOfContents;)
114 virtual void allowEditingOfContents(
bool propagate=
false) = 0;
115 virtual void matchCurrentDefinition() = 0;
116 virtual bool matchesCurrentDefinition() = 0;
118 virtual void syncDelayedDefinition() = 0;
119 virtual bool isDelayedDefinition() = 0;
123 parmAliases(
bool recurse=
false) = 0;
125 virtual void clearParmAliases() = 0;
127 SWIGOUT(%kwargs createCompiledDigitalAsset);
128 virtual void createCompiledDigitalAsset(
const char *
name=NULL,
129 const char *hda_file_name=NULL,
const char *description=NULL) = 0;
130 virtual bool isInsideLockedHDA() = 0;
131 virtual bool isEditableInsideLockedHDA() = 0;
132 virtual bool isLockedHDA() = 0;
133 virtual bool isCompiled() = 0;
134 virtual bool isMaterialManager() = 0;
136 virtual int outputForViewFlag() = 0;
137 virtual void setOutputForViewFlag(
int output) = 0;
140 SWIGOUT(%newobject hdaViewerStateModule;)
142 SWIGOUT(%newobject hdaViewerHandleModule;)
147 {
return hdaModule(); }
148 SWIGOUT(%kwargs createDigitalAsset);
149 SWIGOUT(%newobject createDigitalAsset;)
150 virtual HOM_Node *createDigitalAsset(
const char *
name=NULL,
151 const char *hda_file_name=NULL,
const char *description=NULL,
152 int min_num_inputs=0,
int max_num_inputs=0,
153 bool compress_contents=
false,
const char *comment=NULL,
154 const char *
version=NULL,
bool save_as_embedded=
false,
155 bool ignore_external_references=
false,
156 bool compile_asset =
false,
157 bool change_node_type =
true,
158 bool create_backup =
true,
159 const char *install_path=NULL) = 0;
161 SWIGOUT(%kwargs changeNodeType);
162 SWIGOUT(%newobject changeNodeType;)
163 virtual HOM_Node *changeNodeType(
const char *new_node_type,
164 bool keep_name=
true,
bool keep_parms=
true,
165 bool keep_network_contents=
true,
166 bool force_change_on_node_type_match=
false) = 0;
172 virtual void selectNextVisibleWorkItem() = 0;
173 virtual void selectPreviousVisibleWorkItem() = 0;
174 virtual void deselectWorkItem() = 0;
175 virtual void setCurrentTOPPage(
int page) = 0;
177 virtual bool canGenerateCookCode(
bool check_parent=
false,
178 bool check_auto_shader=
true) = 0;
179 SWIGOUT(%newobject cookCodeGeneratorNode;)
180 virtual HOM_Node *cookCodeGeneratorNode() = 0;
182 virtual bool supportsMultiCookCodeContexts() = 0;
184 SWIGOUT(%kwargs saveCookCodeToFile;)
185 virtual void saveCookCodeToFile(
186 const char *file_name,
bool skip_header=
false,
187 const char *context_name = NULL) = 0;
191 const char *context_name = NULL)
192 { saveCookCodeToFile(file_name, skip_header, context_name); }
194 virtual void saveCompiledCookCodeToFile(
const char *file_name,
195 const char *context_name = NULL) = 0;
199 const char *context_name = NULL)
200 { saveCompiledCookCodeToFile(file_name, context_name); }
205 const std::vector<double> frame_range = std::vector<double>()) = 0;
207 SWIGOUT(%kwargs cookNoInterruptInternal;)
208 virtual void _cookNoInterruptInternal(
210 const std::vector<double> frame_range = std::vector<double>()) = 0;
213 virtual bool needsToCook() = 0;
215 virtual bool needsToCook(
double time) = 0;
217 virtual int cookCount() = 0;
218 virtual std::vector<HOM_ElemPtr<HOM_Node> > cookPathNodes() = 0;
221 bool verbose =
false,
223 int output_index = 0,
224 bool force_cook =
false) = 0;
226 virtual void updateParmStates() = 0;
228 virtual void runInitScripts() = 0;
230 virtual void setDeleteScript(
const std::string &script_text,
233 SWIGOUT(%newobject addNodeGroup;)
236 virtual std::vector<HOM_ElemPtr<HOM_NodeGroup> > nodeGroups() = 0;
241 virtual std::string motionEffectsNetworkPath() = 0;
242 SWIGOUT(%newobject findOrCreateMotionEffectsNetwork;)
243 virtual HOM_Node *findOrCreateMotionEffectsNetwork(
bool create=
true) = 0;
244 virtual void createOrMoveVisualizer(
int output_index) = 0;
246 SWIGOUT(%kwargs saveItemsToFile;)
247 virtual void saveItemsToFile(
248 const std::vector<HOM_NetworkMovableItem *> &items,
249 const char *file_name,
250 bool save_hda_fallbacks =
false) = 0;
251 SWIGOUT(%kwargs loadItemsFromFile;)
252 virtual void loadItemsFromFile(
253 const char *file_name,
bool ignore_load_warnings=
false) = 0;
256 virtual void addOpaqueEventCallback(
257 const std::vector<HOM_EnumValue *> &event_types,
258 void *py_callback) = 0;
260 virtual void addOpaqueParmCallback(
262 const std::vector<std::string> &names) = 0;
264 virtual void removeOpaqueEventCallback(
265 const std::vector<HOM_EnumValue *> &event_types,
266 void *py_callback) = 0;
267 virtual void removeAllEventCallbacks() = 0;
269 virtual std::vector<std::pair<std::vector<HOM_EnumValue *>,
void *> >
270 opaqueEventCallbacks() = 0;
273 virtual int getUniqueId() = 0;
275 virtual double stampValue(
const char *
name,
double default_value) = 0;
277 const char *
name,
const char *default_value) = 0;
283 bool save_channels_only=
false,
284 bool save_creation_commands=
true,
285 bool save_keys_in_frames=
false,
286 bool save_outgoing_wires=
false,
287 bool save_parm_values_only=
false,
288 bool save_spare_parms=
true,
289 bool save_box_membership=
true,
290 const char *function_name=NULL) = 0;
294 virtual std::vector<std::string> dataBlockKeys(
295 const char *blocktype =
nullptr) = 0;
296 virtual std::string dataBlockType(
const char *key) = 0;
300 const char *block_type =
nullptr) = 0;
301 virtual void removeDataBlock(
const char *key) = 0;
305 virtual void setOpaqueCachedUserData(
306 const char *
name,
void *opaque_py_object) = 0;
308 virtual void *opaqueCachedUserData(
const char *
name) = 0;
309 virtual void destroyCachedUserData(
310 const char *
name,
bool must_exist=
true) = 0;
311 virtual void clearCachedUserDataDict() = 0;
312 virtual std::map<std::string, PY_OpaqueObject> cachedUserDataDict() = 0;
317 void setCachedUserData(
const char *
name, InterpreterObject
value)
318 {
return self->setOpaqueCachedUserData(name, value); }
320 InterpreterObject cachedUserData(
const char *name)
321 {
return HOMincRef((InterpreterObject)self->opaqueCachedUserData(name)); }
325 SWIGOUT(%newobject simulation;)
328 virtual std::vector<HOM_ElemPtr<HOM_Node> >
334 bool use_blosc_compression =
true,
335 double sample_rate = 0,
336 bool scoped_only =
false) = 0;
338 SWIGOUT(%kwargs _setParmClipData;)
341 bool blosc_compressed =
true,
342 double sample_rate = 0,
348 double sample_rate = 0,
349 bool scoped_only =
false) = 0;
351 SWIGOUT(%kwargs _loadParmClip;)
353 double sample_rate = 0,
356 virtual int __creationTime() = 0;
357 virtual int __modificationTime() = 0;
361 virtual void addError(
const char *
message = 0,
364 virtual void addWarning(
const char *
message = 0) = 0;
366 virtual void addMessage(
const char *
message = 0) = 0;
368 virtual float lastCookTime() = 0;
375 InterpreterObject evalParm(
const char *parm_path)
377 HOM_Parm *parm =
self->parm(parm_path);
380 throw HOM_OperationFailed(
"Invalid parm name");
382 InterpreterObject
result = HOMevalParm(*parm);
387 InterpreterObject evalParmTuple(
const char *parm_path)
392 throw HOM_OperationFailed(
"Invalid parm tuple name");
394 InterpreterObject
result = HOMevalParmTuple(*parm_tuple);
399 void addEventCallback(
400 const std::vector<HOM_EnumValue *> &event_types,
401 InterpreterObject callback)
402 {
self->addOpaqueEventCallback(event_types, callback); }
404 void addParmCallback(
405 InterpreterObject callback,
406 const std::vector<std::string> &names)
407 {
self->addOpaqueParmCallback(callback,names); }
409 void removeEventCallback(
410 const std::vector<HOM_EnumValue *> &event_types,
411 InterpreterObject callback)
412 {
self->removeOpaqueEventCallback(event_types, callback); }
415 std::vector<std::pair<std::vector<HOM_EnumValue *>, InterpreterObject> >
418 std::vector<std::pair<std::vector<HOM_EnumValue *>,
void *> >
419 opaque_callbacks(self->opaqueEventCallbacks());
421 std::vector<std::pair<std::vector<HOM_EnumValue *>, InterpreterObject> >
423 for (
int i=0; i< opaque_callbacks.size(); ++i)
424 callbacks.push_back(std::make_pair(
425 opaque_callbacks[i].first,
426 (InterpreterObject)opaque_callbacks[i].second));
GLuint GLsizei const GLchar * message
std::string ignore_case(std::string item)
Helper function to allow ignore_case to be passed to IsMember or Transform.
#define HOM_DESTRUCT_OBJECT(pointer)
GT_API const UT_StringHolder time
GLsizei const GLchar *const * string
const GLuint GLenum const void * binary
string __repr__(VtArray< T > const &self)
**But if you need a result
void saveCodeToFile(const char *file_name, bool skip_header=false, const char *context_name=NULL)
void ignore(T const &) VULKAN_HPP_NOEXCEPT
#define HOM_CONSTRUCT_OBJECT(pointer)
#define HOM_MIN_NEGATIVE_DOUBLE
GLuint const GLchar * name
GT_API const UT_StringHolder version
OIIO_API void debug(string_view str)
HOM_OpNode(const HOM_OpNode &node)
SIM_API const UT_StringHolder force
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
virtual HOM_HDAModule * hm()
void saveToCompiledVexFile(const char *file_name, const char *context_name=NULL)