HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_Module.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  * This class is not directly wrapped by swig. However, when creating
8  * the swig wrapper modules we wrap each of the methods of this class
9  * in functions in $SHC/HOM/HOM_TopLevel.h. This way, the methods of this
10  * class appear as the top-level parts of the hou module.
11  * Note that this also means SWIGOUT(%newobject fooMethod;) directives are
12  * not here but in HOM_TopLevel.h instead.
13  */
14 
15 #ifndef __HOM_Module_h__
16 #define __HOM_Module_h__
17 
18 #include "HOM_API.h"
19 #include "HOM_BinaryString.h"
20 #include "HOM_Defines.h"
21 #include "HOM_Errors.h"
22 #include "HOM_ElemPtr.h"
23 #include "HOM_EnumModules.h"
25 #include <UT/UT_Lock.h>
26 #include <UT/UT_NonCopyable.h>
27 #include <UT/UT_Notifier.h>
28 #include <UT/UT_TaskLock.h>
29 #include <UT/UT_Thread.h>
30 #include <UT/UT_UniquePtr.h>
31 #include <UT/UT_OptionEntry.h>
32 #include <SYS/SYS_Types.h>
33 #include <typeinfo>
34 #include <string>
35 #include <vector>
36 #include <map>
37 #include <hboost/any.hpp>
38 
39 class OP_Node;
40 class STORUI_OrboltURLHandler;
41 
43 class HOM_AgentClip;
45 class HOM_AgentLayer;
46 class HOM_AgentMetadata;
47 class HOM_AgentRig;
48 class HOM_AgentShape;
53 class HOM_ApexNode;
55 class HOM_ApexStickyNote;
57 class HOM_AttribDataId;
58 class HOM_anim;
59 class HOM_anonstats;
60 class HOM_audio;
62 class HOM_Camera;
63 class HOM_CameraPrim;
64 class HOM_ChannelPrim;
65 class HOM_ChopNode;
66 class HOM_Clip;
67 class HOM_clone;
68 class HOM_Color;
71 class HOM_CopCable;
72 class HOM_crowds;
74 class HOM_DetachedAttrib;
75 class HOM_Drawable2D;
76 class HOM_SimpleDrawable;
77 class HOM_dop;
78 class HOM_DopData;
79 class HOM_DopSimulation;
80 class HOM_Edge;
81 class HOM_EnumValue;
85 class HOM_GadgetContext;
86 class HOM_GadgetDrawable;
87 class HOM_galleries;
88 class HOM_Geometry;
91 class HOM_GUDetailHandle;
92 class HOM_Handle;
93 class HOM_hda;
94 class HOM_HDADefinition;
95 class HOM_HDAModule;
96 class HOM_HDAOptions;
97 class HOM_hipFile;
98 class HOM_hmath;
99 class HOM_ik;
100 class HOM_ImageLayer;
102 class HOM_IntParmTemplate;
103 class HOM_Keyframe;
105 class HOM_logging;
109 class HOM_lop;
115 class HOM_Matrix4;
117 class HOM_NanoVDB;
118 class HOM_NetworkBox;
119 class HOM_NetworkDot;
121 class HOM_Node;
122 class HOM_NodeBundle;
123 class HOM_NodeConnection;
124 class HOM_NodeType;
126 class HOM_opencl;
128 class HOM_PaneTab;
129 class HOM_Parm;
130 class HOM_ParmTemplate;
132 class HOM_ParmTuple;
133 class HOM_perfMon;
135 class HOM_pypanel;
136 class HOM_playbar;
138 class HOM_Point;
139 class HOM_Prim;
140 class HOM_properties;
141 class HOM_qt;
142 class HOM_Ramp;
144 class HOM_RedrawBlock;
145 #ifndef SWIG
147 #endif
148 class HOM_SceneViewer;
150 class HOM_Selection;
152 class HOM_shelves;
153 class HOM_StickyNote;
154 class HOM_StringKeyframe;
156 class HOM_styles;
157 class HOM_StyleSheet;
159 class HOM_takes;
160 class HOM_text;
161 class HOM_TextDrawable;
163 class HOM_ui;
164 class HOM_hotkeys;
165 class HOM_UIEvent;
166 class HOM_UIEventDevice;
167 class HOM_undos;
168 class HOM_UniNode;
170 class HOM_UniStickyNote;
171 class HOM_Vector3;
172 class HOM_Vertex;
173 class HOM_VexContext;
174 class HOM_ViewerEvent;
176 class HOM_ViewerDragger;
177 class HOM_ViewerDragger2D;
185 class HOM_ViewerStateMenu;
189 
190 // See also OP_HOM_SESSION_MODULE_CPIO_NAME
191 #define HOM_SESSION_MODULE_NAME "hou.session"
192 
193 // Use this function to access the HOM module from C++ in Houdini. This
194 // is equivalent to writing "hou" in python. It will only throw an exception
195 // if the python module could not be imported, which should not happen.
196 class HOM_Module;
198 
200 {
201 public:
202  static void setHOMCreator(void (*homCreator)());
203 
204  virtual ~HOM_Module() {}
205 
206  virtual std::vector<std::string> _getArgumentAutoComplete(
207  const char *method_name, const char *arguments,
208  bool meta_info_only = false) = 0;
209 
210  // This method is called by the expression editor to force autocompletion
211  // to be relative to the node containing the expression. It is not
212  // wrapped by swig.
213  virtual void setRelativeNodeForAutoComplete(OP_Node *node) = 0;
214 
215  virtual HOM_ui& ui() = 0;
216  virtual HOM_qt& qt() = 0;
217  virtual HOM_hotkeys& hotkeys() = 0;
218  virtual HOM_audio& audio() = 0;
219  virtual bool isUIAvailable() = 0;
220  virtual bool _isExperimentalActive() = 0;
221  virtual bool _isCurrentThreadHoldingHOMLock() = 0;
222 
223  virtual HOM_galleries& galleries() = 0;
224  virtual HOM_hda& hda() = 0;
225  virtual HOM_hipFile& hipFile() = 0;
226  virtual HOM_perfMon& perfMon() = 0;
227  virtual HOM_playbar& playbar() = 0;
228  virtual HOM_pypanel& pypanel() = 0;
229  virtual HOM_hmath& hmath() = 0;
230  virtual HOM_dop& dop() = 0;
231  virtual HOM_properties& properties() = 0;
232  virtual HOM_shelves& shelves() = 0;
233  virtual HOM_styles& styles() = 0;
234  virtual HOM_takes& takes() = 0;
235  virtual HOM_undos& undos() = 0;
236  virtual HOM_viewportVisualizers& viewportVisualizers() = 0;
237  virtual HOM_anim& anim() = 0;
238  virtual HOM_anonstats& anonstats() = 0;
239  virtual HOM_clone& clone() = 0;
240  virtual HOM_crowds& crowds() = 0;
241  virtual HOM_ik& ik() = 0;
242  virtual HOM_logging& logging() = 0;
243  virtual HOM_lop& lop() = 0;
244  virtual HOM_opencl& opencl() = 0;
245  virtual HOM_text& text() = 0;
246 
247  virtual bool _assertWrapper(
248  const char *file, int linenum, const char *function,
249  const char *condition, const char *reason) = 0;
250 
251  virtual void exit(int exit_code=0, bool suppress_save_prompt=false) = 0;
252 
253  // isExiting() will return true if the program is actually Houdini (not
254  // mplay) and the UI queue is closed. This method is wrapped by swig, but
255  // only so houdiniInterpreter can call it.
256  virtual bool isExiting() = 0;
257 
258  virtual void addPreloadIcon(const char *name, int w, int h) = 0;
259  virtual void rasterizePreloadIcons() = 0;
260 
261  virtual std::string applicationName() = 0;
262  virtual std::vector<int> applicationVersion(bool include_patch=false) = 0;
263  virtual std::string applicationVersionString() = 0;
264  virtual std::string applicationCompilationDate() = 0;
265  virtual std::string applicationPlatformInfo() = 0;
266  virtual std::map<std::string, std::string> vdbVersionInfo() = 0;
267  virtual int hdkAPIVersion() = 0;
268  virtual HOM_EnumValue &licenseCategory() = 0;
269  virtual bool isApprentice() = 0;
270  virtual void releaseLicense() = 0;
271 
272  // Threading controls
273  virtual int maxThreads() = 0;
274  virtual void setMaxThreads(int max_threads) = 0;
275 
276  // These methods return a new HOM_Node object.
277  virtual HOM_Node* root() = 0;
278  virtual HOM_Node* pwd() = 0;
279  virtual HOM_Node* parent() = 0;
280 
281  virtual void setPwd(HOM_Node &newpwd) = 0;
282  virtual void cd(const char *path) = 0;
283 
284  // Calling phm() is a shortcut for calling pwd().hdaModule().
285  virtual HOM_HDAModule* phm() = 0;
286 
287  // This method returns a new HOM_DopNetNode object or None.
288  virtual HOM_Node* currentDopNet() = 0;
289  virtual void setCurrentDopNet(HOM_Node &dopnet) = 0;
290 
291  // Gets or sets the simulation enabled state.
292  virtual bool simulationEnabled() = 0;
293  virtual void setSimulationEnabled(bool enabled) = 0;
294 
295  // These methods return a new HOM_Node object or null if the node couldn't
296  // be found.
297  virtual HOM_Node *node(const char *path) = 0;
298  virtual HOM_NetworkMovableItem* item(const char *path) = 0;
299 
300  virtual std::vector<HOM_ElemPtr<HOM_Node> > nodes(const std::vector<std::string> &paths) = 0;
301  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> > items(const std::vector<std::string> &paths) = 0;
302 
303  virtual HOM_Node *nodeBySessionId(int session_id) = 0;
304  virtual HOM_NetworkBox *networkBoxBySessionId(int session_id) = 0;
305  virtual HOM_StickyNote *stickyNoteBySessionId(int session_id) = 0;
306  virtual HOM_SubnetIndirectInput *subnetIndirectInputBySessionId(
307  int64 session_id) = 0;
308  virtual HOM_NetworkDot *networkDotBySessionId(int session_id) = 0;
309  virtual HOM_NetworkMovableItem *itemBySessionId(
310  HOM_EnumValue &item_type, int64 session_id) = 0;
311  virtual HOM_NodeConnection *nodeConnectionBySessionId(
312  int node_session_id, int input_index) = 0;
313 
314  // Functions for UNI nodes.
315  virtual HOM_UniNode *uniNodeBySessionId(int64 session_id) = 0;
316  virtual HOM_UniNode *uniContainerConnectNodeBySessionId(
317  int64 session_id, bool is_container_inputs) = 0;
318  virtual HOM_UniNodeConnection *uniNodeConnectionBySessionId(
319  int64 session_id) = 0;
320  virtual HOM_UniStickyNote *uniStickyNoteBySessionId(
321  int64 session_id) = 0;
322 
323  // Functions for APEX nodes.
324  virtual HOM_ApexNode *createApexRootNode() = 0;
325  virtual HOM_ApexNode *apexNodeBySessionId(
326  int64 session_id) = 0;
327  virtual HOM_ApexNodeConnection *apexNodeConnectionBySessionId(
328  int64 session_id) = 0;
329  virtual HOM_ApexStickyNote *apexStickyNoteBySessionId(
330  int64 session_id) = 0;
331 
332  // Functions for configuring default colors on network elements.
333  virtual HOM_Color defaultColor(HOM_EnumValue &color_item) = 0;
334  virtual void setDefaultColor(HOM_EnumValue &color_item, HOM_Color *color) = 0;
335 
336  // Return HOM_Nodes for all selected nodes in the session.
337  virtual std::vector<HOM_ElemPtr<HOM_Node> > selectedNodes(
338  bool include_hidden = false) = 0;
339  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> > selectedItems(
340  bool include_hidden = false) = 0;
341  virtual std::vector<HOM_ElemPtr<HOM_NodeConnection> > selectedConnections() = 0;
342  virtual void clearAllSelected() = 0;
343 
344  // Copy nodes to and paste from clipboard.
345  virtual void copyNodesToClipboard(const std::vector<HOM_Node *> &nodes) = 0;
346  virtual void pasteNodesFromClipboard(HOM_Node &destination_node) = 0;
347 
348  // These methods return new HOM_Parm/HOM_ParmTuple objects or null if the
349  // parm couldn't be found.
350  virtual HOM_Parm* parm(const char *path) = 0;
351  SWIGOUT(%ignore newParm;)
352  virtual HOM_Parm* newParm(OP_Node &node, int parm_index, int vector_index) = 0;
353  virtual HOM_ParmTuple* parmTuple(const char *path) = 0;
354  virtual HOM_Parm *evaluatingParm() = 0;
355 
356  // The next methods are not wrapped by swig, and are used
357  // by the HOM_ChannelList to manage geometry channel collections.
358  // These are necessary as the HOM_ChannelList does not have
359  // an implementation at the HOMF level, and cannot directly access
360  // Nodes, GU_Details or the MOT_GeometryChannelManager.
361 
362  // This method asks the MOT_GeometryChannelManager for a new
363  // geometry channel collection name, ensuring uniqueness.
364  SWIGOUT(%ignore reserveNewGeometryCollectionName;)
365  virtual UT_StringHolder reserveNewGeometryCollectionName() = 0;
366  // This method accesses the GU_Detail to get the names of geometry channels,
367  // so they can be stored in the HOM_ChannelList.
368  SWIGOUT(%ignore geometryChannelNames;)
369  virtual UT_StringArray geometryChannelNames(
371 
372  // Returns the path of a node from its unique id.
373  // Used by the HOM_ChannelList.
374  SWIGOUT(%ignore getNodePathFromNodeId;)
375  virtual UT_StringHolder getNodePathFromNodeId(int id) = 0;
376 
377  // Fetch the list of channel primitives in a geometry. Used
378  // by HOM_ChannelList to display channel primitives added to the
379  // channel list
380  SWIGOUT(%ignore getChannelPrims;)
381  virtual std::vector<HOM_ElemPtr<HOM_ChannelPrim>> getChannelPrims(
382  HOM_GUDetailHandle *gdh,
383  const UT_StringHolder &pattern) = 0;
384 
385  virtual HOM_ScriptEvalContext * newScriptEvalContext(HOM_Node &node) = 0;
386  virtual HOM_ScriptEvalContext * newScriptEvalContext(HOM_Parm &parm) = 0;
387 
388  // Access to the contents of the parm clipboard
389  virtual std::vector< std::map<std::string, std::string> >
390  parmClipboardContents() = 0;
391 
392  // These methods return a new HOM_NodeType object or null if it couldn't
393  // be found.
394  virtual HOM_NodeType *nodeType(
395  HOM_NodeTypeCategory &category, const char *name) = 0;
396  virtual HOM_NodeType *nodeType(const char *name) = 0;
397 
398  virtual HOM_NodeType *preferredNodeType(
399  const char *name, HOM_Node *parentNode = NULL) = 0;
400 
401  virtual HOM_NodeTypeCategory &objNodeTypeCategory() = 0;
402  virtual HOM_NodeTypeCategory &sopNodeTypeCategory() = 0;
403  virtual HOM_NodeTypeCategory &dopNodeTypeCategory() = 0;
404  virtual HOM_NodeTypeCategory &cop2NodeTypeCategory() = 0;
405  virtual HOM_NodeTypeCategory &copNodeTypeCategory() = 0;
406  virtual HOM_NodeTypeCategory &shopNodeTypeCategory() = 0;
407  virtual HOM_NodeTypeCategory &vopNodeTypeCategory() = 0;
408  virtual HOM_NodeTypeCategory &ropNodeTypeCategory() = 0;
409  virtual HOM_NodeTypeCategory &chopNodeTypeCategory() = 0;
410  virtual HOM_NodeTypeCategory &topNodeTypeCategory() = 0;
411  virtual HOM_NodeTypeCategory &lopNodeTypeCategory() = 0;
412  virtual HOM_NodeTypeCategory &cop2NetNodeTypeCategory() = 0;
413  virtual HOM_NodeTypeCategory &vopNetNodeTypeCategory() = 0;
414  virtual HOM_NodeTypeCategory &chopNetNodeTypeCategory() = 0;
415  virtual HOM_NodeTypeCategory &topNetNodeTypeCategory() = 0;
416  virtual HOM_NodeTypeCategory &managerNodeTypeCategory() = 0;
417  virtual HOM_NodeTypeCategory &rootNodeTypeCategory() = 0;
418  virtual HOM_NodeTypeCategory &dataNodeTypeCategory() = 0;
419  virtual HOM_NodeTypeCategory &apexNodeTypeCategory() = 0;
420  virtual HOM_NodeTypeCategory &nodeTypeCategory(
421  const char *category_name) = 0;
422 
423  virtual std::map<std::string, HOM_NodeTypeCategory *> nodeTypeCategories(
424  bool include_uni_categories = false,
425  bool include_op_categories = true) = 0;
426 
427  virtual std::vector<HOM_ElemPtr<HOM_Node> > copyNodesTo(
428  const std::vector<HOM_Node *> &nodes,
429  HOM_Node &destination_node) = 0;
430  virtual std::vector<HOM_ElemPtr<HOM_Node> > moveNodesTo(
431  const std::vector<HOM_Node *> &nodes,
432  HOM_Node &destination_node) = 0;
433 
434  virtual HOM_NodeBundle *addNodeBundle(const char *name = NULL) = 0;
435  virtual std::vector<HOM_ElemPtr<HOM_NodeBundle> > nodeBundles() = 0;
436  virtual std::vector<HOM_ElemPtr<HOM_NodeBundle> > selectedNodeBundles() = 0;
437  virtual HOM_NodeBundle *nodeBundle(const char *name) = 0;
438 
439  virtual HOM_HDADefinition *hdaDefinition(
440  HOM_NodeTypeCategory &category, const char *name,
441  const char *file_path) = 0;
442 
443  // Note that getTimeWithoutAddingDependency is not wrapped by swig.
444  virtual fpreal getTimeWithoutAddingDependency() = 0;
445  virtual double time() = 0;
446  virtual void setTime(double time) = 0;
447  virtual double frame(bool full_precision=false) = 0;
448  virtual int intFrame() = 0;
449  virtual void setFrame(double frame) = 0;
450  virtual double fps() = 0;
451  virtual void setFps(
452  double fps,
453  bool modify_frame_count = true,
454  bool preserve_keyframes = false,
455  bool preserve_frame_start = false)
456  = 0;
457  virtual double timeToFrame(double time, bool full_precision=false) = 0;
458  virtual double frameToTime(double frame) = 0;
459 
460  virtual double timeTolerance() = 0;
461  virtual double frameTolerance() = 0;
462 
463  /// Private methods for ensuring that the current eval context
464  /// (including global time) is in-sync with the main thread's eval
465  /// context.
466  virtual void _syncFromMainContext() = 0;
467  virtual void _syncToMainContext() = 0;
468 
469  // Computes a scale factor given units
470  virtual fpreal scaleFromMKS(const char *units) = 0;
471  virtual fpreal scaleToMKS(const char *units) = 0;
472 
473  virtual double bezier() = 0;
474  virtual double constant() = 0;
475  virtual double cubic() = 0;
476  virtual double cycle(double start_frame, double end_frame) = 0;
477  virtual double cyclet(double start_time, double end_time) = 0;
478  virtual double cycleoffset(double start_frame, double end_frame) = 0;
479  virtual double cycleoffsett(double start_time, double end_time) = 0;
480  virtual double ease() = 0;
481  virtual double easein() = 0;
482  virtual double easeinp(double ease_speed) = 0;
483  virtual double easeout() = 0;
484  virtual double easeoutp(double ease_speed) = 0;
485  virtual double easep(double ease_bias) = 0;
486  virtual double linear() = 0;
487  virtual double match() = 0;
488  virtual double matchin() = 0;
489  virtual double matchout() = 0;
490  virtual double qlinear() = 0;
491  virtual double quintic() = 0;
492  virtual double repeat(double start_frame, double end_frame) = 0;
493  virtual double repeatt(double start_time, double end_time) = 0;
494  virtual double spline() = 0;
495  virtual double vmatch() = 0;
496  virtual double vmatchin() = 0;
497  virtual double vmatchout() = 0;
498 
499  virtual std::string chopExportConflictResolutionPattern() = 0;
500  virtual void setChopExportConflictResolutionPattern( const char *pattern) = 0;
501 
502  virtual std::vector<HOM_ElemPtr<HOM_VexContext> >
503  vexContexts() = 0;
504 
505  virtual HOM_VexContext* vexContextForShaderType(HOM_EnumValue &shader_type) = 0;
506 
507  virtual HOM_VexContext* vexContextForNodeTypeCategory(
508  HOM_NodeTypeCategory &node_type_category) = 0;
509 
510  virtual std::string helpServerUrl() = 0;
511 
512  virtual std::string hscriptCommandHelp(const char *command_name) = 0;
513 
514  // This method returns a pair of strings: one for stdout and one for
515  // stderr.
516  virtual std::vector<std::string> hscript(const char *command) = 0;
517 
518  // Compare if two numbers are almost equal.
519  virtual bool almostEqual(double x, double y) = 0;
520 
521  virtual std::vector<std::pair<HOM_ElemPtr<HOM_Parm>, std::string> >
522  fileReferences(
523  const char *project_dir_variable="HIP", bool include_all_refs=true) = 0;
524 
525  // Find files in $HOUDINI_PATH.
526  virtual std::string findFile(const char *file_name) = 0;
527  virtual std::vector<std::string> findFiles(
528  const char *file_name) = 0;
529  virtual std::vector<std::string> findFilesWithExtension(
530  const char *file_extension, const char *subdirectory = NULL) = 0;
531 
532  // Find directories in $HOUDINI_PATH.
533  virtual std::string findDirectory(const char *directory_name) = 0;
534  virtual std::vector<std::string> findDirectories(
535  const char *directory_name) = 0;
536 
537  virtual std::vector<std::string> houdiniPath(const char *pathvar = nullptr) = 0;
538 
539  virtual std::string homeHoudiniDirectory() = 0;
540 
541  virtual std::string readFile(const char *file_path) = 0;
542  virtual HOM_BinaryString readBinaryFile(const char *file_path) = 0;
543 
544  virtual std::map<std::string, HOM_BinaryString> loadIndexDataFromString(
545  const char *data, int length) = 0;
546 
547  virtual std::map<std::string, HOM_BinaryString> loadIndexDataFromFile(
548  const char *file_path) = 0;
549 
550  virtual HOM_BinaryString saveIndexDataToString(
551  const std::map<std::string, HOM_BinaryString> &index_data) = 0;
552 
553  virtual void saveIndexDataToFile(
554  const char *file_path,
555  const std::map<std::string, HOM_BinaryString> &index_data) = 0;
556 
557  // Note that, when wrapped by swig, this function takes a single string
558  // parameter.
559  virtual std::vector<std::pair<std::string, HOM_BinaryString> >
560  loadCPIODataFromString(const char *data, int length) = 0;
561 
562  virtual HOM_BinaryString saveCPIODataToString(
563  const std::vector<std::pair<std::string, HOM_BinaryString> >
564  &data) = 0;
565 
566  // These 3 methods are not wrapped by swig. They are used to notify
567  // interested parties that a change to the module source code was made and
568  // that they should forcefully update to match the change. The third
569  // is used to load the session module source from a hip file, even though
570  // that source might generate an exception.
571  virtual UT_NotifierImpl<int> &getSessionModuleSourceForceUpdateNotifier()=0;
572  virtual void forceUpdateFromSessionModuleSource() = 0;
573  virtual void forceSetSessionModuleSource(const char *source) = 0;
574 
575  virtual void setSessionModuleSource(const char *source) = 0;
576  virtual void appendSessionModuleSource(const char *source) = 0;
577  virtual std::string sessionModuleSource() = 0;
578  // This method is not wrapped by swig:
579  virtual int sessionModuleSourceChangeCount() = 0;
580 
581  // This static method lets you know if the HOM implementation is set,
582  // so you can check if it's safe to call the HOM() function. This method
583  // should only be called in rare cases.
584  static bool isImplementationSet()
585  { return theImplementation != NULL; }
586 
587  // Evaluates a parameter as if it was an OPpath parameter
588  virtual std::string chsop(const char *path) = 0;
589 
590  // Evaluates a parameter as if it was an OPlist parameter
591  virtual std::string chsoplist(const char *path) = 0;
592 
593  // Sorts a list of node paths using topological order from the graph.
594  virtual std::vector<std::string>
595  sortedNodePaths(const std::vector<std::string> &paths) = 0;
596 
597  // Sorts a list of HOM_Node using topological order from the graph.
598  virtual std::vector<HOM_ElemPtr<HOM_Node> >
599  sortedNodes(const std::vector<HOM_Node*> &nodes) = 0;
600 
601  // deprecated in favour of hou.text.patternMatch
602  virtual int patternMatch(
603  const char *pattern, const char *str,
604  bool ignore_case = false,
605  bool path_match = false) = 0;
606 
607  // hscriptExpression() will return different types, according to
608  // the return value of the expression.
609  virtual hboost::any hscriptExpression(const char *expression) = 0;
610  virtual double hscriptFloatExpression(const char *expression) = 0;
611  virtual std::string hscriptStringExpression(const char *expression) = 0;
612  virtual std::vector<double>hscriptVectorExpression(
613  const char *expression) = 0;
614  virtual std::vector<std::vector<double> > hscriptMatrixExpression(
615  const char *expression) = 0;
616 
617  virtual hboost::any lvar(const char *name) = 0;
618 
619  virtual char *getEnvConfigValue(
620  const char *name, const char *default_value=NULL) = 0;
621 
622  virtual char *getenv(const char *name, const char *default_value=NULL) = 0;
623 
624  virtual void putenv(const char *name, const char *value) = 0;
625 
626  virtual void unsetenv(const char *name) = 0;
627 
628  virtual void allowEnvironmentToOverwriteVariable(
629  const char *name, bool onoff) = 0;
630 
631  virtual void *expressionGlobals() = 0;
632 
633  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
634 
635  // This method is used to interact with the global interrupt object.
636  virtual bool updateProgressAndCheckForInterrupt(int percentage=-1) = 0;
637 
638  virtual std::map<std::string, hboost::any> runVex(
639  const char *vex_file,
640  const std::map<std::string, hboost::any> &inputs,
641  const char *precision = "32") = 0;
642 
643  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
644 
645  virtual void saveImageDataToFile(
646  const std::vector<float> &color_and_alpha_data,
647  int width, int height,
648  const char *file_name,
649  bool flip_vertical = false) = 0;
650 
651  virtual void saveImageDataToFile(
652  const std::string &color_and_alpha_data,
653  int width, int height,
654  const char *file_name,
655  bool flip_vertical = false) = 0;
656 
657  virtual HOM_BinaryString loadImageDataFromFile(
658  const char *image_file_name,
659  HOM_EnumValue &image_depth = HOM_imageDepth::Int8) = 0;
660 
661  virtual std::vector<HOM_BinaryString> _loadImageDataFromFileWithAllPlanes(
662  const char *image_file_name,
663  HOM_EnumValue &image_depth = HOM_imageDepth::Int8) = 0;
664 
665  virtual std::vector<int> imageResolution(const char *image_file_name) = 0;
666 
667  virtual std::vector<std::string> _imagePlanes(
668  const char *image_file_name) = 0;
669 
670  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
671 
672  virtual HOM_EnumValue &updateModeSetting() = 0;
673  virtual void setUpdateMode(HOM_EnumValue &mode) = 0;
674 
675  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
676 
677  virtual HOM_OrboltURLHandler *orboltURLHandler() = 0;
678 
679  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
680 
681  virtual void *opaqueRunCallbackAndCatchCrashes(void *opaque_callback) = 0;
682 
683  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
684 
685  // These methods are used to grant functions defined in an asset's
686  // PythonModule enhanced privileges. They are not wrapped by swig.
687  virtual void pushAccessPrivilege(const char *key) = 0;
688  virtual void popAccessPrivilege(const char *key) = 0;
689 
690  virtual std::string currentPythonModuleKey() = 0;
691 
692  virtual void registerAccessPrivilegePyClient(void *opaque_python_object) = 0;
693 
694  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
695 
696  // These methods are used to instantiate HOMF objects from the HOM
697  // library level. They are not wrapped by swig.
698  virtual HOM_FloatParmTemplate *newFloatParmTemplate(
699  const char *name,
700  const char *label,
701  int num_components,
702  const std::vector<double> &default_value,
703  double min, double max,
704  bool min_is_strict, bool max_is_strict,
705  HOM_EnumValue &look,
706  HOM_EnumValue &naming_scheme,
707  const char *disable_when,
708  bool is_hidden,
709  bool is_label_hidden,
710  bool join_with_next,
711  const char *help,
712  const char *script_callback,
713  HOM_EnumValue &script_callback_language,
714  const std::map<std::string, std::string> &tags,
715  const std::map<HOM_EnumValue *, std::string> &conditionals,
716  const std::vector<std::string> &default_expression,
717  const std::vector<HOM_EnumValue *> &default_expression_language) = 0;
718 
719  virtual HOM_IntParmTemplate *newIntParmTemplate(
720  const char *name,
721  const char *label,
722  int num_components,
723  const std::vector<int64> &default_value,
724  int64 min, int64 max,
725  bool min_is_strict, bool max_is_strict,
726  HOM_EnumValue &look,
727  HOM_EnumValue &naming_scheme,
728  const std::vector<std::string> &menu_items,
729  const std::vector<std::string> &menu_labels,
730  const std::vector<std::string> &icon_names,
731  const std::string &item_generator_script,
732  HOM_EnumValue *item_generator_script_language,
733  HOM_EnumValue &menu_type,
734  bool menu_use_token,
735  const char *disable_when,
736  bool is_hidden,
737  bool is_label_hidden,
738  bool join_with_next,
739  const char *help,
740  const char *script_callback,
741  HOM_EnumValue &script_callback_language,
742  const std::map<std::string, std::string> &tags,
743  const std::map<HOM_EnumValue *, std::string> &conditionals,
744  const std::vector<std::string> &default_expression,
745  const std::vector<HOM_EnumValue *> &default_expression_language) = 0;
746 
747  virtual HOM_StringParmTemplate *newStringParmTemplate(
748  const char *name,
749  const char *label,
750  int num_components,
751  const std::vector<std::string> &default_value,
752  HOM_EnumValue &naming_scheme,
753  HOM_EnumValue &string_type,
754  HOM_EnumValue &file_type,
755  const std::vector<std::string> &menu_items,
756  const std::vector<std::string> &menu_labels,
757  const std::vector<std::string> &icon_names,
758  const std::string &item_generator_script,
759  HOM_EnumValue *item_generator_script_language,
760  HOM_EnumValue &menu_type,
761  const char *disable_when,
762  bool is_hidden,
763  bool is_label_hidden,
764  bool join_with_next,
765  const char *help,
766  const char *script_callback,
767  HOM_EnumValue &script_callback_language,
768  const std::map<std::string, std::string> &tags,
769  const std::map<HOM_EnumValue *, std::string> &conditionals,
770  const std::vector<std::string> &default_expression,
771  const std::vector<HOM_EnumValue *> &default_expression_language) = 0;
772 
773  virtual HOM_DataParmTemplate *newDataParmTemplate(
774  const char *name,
775  const char *label,
776  int num_components,
777  HOM_EnumValue &look,
778  HOM_EnumValue &naming_scheme,
779  HOM_EnumValue &data_parm_type,
780  const char *disable_when,
781  bool is_hidden,
782  bool is_label_hidden,
783  bool join_with_next,
784  const char *help,
785  const char *script_callback,
786  HOM_EnumValue &script_callback_language,
787  const std::map<std::string, std::string> &tags,
788  const std::map<HOM_EnumValue *, std::string> &conditionals,
789  const std::vector<std::string> &default_expression,
790  const std::vector<HOM_EnumValue *> &default_expression_language) = 0;
791 
792  virtual HOM_ToggleParmTemplate *newToggleParmTemplate(
793  const char *name,
794  const char *label,
795  bool default_value,
796  const char *disable_when,
797  bool is_hidden,
798  bool is_label_hidden,
799  bool join_with_next,
800  const char *help,
801  const char *script_callback,
802  HOM_EnumValue &script_callback_language,
803  const std::map<std::string, std::string> &tags,
804  const std::map<HOM_EnumValue *, std::string> &conditionals,
805  const std::string &default_expression,
806  const HOM_EnumValue &default_expression_language) = 0;
807 
808  virtual HOM_MenuParmTemplate *newMenuParmTemplate(
809  const char *name,
810  const char *label,
811  const std::vector<std::string> &menu_items,
812  const std::vector<std::string> &menu_labels,
813  int64 default_value,
814  const std::vector<std::string> &icon_names,
815  const std::string &item_generator_script,
816  HOM_EnumValue *item_generator_script_language,
817  HOM_EnumValue &menu_type,
818  bool menu_use_token,
819  const char *disable_when,
820  bool is_hidden,
821  bool is_label_hidden,
822  bool join_with_next,
823  const char *help,
824  const char *script_callback,
825  HOM_EnumValue &script_callback_language,
826  const std::map<std::string, std::string> &tags,
827  const std::map<HOM_EnumValue *, std::string> &conditionals,
828  const std::string &default_expression,
829  const HOM_EnumValue &default_expression_language,
830  bool store_default_value_as_string,
831  bool is_button_strip,
832  bool strip_uses_icons,
833  bool is_button
834  ) = 0;
835 
836  virtual HOM_ButtonParmTemplate *newButtonParmTemplate(
837  const char *name,
838  const char *label,
839  const std::vector<std::string> &menu_items,
840  const std::vector<std::string> &menu_labels,
841  const std::vector<std::string> &icon_names,
842  const std::string &item_generator_script,
843  HOM_EnumValue *item_generator_script_language,
844  HOM_EnumValue &menu_type,
845  bool menu_use_token,
846  const char *disable_when,
847  bool is_hidden,
848  bool is_label_hidden,
849  bool join_with_next,
850  const char *help,
851  const char *script_callback,
852  HOM_EnumValue &script_callback_language,
853  const std::map<std::string, std::string> &tags,
854  const std::map<HOM_EnumValue *, std::string> &conditionals ) = 0;
855 
856  virtual HOM_LabelParmTemplate *newLabelParmTemplate(
857  const char *name,
858  const char *label,
859  const std::vector<std::string> &column_labels,
860  HOM_EnumValue &label_parm_type,
861  bool is_hidden,
862  bool is_label_hidden,
863  bool join_with_next,
864  const char *help,
865  const std::map<std::string, std::string> &tags,
866  const std::map<HOM_EnumValue *, std::string> &conditionals) = 0;
867 
868  virtual HOM_SeparatorParmTemplate *newSeparatorParmTemplate(
869  const char *name,
870  bool is_hidden,
871  const std::map<std::string, std::string> &tags,
872  const std::map<HOM_EnumValue *, std::string> &conditionals) = 0;
873 
874  virtual HOM_FolderSetParmTemplate *newFolderSetParmTemplate(
875  const char *name,
876  const std::vector<std::string> &folder_names,
877  HOM_EnumValue &folder_type,
878  const std::map<std::string, std::string> &tags) = 0;
879 
880  virtual HOM_FolderParmTemplate *newFolderParmTemplate(
881  const char *name,
882  const char *label,
883  const std::vector<HOM_ParmTemplate *> &parm_templates,
884  HOM_EnumValue &folder_type,
885  int default_value,
886  bool is_hidden,
887  bool ends_tab_group,
888  const char *script_callback,
889  HOM_EnumValue &script_callback_language,
890  const std::map<std::string, std::string> &tags,
891  const std::map<HOM_EnumValue *, std::string> &conditionals,
892  const std::map<HOM_EnumValue *, std::string> &tab_conditionals) = 0;
893 
894  virtual HOM_RampParmTemplate *newRampParmTemplate(
895  const char *name,
896  const char *label,
897  HOM_EnumValue &ramp_parm_type,
898  int default_value,
899  HOM_EnumValue *default_basis,
900  bool show_controls,
901  HOM_EnumValue *color_type,
902  const char *disable_when,
903  bool is_hidden,
904  const char *help,
905  const char *script_callback,
906  HOM_EnumValue &script_callback_language,
907  const std::map<std::string, std::string> &tags,
908  const std::map<HOM_EnumValue *, std::string> &conditionals,
909  const std::string &default_expression,
910  const HOM_EnumValue &default_expression_language) = 0;
911 
912  virtual HOM_ParmTemplateGroup *newParmTemplateGroup(
913  const std::vector<HOM_ParmTemplate *> &parm_templates) = 0;
914 
915  virtual HOM_PerfMonRecordOptions *newPerfMonRecordOptions(
916  bool cook_stats, bool pdg_cook_stats, bool solve_stats,
917  bool draw_stats, bool gpu_draw_stats, bool viewport_stats,
918  bool script_stats, bool render_stats, bool thread_stats,
919  bool frame_stats, bool memory_stats, bool errors,
920  bool pane_stats) = 0;
921 
922  virtual HOM_Keyframe *newKeyframe() = 0;
923  virtual HOM_Keyframe *newKeyframe(double value) = 0;
924  virtual HOM_Keyframe *newKeyframe(double value, double time) = 0;
925  virtual HOM_Keyframe *newKeyframe(const HOM_Keyframe &keyframe) = 0;
926 
927  virtual HOM_StringKeyframe *newStringKeyframe() = 0;
928  virtual HOM_StringKeyframe *newStringKeyframe(
929  const std::string &value, HOM_EnumValue &language) = 0;
930  virtual HOM_StringKeyframe *newStringKeyframe(
931  const std::string &value, double time, HOM_EnumValue &language) = 0;
932  virtual HOM_StringKeyframe *newStringKeyframe(
933  const HOM_StringKeyframe &string_keyframe) = 0;
934 
935  virtual HOM_HDAOptions *newHDAOptions() = 0;
936  virtual HOM_LopViewportLoadMasks *newLopViewportLoadMasks() = 0;
937  virtual HOM_LopExpansionState *newLopExpansionState() = 0;
938  virtual HOM_LopViewportOverrides *newLopViewportOverrides() = 0;
939  virtual HOM_LopInstanceIdRule *newLopInstanceIdRule() = 0;
940  virtual HOM_LopSelectionRule *newLopSelectionRule(
941  const char *pattern = nullptr) = 0;
942 
943  virtual HOM_InterruptableOperation *newInterruptableOperation(
944  const char *operation_name, const char *long_operation_name,
945  bool open_interrupt_dialog, int timeout_ms) = 0;
946 
947  virtual HOM_RedrawBlock *newRedrawBlock() = 0;
948 #ifndef SWIG
949  virtual HOM_RedrawResumeBlock *newRedrawResumeBlock() = 0;
950 #endif
951 
952  virtual HOM_StyleSheet *newStyleSheet() = 0;
953  virtual HOM_StyleSheet *newStyleSheet(const char *json_text) = 0;
954 
955  virtual HOM_Selection *newSelection(HOM_EnumValue &selection_type,
956  HOM_Geometry *geo, const char *selection_string) = 0;
957  virtual HOM_Selection *newSelection(
958  const std::vector<HOM_EnumValue *> &selection_types,
959  HOM_Geometry *geo, const char *selection_string) = 0;
960  virtual HOM_Selection *newSelection(
961  const std::vector<HOM_Prim *> &prims) = 0;
962  virtual HOM_Selection *newSelection(
963  const std::vector<HOM_Point *> &points) = 0;
964  virtual HOM_Selection *newSelection(
965  const std::vector<HOM_Vertex *> &vertices) = 0;
966  virtual HOM_Selection *newSelection(
967  const std::vector<HOM_Edge *> &edges) = 0;
968 
969  // This method returns a new HOM_Geometry object.
970  virtual HOM_Geometry *newGeometry(HOM_Geometry *geo = nullptr,
971  bool clone_data_ids = false) = 0;
972  // This method returns a new HOM_ImageLayer object.
973  virtual HOM_ImageLayer *newImageLayer(HOM_ImageLayer *layer = nullptr) = 0;
974  // This method returns a new HOM_NanoVDB object.
975  virtual HOM_NanoVDB *newNanoVDB(HOM_NanoVDB *vdb = nullptr) = 0;
976  // This method returns a new HOM_DetachedAttrib object.
977  virtual HOM_DetachedAttrib *newDetachedAttrib(HOM_DetachedAttrib *vdb = nullptr) = 0;
978  // This method returns a new HOM_CopCable object.
979  virtual HOM_CopCable *newCopCable(HOM_CopCable *cable = nullptr) = 0;
980 
981  virtual HOM_GeometryRayCache *newGeometryRayCache() = 0;
982 
983  virtual HOM_DopSimulation *newDopSimulation() = 0;
984 
985  virtual HOM_Clip *newClip() = 0;
986 
987  virtual HOM_AgentDefinition *newAgentDefinition(
988  const HOM_AgentRig *rig, const HOM_AgentShapeLibrary *shapelib) = 0;
989 
990  virtual HOM_AgentClip *newAgentClip(
991  const char *name, const char *path, const HOM_AgentRig &rig,
992  bool keep_external_ref, bool delay_load) = 0;
993 
994  virtual HOM_AgentClip *newAgentClip(
995  const char *name, HOM_ChopNode &chop, const HOM_AgentRig &rig,
996  double frame) = 0;
997 
998  virtual HOM_AgentClip *newAgentClip(
999  const char *name, const HOM_AgentRig &rig, int sample_count) = 0;
1000 
1001  virtual HOM_AgentClip *newAgentClip(
1002  const HOM_AgentClip &clip, const HOM_AgentRig &rig,
1003  const char *name) = 0;
1004 
1005  virtual HOM_AgentClip *newAgentClip(
1006  const char *name,
1007  void *stage,
1008  const char *prim_path,
1009  const HOM_AgentRig &rig) = 0;
1010 
1011  virtual HOM_AgentRig *newAgentRig(const char *path, bool keep_external_ref) = 0;
1012 
1013  virtual HOM_AgentRig *newAgentRig(
1014  const char *name, const std::vector<std::string> &transform_names,
1015  const std::vector<std::vector<int>> &hierarchy) = 0;
1016 
1017  virtual HOM_AgentTransformGroup *newAgentTransformGroup(
1018  const char *path, const HOM_AgentRig &rig,
1019  bool keep_external_ref = true) = 0;
1020 
1021  virtual HOM_AgentTransformGroup *newAgentTransformGroup(
1022  const char *name, const std::vector<int> &transforms,
1023  const HOM_AgentRig &rig, const std::vector<double> &weights,
1024  const std::vector<int> &channels) = 0;
1025 
1026  virtual HOM_AgentShapeLibrary *newAgentShapeLibrary() = 0;
1027  virtual HOM_AgentShapeLibrary *newAgentShapeLibrary(
1028  HOM_Geometry &geometry, const char *name) = 0;
1029  virtual HOM_AgentShapeLibrary *newAgentShapeLibrary(
1030  const char *path, bool keep_external_ref) = 0;
1031 
1032  virtual HOM_AgentShapeBinding *
1033  newAgentShapeBinding(int transform, const HOM_AgentShape &shape,
1034  bool deforming, double bounds_scale) = 0;
1035 
1036  virtual HOM_AgentShapeBinding *
1037  newAgentShapeBinding(int transform, const HOM_AgentShape &shape,
1038  const HOM_AgentShapeDeformer *deformer,
1039  const HOM_Vector3 &bounds_scale) = 0;
1040 
1041  virtual HOM_AgentShapeDeformer *
1042  newAgentShapeDeformer(const char *name) = 0;
1043 
1044  virtual HOM_AgentShapeDeformer *
1045  newAgentShapeDeformer(const HOM_EnumValue &deformer_type) = 0;
1046 
1047  virtual HOM_AgentLayer *newAgentLayer(
1048  const char *name, const HOM_AgentRig &rig,
1049  const HOM_AgentShapeLibrary &shapelib,
1050  const std::vector<HOM_AgentShapeBinding *> &shape_bindings,
1051  const HOM_AgentLayer *source_layer = 0) = 0;
1052 
1053  virtual HOM_AgentLayer *
1054  newAgentLayer(const char *path, const HOM_AgentRig &rig,
1055  const HOM_AgentShapeLibrary &shapelib,
1056  bool keep_external_ref = true) = 0;
1057 
1058  virtual HOM_AgentMetadata *newAgentMetadata(
1059  const char *path,
1060  bool keep_external_ref = true) = 0;
1061  virtual HOM_AgentMetadata *newAgentMetadata(
1062  const std::map<std::string, hboost::any> &data) = 0;
1063 
1064  virtual bool compareNode(const char *path, const char *dest = NULL) = 0;
1065  virtual bool compareNodeBackup(const char *path, int index,
1066  const char *dest = NULL) = 0;
1067  virtual bool compareHDA(const char *path_left, const char *path_right,
1068  const char *dest = NULL) = 0;
1069  virtual bool compareHDABackup(const char *path, int index,
1070  const char *dest = NULL) = 0;
1071  virtual bool compareHip(const char *dest = NULL) = 0;
1072  virtual bool compareHipBackup(int index, const char *dest = NULL) = 0;
1073 
1074  virtual bool hasContextOption(const char *opt) = 0;
1075  virtual UT_OptionEntryPtr contextOption(const char *opt) = 0;
1076  virtual std::vector<std::string> contextOptionNames() = 0;
1077  virtual void setContextOption(const char *opt, const char *value) =0;
1078  virtual void setContextOption(const char *opt, double value) = 0;
1079  virtual void removeContextOption(const char *opt) = 0;
1080  virtual std::string contextOptionConfig(const char *opt) = 0;
1081  virtual void setContextOptionConfig(const char *opt,
1082  const char *config) = 0;
1083  virtual bool isAutoContextOption(const char *opt) = 0;
1084  virtual bool isAutoContextOptionOverridden(const char *opt) = 0;
1085 
1086  SWIGOUT(%ignore addOpaqueContextOptionChangeCallback;)
1087  virtual void addOpaqueContextOptionChangeCallback(void *callback) = 0;
1088  SWIGOUT(%ignore removeOpaqueContextOptionChangeCallback;)
1089  virtual void removeOpaqueContextOptionChangeCallback(void *callback) = 0;
1090  virtual void removeAllContextOptionChangeCallbacks() = 0;
1091  SWIGOUT(%ignore opaqueContextOptionChangeCallbacks;)
1092  virtual std::vector<void *> opaqueContextOptionChangeCallbacks() = 0;
1093 
1094  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1095 
1096  // This method is called when orbolt_url runs. It is not wrapped by swig.
1097  virtual void setOrboltURLHandler(
1098  STORUI_OrboltURLHandler &orbolt_url_handler) = 0;
1099 
1100  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1101 
1102  // These methods are used to help debug HOM to make sure no objects
1103  // get allocated that don't get deallocated.
1104  virtual void constructObject(void *pointer, const std::type_info &type) = 0;
1105  virtual void destructObject(void *pointer, const std::type_info &type) = 0;
1106  virtual std::map<std::string, int> objectCounts() = 0;
1107 
1108  // Preferences
1109  virtual std::vector<std::string> getPreferenceNames() = 0;
1110  SWIGOUT(%kwargs getPreference;)
1111  virtual std::string getPreference(const char *name, const char* registry_name = nullptr) = 0;
1112  SWIGOUT(%kwargs setPreference;)
1113  virtual bool setPreference(const char *name, const char* value, const char* registry_name = nullptr) = 0;
1114  virtual bool addPreference(const char *name, const char* value) = 0;
1115  virtual bool removePreference(const char *name) = 0;
1116  virtual void refreshPreferences() = 0;
1117  virtual void savePreferences(const char* registry_name) = 0;
1118  virtual void loadPreferences(const char* registry_name) = 0;
1119  SWIGOUT(%kwargs createPreferenceRegistry;)
1120  virtual void createPreferenceRegistry(const char* registry_name, const char* file_name,
1121  std::map<std::string, hboost::any> prefs, const char* prefix_name = nullptr, bool binary = false) = 0;
1122  SWIGOUT(%kwargs refreshPreferenceRegistry;)
1123  virtual void refreshPreferenceRegistry(const char* registry_name, std::map<std::string, hboost::any> new_prefs,
1124  bool clear_existing = false) = 0;
1125 
1126  virtual HOM_ViewerStateTemplate * newViewerStateTemplate(
1127  std::string const & type_name,
1128  std::string const & label,
1129  HOM_NodeTypeCategory const & category,
1130  std::vector<HOM_NodeTypeCategory*> const & contexts) = 0;
1131 
1132  virtual HOM_ViewerHandleTemplate * newViewerHandleTemplate(
1133  std::string const & type_name,
1134  std::string const & label,
1135  std::vector<HOM_NodeTypeCategory*> const & categories) = 0;
1136 
1137  virtual HOM_ViewerStateMenu * newViewerStateMenu(std::string const & handle, std::string const & label) = 0;
1138 
1139  virtual HOM_PluginHotkeyDefinitions * newPluginHotkeyDefinitions() = 0;
1140 
1141  virtual HOM_Drawable2D * newDrawable2D(HOM_PaneTab& hpanetab, HOM_EnumValue const & type,
1142  std::string const & name, std::string const & label, bool pickable, bool fixed_size,
1143  std::map<std::string, hboost::any> const & params) = 0;
1144 
1145  virtual HOM_SimpleDrawable * newSimpleDrawable( HOM_SceneViewer& scene_viewer, HOM_EnumValue const &prim_type, std::string const &name) = 0;
1146  virtual HOM_SimpleDrawable * newSimpleDrawable( HOM_SceneViewer& scene_viewer, HOM_Geometry const &geometry, std::string const &name) = 0;
1147 
1148  virtual HOM_ViewerHandleDragger * newViewerHandleDragger(std::string const & name) = 0;
1149  virtual HOM_ViewerHandleDragger2D * newViewerHandleDragger2D(HOM_PaneTab& hpanetab, HOM_Handle& handle) = 0;
1150  virtual HOM_ViewerStateDragger2D * newViewerStateDragger2D(HOM_PaneTab& hpanetab, HOM_Matrix4 const & xform, HOM_Matrix4 const & inv_xform) = 0;
1151  virtual HOM_ViewerStateDragger * newViewerStateDragger(std::string const & name, HOM_Matrix4 const & xform, HOM_Matrix4 const & inv_xform) = 0;
1152 
1153  virtual HOM_UIEvent * newUIEvent( int64 val, int64 val2 ) = 0;
1154  virtual HOM_ViewerEvent * newViewerEvent( HOM_SceneViewer& scene_viewer, int64 val, int64 val2 ) = 0;
1155  virtual HOM_CompositorViewerEvent * newCompositorViewerEvent( HOM_CompositorViewer& viewer, int64 val, int64 val2 ) = 0;
1156  virtual HOM_UIEventDevice * newUIEventDevice(int64 val, int64 val2, int64 val3) = 0;
1157 
1158  virtual HOM_Handle * newHandle(HOM_PaneTab& scene_viewer, std::string const &name ) = 0;
1159  virtual HOM_ViewerHandleContext * newViewerHandleContext(int64 val) = 0;
1160 
1161  virtual HOM_ViewerStateContext * newViewerStateContext(int64 val) = 0;
1162 
1163  virtual HOM_TextDrawable * newTextDrawable(
1164  HOM_SceneViewer& scene_viewer,
1165  std::string const & name,
1166  std::map<std::string, hboost::any> const & params,
1167  std::string const & label) = 0;
1168 
1169  virtual HOM_GeometryDrawable * newGeometryDrawable(
1170  HOM_SceneViewer& scene_viewer,
1171  HOM_EnumValue const & geo_type,
1172  std::string const & name,
1173  HOM_Geometry * geometry,
1174  std::map<std::string, hboost::any> const & params,
1175  std::string const & label) = 0;
1176 
1177  virtual HOM_GeometryDrawableGroup* newGeometryDrawableGroup(std::string const & name, std::string const & label) = 0;
1178 
1179  virtual HOM_GadgetDrawable * newGadgetDrawable(int64 widget, int64 gadget_context) = 0;
1180 
1181  virtual void startHoudiniEngineDebugger(unsigned short port) = 0;
1182  virtual void startHoudiniEngineDebugger(const char *pipe_name) = 0;
1183 
1184  virtual HOM_GeometrySelection * newGeometrySelection() = 0;
1185  virtual HOM_GeometrySelection * newGeometrySelection(int64 val) = 0;
1186 
1187  virtual HOM_logging_MemorySink * newMemorySink() = 0;
1188  virtual HOM_logging_FileSink * newFileSink(const char *filepath) = 0;
1189 
1190  virtual HOM_BinaryString convertClipData(HOM_BinaryString data,
1191  bool from_binary,
1192  bool from_blosc_compression,
1193  bool to_binary,
1194  bool to_blosc_compression) = 0;
1195 
1196  virtual HOM_BinaryString convertKeyframesToClipData(
1197  const std::map<std::string, std::vector<HOM_Keyframe *>> &keyframe_map,
1198  bool binary = true, bool use_blosc_compression = true) = 0;
1199 
1200  virtual std::string _clipInfo(HOM_BinaryString data, bool binary = true,
1201  bool blosc_compressed = true) = 0;
1202 
1203  virtual std::vector<HOM_ElemPtr<HOM_Node> > _nodesFromOPNodeList(int64 val) = 0;
1204  virtual std::vector<HOM_ElemPtr<HOM_DopData> >
1205  _dopDataList(int64 val) = 0;
1206  virtual std::vector<std::pair<HOM_ElemPtr<HOM_DopData>, HOM_ElemPtr<HOM_GeometrySelection> > >
1207  _dopDataPointList(int64 val) = 0;
1208  virtual std::vector<std::pair<HOM_ElemPtr<HOM_DopData>, HOM_ElemPtr<HOM_GeometrySelection> > >
1209  _dopDataPolyList(int64 val) = 0;
1210 
1211  virtual HOM_AttribDataId * newAttribDataId() = 0;
1212 
1213  virtual std::string userName(bool alpha=true) = 0;
1214 
1215  virtual std::string machineName(bool alpha=true) = 0;
1216 
1217  virtual HOM_GeometryDrawable * _newGeometryDrawable(int64 val) = 0;
1218 
1219  virtual HOM_Node * createAnimationLayers(const std::string &path) = 0;
1220  virtual HOM_Node * addAnimationLayer(HOM_Node &layermixer, const std::string &layername) = 0;
1221  virtual bool removeAnimationLayer(HOM_Node &layermixer, const std::string &layername, bool merge=false) = 0;
1222  virtual HOM_Node* createAnimationClip(const std::string &path, bool set_export) = 0;
1223 
1224  virtual void* _sceneViewerWindow(int64 val) = 0;
1225 
1226  virtual HOM_ImageLayer *_lookupImageLayer(int64 key) const = 0;
1227  virtual HOM_NanoVDB *_lookupNanoVDB(int64 key) const = 0;
1228  virtual HOM_DetachedAttrib *_lookupDetachedAttrib(int64 key) const = 0;
1229  virtual HOM_Ramp *_lookupRamp(int64 key) const = 0;
1230  virtual HOM_Geometry *_lookupGeometry(int64 key) const = 0;
1231 
1232  virtual std::vector<std::string> _prioritizePatternMatches(
1233  const std::vector<std::string> & items,
1234  const std::vector<std::string> & patterns) const = 0;
1235 
1236  virtual void registerOpdefPath(
1237  const std::string &path,
1238  const std::string &server_name,
1239  const std::string &port_name)
1240  = 0;
1241 
1242  virtual std::vector<std::string> videoEncoders(
1243  HOM_EnumValue const &driver, const bool available=false) = 0;
1244 
1245  virtual void refreshStartupPathCacheDirectory(const std::string &dir_path) = 0;
1246 
1247  void _debugAssert(bool v, const std::string &message);
1248 
1249 private:
1250  // HOMF_Module::createHOMModule() uses this to create the HOM_Module.
1251  static void (*theHOMCreator)();
1252 
1253  // A subclass of HOM_Module in the HOMF library will define the
1254  // implementation of HOM. Importing the python module will set the
1255  // implementation, so this function should only be called by HOMF_Module::
1256  // createHOMModule().
1257  friend class HOMF_Module;
1258  static void setImplementation(HOM_Module* implementation);
1259 
1260  // We could add a static method to access the implementation, but we
1261  // want to make it easy to access the HOM module from C++. So, the
1262  // global function HOM() needs access to the implementation.
1263  friend HOM_API HOM_Module& HOM();
1264  static HOM_Module *theImplementation;
1265 };
1266 
1267 
1268 // Use this function to automatically delete objects for functions that
1269 // return new objects. This lets you, for example, write code like
1270 // HOMdel(HOM().findNode("/obj/geo1"))->setName("geo2")
1271 template <typename T>
1273 { return UT_UniquePtr<T>(hom_object); }
1274 
1275 
1276 // This lock is used to synchronize HOM scripts running in a separate
1277 // thread and Houdini. Houdini's UI queue will give up the lock when it's
1278 // waiting for events and reacquire it when it handles an event.
1279 //
1280 // Note that this lock allows multiple threads in the same thread group to hold
1281 // it at the same time. By default, a thread started from Houdini is added to
1282 // the group containing the main thread. This way, since Houdini started the
1283 // thread, we can be confident that it will use other locks to synchronize
1284 // access to Houdini. This approach allows, for example, a volume SOP to
1285 // cook using multiple threads, evaluating Python in each thread while the
1286 // main thread holds the HOM lock, without deadlocking and without allowing
1287 // non-Houdini threads to acquire the HOM lock. (Note that the GIL will
1288 // synchronize access to Python's internals.)
1291 {
1292  // This is not thread-safe but should be ok because HOMgetLock() is called
1293  // pretty early on during startup when there is only one thread executing.
1294  if (!HOM_theHOMLock)
1295  HOM_theHOMLock = new UT_TaskRootLock();
1296 
1297  UT_ASSERT(HOM_theHOMLock);
1298  return *HOM_theHOMLock;
1299 }
1300 
1301 // The HOM implementation uses the HOM_AutoLock to make sure Houdini isn't busy
1302 // when they make calls into the Houdini libraries. Note that constructing
1303 // a HOM_AutoLock will release the python global interpreter lock (GIL) if
1304 // it was held before acquiring the HOM lock. This way, other python threads
1305 // can run if it needs to block waiting for the HOM lock.
1307 {
1308 public:
1310  {
1311  if (!HOMgetLock().hasLock())
1312  {
1313  HOMgetLock().lock();
1314  myLocked = true;
1315  }
1316  else
1317  myLocked = false;
1318  }
1319 
1321  {
1322  if (myLocked)
1323  HOMgetLock().unlock();
1324  }
1325 
1326 private:
1327 
1328  // It is important that we release the python global interpreter lock
1329  // (GIL) for the duration of waiting for, acquiring and holding onto
1330  // the HOM lock. This gives other threads that are either blocked
1331  // on the GIL or that will try to acquire the GIL a chance to continue
1332  // execution.
1333  //
1334  // If the current thread needs to access the Python API,
1335  // then it should explicitly acquire the GIL by creating a
1336  // PY_InterpreterAutoLock object. The PY_InterpreterAutoLock must be
1337  // constructed *after* the HOM_AutoLock or it will have no effect.
1338  //
1339  // This prevents deadlocks that occur when the current thread
1340  // spawns other threads which access the Python API and try to
1341  // acquire the GIL.
1342  //
1343  // Note that we will reacquire the GIL when the HOM auto lock is destructed.
1344  PY_InterpreterAutoUnlock myPyInterpAutoUnlock;
1345 
1346  // Boolean to determine if the auto lock actually locked the HOM lock.
1347  bool myLocked;
1348 };
1349 
1350 // The HOM implementation uses HOM_AutoUnlock to allow the main thread to
1351 // run while waiting for something to happen. Constructing a HOM_AutoUnlock
1352 // instance will release the HOM lock but not the Python GIL. When it's
1353 // destructed it will reacquire the HOM lock. Since it releases the HOM lock,
1354 // it's important that a HOM_AutoLock was already created in a containing
1355 // scope.
1356 //
1357 // Use HOM_AutoUnlock in conjunction with PY_InterpreterAutoUnlock to
1358 // also release the Python GIL. Be sure to create the HOM_AutoUnlock *after*
1359 // the PY_InterpreterAutoUnlock, so that when the auto locks are destructed
1360 // the HOM lock is reacquired before the Python GIL. Otherwise, it will grab
1361 // the GIL and then try to grab the HOM lock, and if another thread with the
1362 // HOM lock tries to run Python we'll end up with deadlock.
1364 {
1365 public:
1367  {
1368  if (HOMgetLock().hasLock())
1369  {
1370  HOMgetLock().unlock();
1371  myUnlocked = true;
1372  }
1373  else
1374  {
1375  myUnlocked = false;
1376  }
1377  }
1378 
1380  {
1381  if (myUnlocked)
1382  HOMgetLock().lock();
1383  }
1384 
1385 private:
1386  bool myUnlocked;
1387 };
1388 
1389 
1390 // These macros are used to help detect memory leaks when debugging is enabled.
1391 #ifdef HOM_DEBUG
1392 #define HOM_CONSTRUCT_OBJECT(pointer) \
1393  HOM().constructObject(pointer, typeid(*pointer));
1394 #define HOM_DESTRUCT_OBJECT(pointer) \
1395  HOM().destructObject(pointer, typeid(*pointer));
1396 #else
1397 #define HOM_CONSTRUCT_OBJECT(pointer)
1398 #define HOM_DESTRUCT_OBJECT(pointer)
1399 #endif
1400 
1401 // NOTE: These typedefs cannot actually be used in any method declaration
1402 // that SWIG needs to generate code for because it doesn't understand
1403 // them.
1404 // gcc gets a parse error if we try to give a default map value in the
1405 // signature, and the typedef avoids the error.
1406 typedef std::map<std::string, std::string> HOM_StdMapStringString;
1407 typedef std::map<HOM_EnumValue *, std::string> HOM_StdMapEnumString;
1408 
1409 
1410 // Houdini will call HOMextendLibrary() in HDK dso's so the user can install
1411 // C++ HOM extensions.
1412 extern "C" {
1414 }
1415 
1416 #endif //__HOM_Module_h__
GLuint GLsizei const GLchar * message
Definition: glcorearb.h:2543
std::string ignore_case(std::string item)
Helper function to allow ignore_case to be passed to IsMember or Transform.
Definition: CLI11.h:3456
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
GLdouble GLdouble GLint GLint const GLdouble * points
Definition: glad.h:2676
#define SYS_VISIBILITY_EXPORT
void
Definition: png.h:1083
UT_TaskRootLock & HOMgetLock()
Definition: HOM_Module.h:1290
GT_API const UT_StringHolder time
const GLdouble * v
Definition: glcorearb.h:837
GLsizei const GLfloat * value
Definition: glcorearb.h:824
const GLuint GLenum const void * binary
Definition: glcorearb.h:1924
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
UT_UniquePtr< T > HOMdel(T *hom_object)
Definition: HOM_Module.h:1272
Definition: HOM_ik.h:21
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Quat< T > spline(const Quat< T > &q0, const Quat< T > &q1, const Quat< T > &q2, const Quat< T > &q3, T t) IMATH_NOEXCEPT
Definition: ImathQuat.h:621
GLint y
Definition: glcorearb.h:103
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glcorearb.h:2539
std::string help(const App *app, const Error &e)
Printout the full help string on error (if this fn is set, the old default for CLI11) ...
Definition: CLI11.h:8978
GLenum const GLfloat * params
Definition: glcorearb.h:105
GLenum GLuint GLint GLint layer
Definition: glcorearb.h:1299
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
Definition: HOM_qt.h:21
GLint GLsizei GLsizei height
Definition: glcorearb.h:103
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
UT_TaskLockT< false > UT_TaskRootLock
Definition: UT_TaskLock.h:289
HOM_API UT_TaskRootLock * HOM_theHOMLock
bool any(const vbool4 &v)
Definition: simd.h:3600
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
virtual ~HOM_Module()
Definition: HOM_Module.h:204
constexpr std::enable_if< I< type_count_base< T >::value, int >::type tuple_type_size(){return subtype_count< typename std::tuple_element< I, T >::type >::value+tuple_type_size< T, I+1 >);}template< typename T > struct type_count< T, typename std::enable_if< is_tuple_like< T >::value >::type >{static constexpr int value{tuple_type_size< T, 0 >)};};template< typename T > struct subtype_count{static constexpr int value{is_mutable_container< T >::value?expected_max_vector_size:type_count< T >::value};};template< typename T, typename Enable=void > struct type_count_min{static const int value{0};};template< typename T >struct type_count_min< T, typename std::enable_if<!is_mutable_container< T >::value &&!is_tuple_like< T >::value &&!is_wrapper< T >::value &&!is_complex< T >::value &&!std::is_void< T >::value >::type >{static constexpr int value{type_count< T >::value};};template< typename T > struct type_count_min< T, typename std::enable_if< is_complex< T >::value >::type >{static constexpr int value{1};};template< typename T >struct type_count_min< T, typename std::enable_if< is_wrapper< T >::value &&!is_complex< T >::value &&!is_tuple_like< T >::value >::type >{static constexpr int value{subtype_count_min< typename T::value_type >::value};};template< typename T, std::size_t I >constexpr typename std::enable_if< I==type_count_base< T >::value, int >::type tuple_type_size_min(){return 0;}template< typename T, std::size_t I > constexpr typename std::enable_if< I< type_count_base< T >::value, int >::type tuple_type_size_min(){return subtype_count_min< typename std::tuple_element< I, T >::type >::value+tuple_type_size_min< T, I+1 >);}template< typename T > struct type_count_min< T, typename std::enable_if< is_tuple_like< T >::value >::type >{static constexpr int value{tuple_type_size_min< T, 0 >)};};template< typename T > struct subtype_count_min{static constexpr int value{is_mutable_container< T >::value?((type_count< T >::value< expected_max_vector_size)?type_count< T >::value:0):type_count_min< T >::value};};template< typename T, typename Enable=void > struct expected_count{static const int value{0};};template< typename T >struct expected_count< T, typename std::enable_if<!is_mutable_container< T >::value &&!is_wrapper< T >::value &&!std::is_void< T >::value >::type >{static constexpr int value{1};};template< typename T > struct expected_count< T, typename std::enable_if< is_mutable_container< T >::value >::type >{static constexpr int value{expected_max_vector_size};};template< typename T >struct expected_count< T, typename std::enable_if<!is_mutable_container< T >::value &&is_wrapper< T >::value >::type >{static constexpr int value{expected_count< typename T::value_type >::value};};enum class object_category:int{char_value=1, integral_value=2, unsigned_integral=4, enumeration=6, boolean_value=8, floating_point=10, number_constructible=12, double_constructible=14, integer_constructible=16, string_assignable=23, string_constructible=24, other=45, wrapper_value=50, complex_number=60, tuple_value=70, container_value=80,};template< typename T, typename Enable=void > struct classify_object{static constexpr object_category value{object_category::other};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_integral< T >::value &&!std::is_same< T, char >::value &&std::is_signed< T >::value &&!is_bool< T >::value &&!std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::integral_value};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_integral< T >::value &&std::is_unsigned< T >::value &&!std::is_same< T, char >::value &&!is_bool< T >::value >::type >{static constexpr object_category value{object_category::unsigned_integral};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_same< T, char >::value &&!std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::char_value};};template< typename T > struct classify_object< T, typename std::enable_if< is_bool< T >::value >::type >{static constexpr object_category value{object_category::boolean_value};};template< typename T > struct classify_object< T, typename std::enable_if< std::is_floating_point< T >::value >::type >{static constexpr object_category value{object_category::floating_point};};template< typename T >struct classify_object< T, typename std::enable_if<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&std::is_assignable< T &, std::string >::value >::type >{static constexpr object_category value{object_category::string_assignable};};template< typename T >struct classify_object< T, typename std::enable_if<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&!std::is_assignable< T &, std::string >::value &&(type_count< T >::value==1)&&std::is_constructible< T, std::string >::value >::type >{static constexpr object_category value{object_category::string_constructible};};template< typename T > struct classify_object< T, typename std::enable_if< std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::enumeration};};template< typename T > struct classify_object< T, typename std::enable_if< is_complex< T >::value >::type >{static constexpr object_category value{object_category::complex_number};};template< typename T > struct uncommon_type{using type=typename std::conditional<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&!std::is_assignable< T &, std::string >::value &&!std::is_constructible< T, std::string >::value &&!is_complex< T >::value &&!is_mutable_container< T >::value &&!std::is_enum< T >::value, std::true_type, std::false_type >::type;static constexpr bool value=type::value;};template< typename T >struct classify_object< T, typename std::enable_if<(!is_mutable_container< T >::value &&is_wrapper< T >::value &&!is_tuple_like< T >::value &&uncommon_type< T >::value)>::type >{static constexpr object_category value{object_category::wrapper_value};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&is_direct_constructible< T, double >::value &&is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::number_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&!is_direct_constructible< T, double >::value &&is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::integer_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&is_direct_constructible< T, double >::value &&!is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::double_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< is_tuple_like< T >::value &&((type_count< T >::value >=2 &&!is_wrapper< T >::value)||(uncommon_type< T >::value &&!is_direct_constructible< T, double >::value &&!is_direct_constructible< T, int >::value)||(uncommon_type< T >::value &&type_count< T >::value >=2))>::type >{static constexpr object_category value{object_category::tuple_value};};template< typename T > struct classify_object< T, typename std::enable_if< is_mutable_container< T >::value >::type >{static constexpr object_category value{object_category::container_value};};template< typename T, enable_if_t< classify_object< T >::value==object_category::char_value, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"CHAR";}template< typename T, enable_if_t< classify_object< T >::value==object_category::integral_value||classify_object< T >::value==object_category::integer_constructible, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"INT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::unsigned_integral, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"UINT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::floating_point||classify_object< T >::value==object_category::number_constructible||classify_object< T >::value==object_category::double_constructible, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"FLOAT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::enumeration, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"ENUM";}template< typename T, enable_if_t< classify_object< T >::value==object_category::boolean_value, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"BOOLEAN";}template< typename T, enable_if_t< classify_object< T >::value==object_category::complex_number, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"COMPLEX";}template< typename T, enable_if_t< classify_object< T >::value >=object_category::string_assignable &&classify_object< T >::value<=object_category::other, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"TEXT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value >=2, detail::enabler >=detail::dummy >std::string type_name();template< typename T, enable_if_t< classify_object< T >::value==object_category::container_value||classify_object< T >::value==object_category::wrapper_value, detail::enabler >=detail::dummy >std::string type_name();template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value==1, detail::enabler >=detail::dummy >inline std::string type_name(){return type_name< typename std::decay< typename std::tuple_element< 0, T >::type >::type >);}template< typename T, std::size_t I >inline typename std::enable_if< I==type_count_base< T >::value, std::string >::type tuple_name(){return std::string{};}template< typename T, std::size_t I >inline typename std::enable_if<(I< type_count_base< T >::value), std::string >::type tuple_name(){auto str=std::string{type_name< typename std::decay< typename std::tuple_element< I, T >::type >::type >)}+ ','+tuple_name< T, I+1 >);if(str.back()== ',') str.pop_back();return str;}template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value >=2, detail::enabler > > std::string type_name()
Recursively generate the tuple type name.
Definition: CLI11.h:1729
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:803
Definition: HOM_ui.h:47
long long int64
Definition: SYS_Types.h:116
GLfloat GLfloat GLfloat alpha
Definition: glcorearb.h:112
GLuint const GLchar * name
Definition: glcorearb.h:786
GLushort pattern
Definition: glad.h:2583
GA_API const UT_StringHolder transform
GLint GLenum GLint x
Definition: glcorearb.h:409
Attempt to access an object that no longer exists in Houdini Invalid output Invalid type The attempted operation failed Node initialization script failed Failed to modify node or parameter because of a permission error Possible causes include locked takes
Definition: HOM_Errors.h:197
GLenum mode
Definition: glcorearb.h:99
GLfloat units
Definition: glcorearb.h:408
GLenum GLint GLint * precision
Definition: glcorearb.h:1925
std::map< HOM_EnumValue *, std::string > HOM_StdMapEnumString
Definition: HOM_Module.h:1407
std::string OIIO_UTIL_API repeat(string_view str, int n)
Repeat a string formed by concatenating str n times.
OIIO_API string_view getenv(string_view name, string_view defaultval)
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
SYS_VISIBILITY_EXPORT void HOMextendLibrary()
GLenum void ** pointer
Definition: glcorearb.h:810
GLuint color
Definition: glcorearb.h:1261
fpreal64 fpreal
Definition: SYS_Types.h:283
GLuint index
Definition: glcorearb.h:786
GLuint GLfloat * val
Definition: glcorearb.h:1608
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GU_API void xform(CE_Context &context, bool recompile, int npts, const cl::Buffer &outPos, const cl::Buffer &inPos, const cl::Buffer &surfacexform, const cl::Buffer *grp=nullptr)
virtual bool readFile(GA_Detail &g, const char *filename, const GA_LoadOptions *opts, UT_StringArray *errors) const
Class which defines an I/O interface to save/load geometry.
GLint GLsizei width
Definition: glcorearb.h:103
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:165
SYS_VISIBILITY_EXPORT void newHandle(BM_ResourceManager *m)
void unlock()
Definition: UT_TaskLock.h:261
OutGridT XformOp bool bool MergePolicy merge
HOM_API HOM_Module & HOM()
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
Definition: ImathBoxAlgo.h:29
static bool isImplementationSet()
Definition: HOM_Module.h:584
std::map< std::string, std::string > HOM_StdMapStringString
Definition: HOM_Module.h:1406
UT_UniquePtr< UT_OptionEntry > UT_OptionEntryPtr
Definition: format.h:1821
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)