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