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. This way, the methods of this class appear as the
10  * top-level parts of the hou module.
11  */
12 
13 #ifndef __HOM_Module_h__
14 #define __HOM_Module_h__
15 
16 #include "HOM_API.h"
17 #include "HOM_BinaryString.h"
18 #include "HOM_Defines.h"
19 #include "HOM_Errors.h"
20 #include "HOM_ElemPtr.h"
21 #include "HOM_EnumModules.h"
23 #include <UT/UT_Lock.h>
24 #include <UT/UT_NonCopyable.h>
25 #include <UT/UT_Notifier.h>
26 #include <UT/UT_TaskLock.h>
27 #include <UT/UT_Thread.h>
28 #include <UT/UT_UniquePtr.h>
29 #include <UT/UT_OptionEntry.h>
30 #include <SYS/SYS_Types.h>
31 #include <typeinfo>
32 #include <string>
33 #include <vector>
34 #include <map>
35 #include <hboost/any.hpp>
36 
37 class OP_Node;
38 class STORUI_OrboltURLHandler;
39 
41 class HOM_AgentClip;
43 class HOM_AgentLayer;
44 class HOM_AgentRig;
45 class HOM_AgentShape;
50 class HOM_AttribDataId;
51 class HOM_anonstats;
52 class HOM_audio;
54 class HOM_ChannelList;
55 class HOM_ChopNode;
56 class HOM_Color;
57 class HOM_crowds;
59 class HOM_SimpleDrawable;
60 class HOM_dop;
61 class HOM_DopData;
62 class HOM_DopSimulation;
63 class HOM_Edge;
64 class HOM_EnumValue;
65 class HOM_EvaluationCache;
69 class HOM_galleries;
70 class HOM_Geometry;
72 class HOM_Handle;
73 class HOM_hda;
74 class HOM_HDADefinition;
75 class HOM_HDAModule;
76 class HOM_HDAOptions;
78 class HOM_hipFile;
79 class HOM_hmath;
82 class HOM_Keyframe;
84 class HOM_lop;
89 class HOM_NetworkBox;
90 class HOM_NetworkDot;
92 class HOM_Node;
93 class HOM_NodeBundle;
94 class HOM_NodeConnection;
95 class HOM_NodeType;
98 class HOM_Parm;
99 class HOM_ParmTemplate;
101 class HOM_ParmTuple;
102 class HOM_perfMon;
104 class HOM_pypanel;
105 class HOM_playbar;
106 class HOM_Point;
107 class HOM_Prim;
108 class HOM_properties;
109 class HOM_qt;
111 class HOM_RedrawBlock;
112 #ifndef SWIG
114 #endif
115 class HOM_SceneViewer;
117 class HOM_Selection;
119 class HOM_shelves;
120 class HOM_StickyNote;
121 class HOM_StringKeyframe;
123 class HOM_styles;
124 class HOM_StyleSheet;
126 class HOM_takes;
127 class HOM_text;
128 class HOM_TextDrawable;
130 class HOM_ui;
131 class HOM_hotkeys;
132 class HOM_UIEvent;
133 class HOM_UIEventDevice;
134 class HOM_undos;
135 class HOM_Vertex;
136 class HOM_VexContext;
137 class HOM_ViewerEvent;
139 class HOM_ViewerStateMenu;
143 
144 #define HOM_SESSION_MODULE_NAME "hou.session"
145 #define HOM_SESSION_MODULE_CPIO_NAME "." HOM_SESSION_MODULE_NAME
146 
147 // Use this function to access the HOM module from C++ in Houdini. This
148 // is equivalent to writing "hou" in python. It will only throw an exception
149 // if the python module could not be imported, which should not happen.
150 class HOM_Module;
152 
154 {
155 public:
156  static void setHOMCreator(void (*homCreator)());
157 
158  virtual ~HOM_Module() {}
159 
160  virtual std::vector<std::string> _getArgumentAutoComplete(
161  const char *method_name, const char *arguments,
162  bool meta_info_only = false) = 0;
163 
164  // This method is called by the expression editor to force autocompletion
165  // to be relative to the node containing the expression. It is not
166  // wrapped by swig.
167  virtual void setRelativeNodeForAutoComplete(OP_Node *node) = 0;
168 
169  virtual HOM_ui& ui() = 0;
170  virtual HOM_qt& qt() = 0;
171  virtual HOM_hotkeys& hotkeys() = 0;
172  virtual HOM_audio& audio() = 0;
173  virtual bool isUIAvailable() = 0;
174  virtual bool _isCurrentThreadHoldingHOMLock() = 0;
175 
176  virtual HOM_galleries& galleries() = 0;
177  virtual HOM_hda& hda() = 0;
178  virtual HOM_hipFile& hipFile() = 0;
179  virtual HOM_perfMon& perfMon() = 0;
180  virtual HOM_playbar& playbar() = 0;
181  virtual HOM_pypanel& pypanel() = 0;
182  virtual HOM_hmath& hmath() = 0;
183  virtual HOM_dop& dop() = 0;
184  virtual HOM_properties& properties() = 0;
185  virtual HOM_shelves& shelves() = 0;
186  virtual HOM_styles& styles() = 0;
187  virtual HOM_takes& takes() = 0;
188  virtual HOM_undos& undos() = 0;
189  virtual HOM_viewportVisualizers& viewportVisualizers() = 0;
190  virtual HOM_anonstats& anonstats() = 0;
191  virtual HOM_crowds& crowds() = 0;
192  virtual HOM_lop& lop() = 0;
193  virtual HOM_text& text() = 0;
194 
195  virtual bool _assertWrapper(
196  const char *file, int linenum, const char *function,
197  const char *condition, const char *reason) = 0;
198 
199  virtual void exit(int exit_code=0, bool suppress_save_prompt=false) = 0;
200 
201  // isExiting() will return true if the program is actually Houdini (not
202  // mplay) and the UI queue is closed. This method is wrapped by swig, but
203  // only so houdiniInterpreter can call it.
204  virtual bool isExiting() = 0;
205 
206  virtual void addPreloadIcon(const char *name, int w, int h) = 0;
207  virtual void rasterizePreloadIcons() = 0;
208 
209  virtual std::string applicationName() = 0;
210  virtual std::vector<int> applicationVersion(bool include_patch=false) = 0;
211  virtual std::string applicationVersionString() = 0;
212  virtual std::string applicationCompilationDate() = 0;
213  virtual std::string applicationPlatformInfo() = 0;
214  virtual HOM_EnumValue &licenseCategory() = 0;
215  virtual bool isApprentice() = 0;
216  virtual void releaseLicense() = 0;
217 
218  // Threading controls
219  virtual int maxThreads() = 0;
220  virtual void setMaxThreads(int max_threads) = 0;
221 
222  // These methods return a new HOM_Node object.
223  virtual HOM_Node* root() = 0;
224  virtual HOM_Node* pwd() = 0;
225  virtual HOM_Node* parent() = 0;
226 
227  virtual void setPwd(HOM_Node &newpwd) = 0;
228  virtual void cd(const char *path) = 0;
229 
230  // Calling phm() is a shortcut for calling pwd().hdaModule().
231  virtual HOM_HDAModule* phm() = 0;
232 
233  // This method returns a new HOM_DopNetNode object or None.
234  virtual HOM_Node* currentDopNet() = 0;
235  virtual void setCurrentDopNet(HOM_Node &dopnet) = 0;
236 
237  // Gets or sets the simulation enabled state.
238  virtual bool simulationEnabled() = 0;
239  virtual void setSimulationEnabled(bool enabled) = 0;
240 
241  // These methods return a new HOM_Node object or null if the node couldn't
242  // be found.
243  virtual HOM_Node *node(const char *path) = 0;
244  virtual HOM_NetworkMovableItem* item(const char *path) = 0;
245 
246  virtual std::vector<HOM_ElemPtr<HOM_Node> > nodes(const std::vector<std::string> &paths) = 0;
247  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> > items(const std::vector<std::string> &paths) = 0;
248 
249  virtual HOM_Node *nodeBySessionId(int session_id) = 0;
250  virtual HOM_NetworkBox *networkBoxBySessionId(int session_id) = 0;
251  virtual HOM_StickyNote *stickyNoteBySessionId(int session_id) = 0;
252  virtual HOM_SubnetIndirectInput *subnetIndirectInputBySessionId(
253  int64 session_id) = 0;
254  virtual HOM_NetworkDot *networkDotBySessionId(int session_id) = 0;
255  virtual HOM_NetworkMovableItem *itemBySessionId(
256  HOM_EnumValue &item_type, int64 session_id) = 0;
257  virtual HOM_NodeConnection *nodeConnectionBySessionId(
258  int node_session_id, int input_index) = 0;
259 
260  // Functions for configuring default colors on network elements.
261  virtual HOM_Color defaultColor(HOM_EnumValue &color_item) = 0;
262  virtual void setDefaultColor(HOM_EnumValue &color_item, HOM_Color *color) = 0;
263 
264  // Return HOM_Nodes for all selected nodes in the session.
265  virtual std::vector<HOM_ElemPtr<HOM_Node> > selectedNodes(
266  bool include_hidden = false) = 0;
267  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> > selectedItems(
268  bool include_hidden = false) = 0;
269  virtual std::vector<HOM_ElemPtr<HOM_NodeConnection> > selectedConnections() = 0;
270  virtual void clearAllSelected() = 0;
271 
272  // Copy nodes to and paste from clipboard.
273  virtual void copyNodesToClipboard(const std::vector<HOM_Node *> &nodes) = 0;
274  virtual void pasteNodesFromClipboard(HOM_Node &destination_node) = 0;
275 
276  // These methods return new HOM_Parm/HOM_ParmTuple objects or null if the
277  // parm couldn't be found.
278  virtual HOM_Parm* parm(const char *path) = 0;
279  virtual HOM_ParmTuple* parmTuple(const char *path) = 0;
280  virtual HOM_Parm *evaluatingParm() = 0;
281 
282  virtual HOM_ScriptEvalContext * newScriptEvalContext(HOM_Node &node) = 0;
283  virtual HOM_ScriptEvalContext * newScriptEvalContext(HOM_Parm &parm) = 0;
284 
285  // Access to the contents of the parm clipboard
286  virtual std::vector< std::map<std::string, std::string> >
287  parmClipboardContents() = 0;
288 
289  // These methods return a new HOM_NodeType object or null if it couldn't
290  // be found.
291  virtual HOM_NodeType *nodeType(
292  HOM_NodeTypeCategory &category, const char *name) = 0;
293  virtual HOM_NodeType *nodeType(const char *name) = 0;
294 
295  virtual HOM_NodeType *preferredNodeType(
296  const char *name, HOM_Node *parentNode = NULL) = 0;
297 
298  virtual HOM_NodeTypeCategory &objNodeTypeCategory() = 0;
299  virtual HOM_NodeTypeCategory &sopNodeTypeCategory() = 0;
300 #if 0
301  virtual HOM_NodeTypeCategory &popNodeTypeCategory() = 0;
302 #endif
303  virtual HOM_NodeTypeCategory &dopNodeTypeCategory() = 0;
304  virtual HOM_NodeTypeCategory &cop2NodeTypeCategory() = 0;
305  virtual HOM_NodeTypeCategory &shopNodeTypeCategory() = 0;
306  virtual HOM_NodeTypeCategory &vopNodeTypeCategory() = 0;
307  virtual HOM_NodeTypeCategory &ropNodeTypeCategory() = 0;
308  virtual HOM_NodeTypeCategory &chopNodeTypeCategory() = 0;
309  virtual HOM_NodeTypeCategory &topNodeTypeCategory() = 0;
310  virtual HOM_NodeTypeCategory &lopNodeTypeCategory() = 0;
311 #if 0
312  virtual HOM_NodeTypeCategory &popNetNodeTypeCategory() = 0;
313 #endif
314  virtual HOM_NodeTypeCategory &cop2NetNodeTypeCategory() = 0;
315  virtual HOM_NodeTypeCategory &vopNetNodeTypeCategory() = 0;
316  virtual HOM_NodeTypeCategory &chopNetNodeTypeCategory() = 0;
317  virtual HOM_NodeTypeCategory &topNetNodeTypeCategory() = 0;
318  virtual HOM_NodeTypeCategory &managerNodeTypeCategory() = 0;
319  virtual HOM_NodeTypeCategory &rootNodeTypeCategory() = 0;
320  virtual std::map<std::string, HOM_NodeTypeCategory *>
321  nodeTypeCategories() = 0;
322 
323  virtual std::vector<HOM_ElemPtr<HOM_Node> > copyNodesTo(
324  const std::vector<HOM_Node *> &nodes,
325  HOM_Node &destination_node) = 0;
326  virtual std::vector<HOM_ElemPtr<HOM_Node> > moveNodesTo(
327  const std::vector<HOM_Node *> &nodes,
328  HOM_Node &destination_node) = 0;
329 
330  virtual HOM_NodeBundle *addNodeBundle(const char *name = NULL) = 0;
331  virtual std::vector<HOM_ElemPtr<HOM_NodeBundle> > nodeBundles() = 0;
332  virtual std::vector<HOM_ElemPtr<HOM_NodeBundle> > selectedNodeBundles() = 0;
333  virtual HOM_NodeBundle *nodeBundle(const char *name) = 0;
334 
335  virtual HOM_HDADefinition *hdaDefinition(
336  HOM_NodeTypeCategory &category, const char *name,
337  const char *file_path) = 0;
338 
339  // Note that getTimeWithoutAddingDependency is not wrapped by swig.
340  virtual fpreal getTimeWithoutAddingDependency() = 0;
341  virtual double time() = 0;
342  virtual void setTime(double time) = 0;
343  virtual double frame() = 0;
344  virtual int intFrame() = 0;
345  virtual void setFrame(double frame) = 0;
346  virtual double fps() = 0;
347  virtual void setFps(double fps) = 0;
348  virtual double timeToFrame(double time) = 0;
349  virtual double frameToTime(double frame) = 0;
350 
351  /// Private methods for ensuring that the current eval context
352  /// (including global time) is in-sync with the main thread's eval
353  /// context.
354  virtual void _syncFromMainContext() = 0;
355  virtual void _syncToMainContext() = 0;
356 
357  // Computes a scale factor given units
358  virtual fpreal scaleFromMKS(const char *units) = 0;
359  virtual fpreal scaleToMKS(const char *units) = 0;
360 
361  virtual double bezier() = 0;
362  virtual double constant() = 0;
363  virtual double cubic() = 0;
364  virtual double cycle(double start_frame, double end_frame) = 0;
365  virtual double cyclet(double start_time, double end_time) = 0;
366  virtual double cycleoffset(double start_frame, double end_frame) = 0;
367  virtual double cycleoffsett(double start_time, double end_time) = 0;
368  virtual double ease() = 0;
369  virtual double easein() = 0;
370  virtual double easeinp(double ease_speed) = 0;
371  virtual double easeout() = 0;
372  virtual double easeoutp(double ease_speed) = 0;
373  virtual double easep(double ease_bias) = 0;
374  virtual double linear() = 0;
375  virtual double match() = 0;
376  virtual double matchin() = 0;
377  virtual double matchout() = 0;
378  virtual double qlinear() = 0;
379  virtual double quintic() = 0;
380  virtual double repeat(double start_frame, double end_frame) = 0;
381  virtual double repeatt(double start_time, double end_time) = 0;
382  virtual double spline() = 0;
383  virtual double vmatch() = 0;
384  virtual double vmatchin() = 0;
385  virtual double vmatchout() = 0;
386 
387  virtual std::string chopExportConflictResolutionPattern() = 0;
388  virtual void setChopExportConflictResolutionPattern( const char *pattern) = 0;
389 
390  virtual std::vector<HOM_ElemPtr<HOM_VexContext> >
391  vexContexts() = 0;
392 
393  virtual HOM_VexContext* vexContextForShaderType(HOM_EnumValue &shader_type) = 0;
394 
395  virtual HOM_VexContext* vexContextForNodeTypeCategory(
396  HOM_NodeTypeCategory &node_type_category) = 0;
397 
398  virtual std::string helpServerUrl() = 0;
399 
400  virtual std::string hscriptCommandHelp(const char *command_name) = 0;
401 
402  // This method returns a pair of strings: one for stdout and one for
403  // stderr.
404  virtual std::vector<std::string> hscript(const char *command) = 0;
405 
406  // Compare if two numbers are almost equal.
407  virtual bool almostEqual(double x, double y) = 0;
408 
409  virtual std::vector<std::pair<HOM_ElemPtr<HOM_Parm>, std::string> >
410  fileReferences(
411  const char *project_dir_variable="HIP", bool include_all_refs=true) = 0;
412 
413  // Find files in $HOUDINI_PATH.
414  virtual std::string findFile(const char *file_name) = 0;
415  virtual std::vector<std::string> findFiles(
416  const char *file_name) = 0;
417  virtual std::vector<std::string> findFilesWithExtension(
418  const char *file_extension, const char *subdirectory = NULL) = 0;
419 
420  // Find directories in $HOUDINI_PATH.
421  virtual std::string findDirectory(const char *directory_name) = 0;
422  virtual std::vector<std::string> findDirectories(
423  const char *directory_name) = 0;
424 
425  virtual std::vector<std::string> houdiniPath(const char *pathvar = nullptr) = 0;
426 
427  virtual std::string homeHoudiniDirectory() = 0;
428 
429  virtual HOM_BinaryString readFile(const char *file_path) = 0;
430 
431  virtual std::map<std::string, HOM_BinaryString> loadIndexDataFromString(
432  const char *data, int length) = 0;
433 
434  virtual std::map<std::string, HOM_BinaryString> loadIndexDataFromFile(
435  const char *file_path) = 0;
436 
437  virtual HOM_BinaryString saveIndexDataToString(
438  const std::map<std::string, std::string> &index_data) = 0;
439 
440  virtual void saveIndexDataToFile(
441  const char *file_path,
442  const std::map<std::string, std::string> &index_data) = 0;
443 
444  // Note that, when wrapped by swig, this function takes a single string
445  // parameter.
446  virtual std::vector<std::pair<std::string, HOM_BinaryString> >
447  loadCPIODataFromString(const char *data, int length) = 0;
448 
449  virtual HOM_BinaryString saveCPIODataToString(
450  const std::vector<std::pair<std::string, std::string> > &data) = 0;
451 
452  // These 3 methods are not wrapped by swig. They are used to notify
453  // interested parties that a change to the module source code was made and
454  // that they should forcefully update to match the change. The third
455  // is used to load the session module source from a hip file, even though
456  // that source might generate an exception.
457  virtual UT_NotifierImpl<int> &getSessionModuleSourceForceUpdateNotifier()=0;
458  virtual void forceUpdateFromSessionModuleSource() = 0;
459  virtual void forceSetSessionModuleSource(const char *source) = 0;
460 
461  virtual void setSessionModuleSource(const char *source) = 0;
462  virtual void appendSessionModuleSource(const char *source) = 0;
463  virtual std::string sessionModuleSource() = 0;
464  // This method is not wrapped by swig:
465  virtual int sessionModuleSourceChangeCount() = 0;
466 
467  // This static method lets you know if the HOM implementation is set,
468  // so you can check if it's safe to call the HOM() function. This method
469  // should only be called in rare cases.
470  static bool isImplementationSet()
471  { return theImplementation != NULL; }
472 
473  // Evaluates a parameter as if it was an OPpath parameter
474  virtual std::string chsop(const char *path) = 0;
475 
476  // Evaluates a parameter as if it was an OPlist parameter
477  virtual std::string chsoplist(const char *path) = 0;
478 
479  // Sorts a list of node paths using topological order from the graph.
480  virtual std::vector<std::string>
481  sortedNodePaths(const std::vector<std::string> &paths) = 0;
482 
483  // Sorts a list of HOM_Node using topological order from the graph.
484  virtual std::vector<HOM_ElemPtr<HOM_Node> >
485  sortedNodes(const std::vector<HOM_Node*> &nodes) = 0;
486 
487  virtual int patternMatch(
488  const char *pattern, const char *str,
489  bool ignore_case = false,
490  bool path_match = false) = 0;
491 
492  // hscriptExpression() will return different types, according to
493  // the return value of the expression.
494  virtual hboost::any hscriptExpression(const char *expression) = 0;
495  virtual double hscriptFloatExpression(const char *expression) = 0;
496  virtual std::string hscriptStringExpression(const char *expression) = 0;
497  virtual std::vector<double>hscriptVectorExpression(
498  const char *expression) = 0;
499  virtual std::vector<std::vector<double> > hscriptMatrixExpression(
500  const char *expression) = 0;
501 
502  virtual hboost::any lvar(const char *name) = 0;
503 
504  virtual char *getenv(const char *name, const char *default_value=NULL) = 0;
505 
506  virtual void putenv(const char *name, const char *value) = 0;
507 
508  virtual void unsetenv(const char *name) = 0;
509 
510  virtual void allowEnvironmentToOverwriteVariable(
511  const char *name, bool onoff) = 0;
512 
513  virtual void *expressionGlobals() = 0;
514 
515  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
516 
517  // This method is used to interact with the global interrupt object.
518  virtual bool updateProgressAndCheckForInterrupt(int percentage=-1) = 0;
519 
520  virtual std::map<std::string, hboost::any> runVex(
521  const char *vex_file,
522  const std::map<std::string, hboost::any> &inputs,
523  const char *precision = "32") = 0;
524 
525  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
526 
527  virtual void saveImageDataToFile(
528  const std::vector<float> &color_and_alpha_data,
529  int width, int height,
530  const char *file_name) = 0;
531 
532  virtual void saveImageDataToFile(
533  const std::string &color_and_alpha_data,
534  int width, int height,
535  const char *file_name) = 0;
536 
537  virtual HOM_BinaryString loadImageDataFromFile(
538  const char *image_file_name,
539  HOM_EnumValue &image_depth = HOM_imageDepth::Int8) = 0;
540 
541  virtual std::vector<int> imageResolution(const char *image_file_name) = 0;
542 
543  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
544 
545  virtual HOM_EnumValue &updateModeSetting() = 0;
546  virtual void setUpdateMode(HOM_EnumValue &mode) = 0;
547 
548  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
549 
550  virtual HOM_OrboltURLHandler *orboltURLHandler() = 0;
551 
552  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
553 
554  virtual void *opaqueRunCallbackAndCatchCrashes(void *opaque_callback) = 0;
555 
556  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
557 
558  // These methods are used to grant functions defined in an asset's
559  // PythonModule enhanced privileges. They are not wrapped by swig.
560  virtual void pushAccessPrivilege(const char *key) = 0;
561  virtual void popAccessPrivilege(const char *key) = 0;
562 
563  virtual std::string currentPythonModuleKey() = 0;
564 
565  virtual void registerAccessPrivilegePyClient(void *opaque_python_object) = 0;
566 
567  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
568 
569  // These methods are used to instantiate HOMF objects from the HOM
570  // library level. They are not wrapped by swig.
571  virtual HOM_FloatParmTemplate *newFloatParmTemplate(
572  const char *name,
573  const char *label,
574  int num_components,
575  const std::vector<double> &default_value,
576  double min, double max,
577  bool min_is_strict, bool max_is_strict,
578  HOM_EnumValue &look,
579  HOM_EnumValue &naming_scheme,
580  const char *disable_when,
581  bool is_hidden,
582  bool is_label_hidden,
583  bool join_with_next,
584  const char *help,
585  const char *script_callback,
586  HOM_EnumValue &script_callback_language,
587  const std::map<std::string, std::string> &tags,
588  const std::map<HOM_EnumValue, std::string> &conditionals,
589  const std::vector<std::string> &default_expression,
590  const std::vector<HOM_EnumValue *> &default_expression_language) = 0;
591 
592  virtual HOM_IntParmTemplate *newIntParmTemplate(
593  const char *name,
594  const char *label,
595  int num_components,
596  const std::vector<int> &default_value,
597  int min, int max,
598  bool min_is_strict, bool max_is_strict,
599  HOM_EnumValue &naming_scheme,
600  const std::vector<std::string> &menu_items,
601  const std::vector<std::string> &menu_labels,
602  const std::vector<std::string> &icon_names,
603  const std::string &item_generator_script,
604  HOM_EnumValue *item_generator_script_language,
605  HOM_EnumValue &menu_type,
606  bool menu_use_token,
607  const char *disable_when,
608  bool is_hidden,
609  bool is_label_hidden,
610  bool join_with_next,
611  const char *help,
612  const char *script_callback,
613  HOM_EnumValue &script_callback_language,
614  const std::map<std::string, std::string> &tags,
615  const std::map<HOM_EnumValue, std::string> &conditionals,
616  const std::vector<std::string> &default_expression,
617  const std::vector<HOM_EnumValue *> &default_expression_language) = 0;
618 
619  virtual HOM_StringParmTemplate *newStringParmTemplate(
620  const char *name,
621  const char *label,
622  int num_components,
623  const std::vector<std::string> &default_value,
624  HOM_EnumValue &naming_scheme,
626  HOM_EnumValue &file_type,
627  const std::vector<std::string> &menu_items,
628  const std::vector<std::string> &menu_labels,
629  const std::vector<std::string> &icon_names,
630  const std::string &item_generator_script,
631  HOM_EnumValue *item_generator_script_language,
632  HOM_EnumValue &menu_type,
633  const char *disable_when,
634  bool is_hidden,
635  bool is_label_hidden,
636  bool join_with_next,
637  const char *help,
638  const char *script_callback,
639  HOM_EnumValue &script_callback_language,
640  const std::map<std::string, std::string> &tags,
641  const std::map<HOM_EnumValue, std::string> &conditionals,
642  const std::vector<std::string> &default_expression,
643  const std::vector<HOM_EnumValue *> &default_expression_language) = 0;
644 
645  virtual HOM_DataParmTemplate *newDataParmTemplate(
646  const char *name,
647  const char *label,
648  int num_components,
649  HOM_EnumValue &look,
650  HOM_EnumValue &naming_scheme,
651  HOM_EnumValue &data_parm_type,
652  const char *disable_when,
653  bool is_hidden,
654  bool is_label_hidden,
655  bool join_with_next,
656  const char *help,
657  const char *script_callback,
658  HOM_EnumValue &script_callback_language,
659  const std::map<std::string, std::string> &tags,
660  const std::map<HOM_EnumValue, std::string> &conditionals,
661  const std::vector<std::string> &default_expression,
662  const std::vector<HOM_EnumValue *> &default_expression_language) = 0;
663 
664  virtual HOM_ToggleParmTemplate *newToggleParmTemplate(
665  const char *name,
666  const char *label,
667  bool default_value,
668  const char *disable_when,
669  bool is_hidden,
670  bool is_label_hidden,
671  bool join_with_next,
672  const char *help,
673  const char *script_callback,
674  HOM_EnumValue &script_callback_language,
675  const std::map<std::string, std::string> &tags,
676  const std::map<HOM_EnumValue, std::string> &conditionals,
677  const std::string &default_expression,
678  const HOM_EnumValue &default_expression_language) = 0;
679 
680  virtual HOM_MenuParmTemplate *newMenuParmTemplate(
681  const char *name,
682  const char *label,
683  const std::vector<std::string> &menu_items,
684  const std::vector<std::string> &menu_labels,
685  int default_value,
686  const std::vector<std::string> &icon_names,
687  const std::string &item_generator_script,
688  HOM_EnumValue *item_generator_script_language,
689  HOM_EnumValue &menu_type,
690  bool menu_use_token,
691  const char *disable_when,
692  bool is_hidden,
693  bool is_label_hidden,
694  bool join_with_next,
695  const char *help,
696  const char *script_callback,
697  HOM_EnumValue &script_callback_language,
698  const std::map<std::string, std::string> &tags,
699  const std::map<HOM_EnumValue, std::string> &conditionals,
700  const std::string &default_expression,
701  const HOM_EnumValue &default_expression_language,
702  bool store_default_value_as_string,
703  bool is_button_strip,
704  bool strip_uses_icons
705  ) = 0;
706 
707  virtual HOM_ButtonParmTemplate *newButtonParmTemplate(
708  const char *name,
709  const char *label,
710  const char *disable_when,
711  bool is_hidden,
712  bool is_label_hidden,
713  bool join_with_next,
714  const char *help,
715  const char *script_callback,
716  HOM_EnumValue &script_callback_language,
717  const std::map<std::string, std::string> &tags,
718  const std::map<HOM_EnumValue, std::string> &conditionals ) = 0;
719 
720  virtual HOM_LabelParmTemplate *newLabelParmTemplate(
721  const char *name,
722  const char *label,
723  const std::vector<std::string> &column_labels,
724  bool is_hidden,
725  bool is_label_hidden,
726  bool join_with_next,
727  const char *help,
728  const std::map<std::string, std::string> &tags,
729  const std::map<HOM_EnumValue, std::string> &conditionals) = 0;
730 
731  virtual HOM_SeparatorParmTemplate *newSeparatorParmTemplate(
732  const char *name,
733  bool is_hidden,
734  const std::map<std::string, std::string> &tags,
735  const std::map<HOM_EnumValue, std::string> &conditionals) = 0;
736 
737  virtual HOM_FolderSetParmTemplate *newFolderSetParmTemplate(
738  const char *name,
739  const std::vector<std::string> &folder_names,
740  HOM_EnumValue &folder_type,
741  const std::map<std::string, std::string> &tags) = 0;
742 
743  virtual HOM_FolderParmTemplate *newFolderParmTemplate(
744  const char *name,
745  const char *label,
746  const std::vector<HOM_ParmTemplate *> &parm_templates,
747  HOM_EnumValue &folder_type,
748  int default_value,
749  bool is_hidden,
750  bool ends_tab_group,
751  const char *script_callback,
752  HOM_EnumValue &script_callback_language,
753  const std::map<std::string, std::string> &tags,
754  const std::map<HOM_EnumValue, std::string> &conditionals,
755  const std::map<HOM_EnumValue, std::string> &tab_conditionals) = 0;
756 
757  virtual HOM_RampParmTemplate *newRampParmTemplate(
758  const char *name,
759  const char *label,
760  HOM_EnumValue &ramp_parm_type,
761  int default_value,
762  HOM_EnumValue *default_basis,
763  bool show_controls,
764  HOM_EnumValue *color_type,
765  const char *disable_when,
766  bool is_hidden,
767  const char *help,
768  const char *script_callback,
769  HOM_EnumValue &script_callback_language,
770  const std::map<std::string, std::string> &tags,
771  const std::map<HOM_EnumValue, std::string> &conditionals,
772  const std::string &default_expression,
773  const HOM_EnumValue &default_expression_language) = 0;
774 
775  virtual HOM_ParmTemplateGroup *newParmTemplateGroup(
776  const std::vector<HOM_ParmTemplate *> &parm_templates) = 0;
777 
778  virtual HOM_PerfMonRecordOptions *newPerfMonRecordOptions(
779  bool cook_stats, bool solve_stats, bool draw_stats,
780  bool gpu_draw_stats, bool viewport_stats, bool script_stats,
781  bool render_stats, bool thread_stats, bool frame_stats,
782  bool memory_stats, bool errors, bool pane_stats) = 0;
783 
784 
785  virtual HOM_Keyframe *newKeyframe() = 0;
786  virtual HOM_Keyframe *newKeyframe(double value) = 0;
787  virtual HOM_Keyframe *newKeyframe(double value, double time) = 0;
788  virtual HOM_Keyframe *newKeyframe(const HOM_Keyframe &keyframe) = 0;
789 
790  virtual HOM_StringKeyframe *newStringKeyframe() = 0;
791  virtual HOM_StringKeyframe *newStringKeyframe(
792  const std::string &value, HOM_EnumValue &language) = 0;
793  virtual HOM_StringKeyframe *newStringKeyframe(
794  const std::string &value, double time, HOM_EnumValue &language) = 0;
795  virtual HOM_StringKeyframe *newStringKeyframe(
796  const HOM_StringKeyframe &string_keyframe) = 0;
797 
798  virtual HOM_HDAOptions *newHDAOptions() = 0;
799  virtual HOM_LopViewportLoadMasks *newLopViewportLoadMasks() = 0;
800  virtual HOM_LopInstanceIdRule *newLopInstanceIdRule() = 0;
801  virtual HOM_LopSelectionRule *newLopSelectionRule() = 0;
802 
803  virtual HOM_InterruptableOperation *newInterruptableOperation(
804  const char *operation_name, const char *long_operation_name,
805  bool open_interrupt_dialog) = 0;
806 
807  virtual HOM_RedrawBlock *newRedrawBlock() = 0;
808 #ifndef SWIG
809  virtual HOM_RedrawResumeBlock *newRedrawResumeBlock() = 0;
810 #endif
811 
812  virtual HOM_StyleSheet *newStyleSheet() = 0;
813  virtual HOM_StyleSheet *newStyleSheet(const char *json_text) = 0;
814 
815  virtual HOM_Selection *newSelection(HOM_EnumValue &selection_type,
816  HOM_Geometry *geo, const char *selection_string) = 0;
817  virtual HOM_Selection *newSelection(
818  const std::vector<HOM_EnumValue *> &selection_types,
819  HOM_Geometry *geo, const char *selection_string) = 0;
820  virtual HOM_Selection *newSelection(
821  const std::vector<HOM_Prim *> &prims) = 0;
822  virtual HOM_Selection *newSelection(
823  const std::vector<HOM_Point *> &points) = 0;
824  virtual HOM_Selection *newSelection(
825  const std::vector<HOM_Vertex *> &vertices) = 0;
826  virtual HOM_Selection *newSelection(
827  const std::vector<HOM_Edge *> &edges) = 0;
828 
829  // This method returns a new HOM_Geometry object.
830  virtual HOM_Geometry *newGeometry(HOM_Geometry *geo = nullptr,
831  bool clone_data_ids = false) = 0;
832 
833  virtual HOM_DopSimulation *newDopSimulation() = 0;
834 
835  virtual HOM_AgentDefinition *newAgentDefinition(
836  const HOM_AgentRig &rig, const HOM_AgentShapeLibrary &shapelib) = 0;
837 
838  virtual HOM_AgentClip *newAgentClip(
839  const char *name, const char *path, const HOM_AgentRig &rig,
840  bool keep_external_ref, bool delay_load) = 0;
841 
842  virtual HOM_AgentClip *newAgentClip(
843  const char *name, HOM_ChopNode &chop, const HOM_AgentRig &rig,
844  double frame) = 0;
845 
846  virtual HOM_AgentClip *newAgentClip(
847  const char *name, const HOM_AgentRig &rig, int sample_count) = 0;
848 
849  virtual HOM_AgentClip *newAgentClip(
850  const HOM_AgentClip &clip, const HOM_AgentRig &rig,
851  const char *name) = 0;
852 
853  virtual HOM_AgentRig *newAgentRig(const char *path, bool keep_external_ref) = 0;
854 
855  virtual HOM_AgentRig *newAgentRig(
856  const char *name, const std::vector<std::string> &transform_names,
857  const std::vector<std::vector<int>> &hierarchy) = 0;
858 
859  virtual HOM_AgentTransformGroup *newAgentTransformGroup(
860  const char *path, const HOM_AgentRig &rig,
861  bool keep_external_ref = true) = 0;
862 
863  virtual HOM_AgentTransformGroup *newAgentTransformGroup(
864  const char *name, const std::vector<int> &transforms,
865  const HOM_AgentRig &rig, const std::vector<double> &weights,
866  const std::vector<int> &channels) = 0;
867 
868  virtual HOM_AgentShapeLibrary *newAgentShapeLibrary() = 0;
869  virtual HOM_AgentShapeLibrary *newAgentShapeLibrary(
870  HOM_Geometry &geometry, const char *name) = 0;
871  virtual HOM_AgentShapeLibrary *newAgentShapeLibrary(
872  const char *path, bool keep_external_ref) = 0;
873 
874  virtual HOM_AgentShapeBinding *
875  newAgentShapeBinding(int transform, const HOM_AgentShape &shape,
876  bool deforming, double bounds_scale) = 0;
877 
878  virtual HOM_AgentShapeBinding *
879  newAgentShapeBinding(int transform, const HOM_AgentShape &shape,
880  const HOM_AgentShapeDeformer *deformer,
881  double bounds_scale) = 0;
882 
883  virtual HOM_AgentLayer *newAgentLayer(
884  const char *name, const HOM_AgentRig &rig,
885  const HOM_AgentShapeLibrary &shapelib,
886  const std::vector<HOM_AgentShapeBinding *> &shape_bindings,
887  const HOM_AgentLayer *source_layer = 0) = 0;
888 
889  virtual HOM_AgentLayer *
890  newAgentLayer(const char *path, const HOM_AgentRig &rig,
891  const HOM_AgentShapeLibrary &shapelib,
892  bool keep_external_ref = true) = 0;
893 
894  virtual bool compareNode(const char *path, const char *dest = NULL) = 0;
895  virtual bool compareNodeBackup(const char *path, int index,
896  const char *dest = NULL) = 0;
897  virtual bool compareHDA(const char *path_left, const char *path_right,
898  const char *dest = NULL) = 0;
899  virtual bool compareHDABackup(const char *path, int index,
900  const char *dest = NULL) = 0;
901  virtual bool compareHip(const char *dest = NULL) = 0;
902  virtual bool compareHipBackup(int index, const char *dest = NULL) = 0;
903 
904  virtual bool hasContextOption(const char *opt) = 0;
905  virtual UT_OptionEntryPtr contextOption(const char *opt) = 0;
906  virtual std::vector<std::string> contextOptionNames() = 0;
907  virtual void setContextOption(const char *opt, const char *value) =0;
908  virtual void setContextOption(const char *opt, double value) = 0;
909  virtual void removeContextOption(const char *opt) = 0;
910  virtual std::string contextOptionConfig(const char *opt) = 0;
911  virtual void setContextOptionConfig(const char *opt,
912  const char *config) = 0;
913 
914  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
915 
916  // This method is called when orbolt_url runs. It is not wrapped by swig.
917  virtual void setOrboltURLHandler(
918  STORUI_OrboltURLHandler &orbolt_url_handler) = 0;
919 
920  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
921 
922  // These methods are used to help debug HOM to make sure no objects
923  // get allocated that don't get deallocated.
924  virtual void constructObject(void *pointer, const std::type_info &type) = 0;
925  virtual void destructObject(void *pointer, const std::type_info &type) = 0;
926  virtual std::map<std::string, int> objectCounts() = 0;
927 
928  // Preferences
929  virtual std::vector<std::string> getPreferenceNames() = 0;
930  virtual std::string getPreference(const char *name) = 0;
931  virtual bool setPreference(const char *name, const char* value) = 0;
932 
933  virtual HOM_ViewerStateTemplate * newViewerStateTemplate(
934  std::string const & type_name,
935  std::string const & label,
936  HOM_NodeTypeCategory const & category,
937  std::vector<HOM_NodeTypeCategory*> const & contexts) = 0;
938 
939  virtual HOM_ViewerStateMenu * newViewerStateMenu(std::string const & handle, std::string const & label) = 0;
940 
941  virtual HOM_SimpleDrawable * newSimpleDrawable( HOM_SceneViewer& scene_viewer, HOM_EnumValue const &prim_type, std::string const &name ) = 0;
942  virtual HOM_SimpleDrawable * newSimpleDrawable( HOM_SceneViewer& scene_viewer, HOM_Geometry const &geometry, std::string const &name ) = 0;
943 
944  virtual HOM_UIEvent * newUIEvent( int64 val ) = 0;
945  virtual HOM_ViewerEvent * newViewerEvent( HOM_SceneViewer& sceneViewer, int64 val ) = 0;
946  virtual HOM_UIEventDevice * newUIEventDevice(int64 val, int64 val2) = 0;
947 
948  virtual HOM_Handle * newHandle(HOM_SceneViewer& scene_viewer, std::string const &name ) = 0;
949 
950  virtual HOM_TextDrawable * newTextDrawable(
951  HOM_SceneViewer& scene_viewer,
952  std::string const & name,
953  std::map<std::string, hboost::any> const & params) = 0;
954 
955  virtual HOM_GeometryDrawable * newGeometryDrawable(
956  HOM_SceneViewer& scene_viewer,
957  HOM_EnumValue const & geo_type,
958  std::string const & name,
959  HOM_Geometry * geometry,
960  std::map<std::string, hboost::any> const & params) = 0;
961 
962  virtual HOM_GeometryDrawableGroup* newGeometryDrawableGroup(std::string const & name ) = 0;
963 
964  virtual void startHoudiniEngineDebugger(unsigned short port) = 0;
965  virtual void startHoudiniEngineDebugger(const char *pipe_name) = 0;
966 
967  virtual HOM_GeometrySelection * newGeometrySelection() = 0;
968  virtual HOM_GeometrySelection * newGeometrySelection(int64 val) = 0;
969 
970  virtual HOM_BinaryString convertClipData(HOM_BinaryString data,
971  bool from_binary,
972  bool from_blosc_compression,
973  bool to_binary,
974  bool to_blosc_compression) = 0;
975 
976  virtual HOM_BinaryString convertKeyframesToClipData(
977  const std::map<std::string, std::vector<HOM_Keyframe *>> &keyframe_map,
978  bool binary = true, bool use_blosc_compression = true) = 0;
979 
980  virtual std::string _clipInfo(HOM_BinaryString data, bool binary = true,
981  bool blosc_compressed = true) = 0;
982 
983  virtual std::vector<HOM_ElemPtr<HOM_Node> > _nodesFromOPNodeList(int64 val) = 0;
984  virtual std::vector<HOM_ElemPtr<HOM_DopData> >
985  _dopDataList(int64 val) = 0;
986  virtual std::vector<std::pair<HOM_ElemPtr<HOM_DopData>, HOM_ElemPtr<HOM_GeometrySelection> > >
987  _dopDataPointList(int64 val) = 0;
988  virtual std::vector<std::pair<HOM_ElemPtr<HOM_DopData>, HOM_ElemPtr<HOM_GeometrySelection> > >
989  _dopDataPolyList(int64 val) = 0;
990 
991  virtual HOM_AttribDataId * newAttribDataId() = 0;
992 
993  virtual std::string userName(bool alpha=true) = 0;
994 
995  virtual std::string machineName(bool alpha=true) = 0;
996 
997 private:
998  // HOMF_Module::createHOMModule() uses this to create the HOM_Module.
999  static void (*theHOMCreator)();
1000 
1001  // A subclass of HOM_Module in the HOMF library will define the
1002  // implementation of HOM. Importing the python module will set the
1003  // implementation, so this function should only be called by HOMF_Module::
1004  // createHOMModule().
1005  friend class HOMF_Module;
1006  static void setImplementation(HOM_Module* implementation);
1007 
1008  // We could add a static method to access the implementation, but we
1009  // want to make it easy to access the HOM module from C++. So, the
1010  // global function HOM() needs access to the implementation.
1011  friend HOM_API HOM_Module& HOM();
1012  static HOM_Module *theImplementation;
1013 };
1014 
1015 
1016 // Use this function to automatically delete objects for functions that
1017 // return new objects. This lets you, for example, write code like
1018 // HOMdel(HOM().findNode("/obj/geo1"))->setName("geo2")
1019 template <typename T>
1021 { return UT_UniquePtr<T>(hom_object); }
1022 
1023 
1024 // This lock is used to synchronize HOM scripts running in a separate
1025 // thread and Houdini. Houdini's UI queue will give up the lock when it's
1026 // waiting for events and reacquire it when it handles an event.
1027 //
1028 // Note that this lock allows multiple threads in the same thread group to hold
1029 // it at the same time. By default, a thread started from Houdini is added to
1030 // the group containing the main thread. This way, since Houdini started the
1031 // thread, we can be confident that it will use other locks to synchronize
1032 // access to Houdini. This approach allows, for example, a volume SOP to
1033 // cook using multiple threads, evaluating Python in each thread while the
1034 // main thread holds the HOM lock, without deadlocking and without allowing
1035 // non-Houdini threads to acquire the HOM lock. (Note that the GIL will
1036 // synchronize access to Python's internals.)
1039 {
1040  // This is not thread-safe but should be ok because HOMgetLock() is called
1041  // pretty early on during startup when there is only one thread executing.
1042  if (!HOM_theHOMLock)
1044 
1046  return *HOM_theHOMLock;
1047 }
1048 
1049 // The HOM implementation uses the HOM_AutoLock to make sure Houdini isn't busy
1050 // when they make calls into the Houdini libraries. Note that constructing
1051 // a HOM_AutoLock will release the python global interpreter lock (GIL) if
1052 // it was held before acquiring the HOM lock. This way, other python threads
1053 // can run if it needs to block waiting for the HOM lock.
1055 {
1056 public:
1058  {
1059  if (!HOMgetLock().hasLock())
1060  {
1061  HOMgetLock().lock();
1062  myLocked = true;
1063  }
1064  else
1065  myLocked = false;
1066  }
1067 
1069  {
1070  if (myLocked)
1071  HOMgetLock().unlock();
1072  }
1073 
1074 private:
1075 
1076  // It is important that we release the python global interpreter lock
1077  // (GIL) for the duration of waiting for, acquiring and holding onto
1078  // the HOM lock. This gives other threads that are either blocked
1079  // on the GIL or that will try to acquire the GIL a chance to continue
1080  // execution.
1081  //
1082  // If the current thread needs to access the Python API,
1083  // then it should explicitly acquire the GIL by creating a
1084  // PY_InterpreterAutoLock object. The PY_InterpreterAutoLock must be
1085  // constructed *after* the HOM_AutoLock or it will have no effect.
1086  //
1087  // This prevents deadlocks that occur when the current thread
1088  // spawns other threads which access the Python API and try to
1089  // acquire the GIL.
1090  //
1091  // Note that we will reacquire the GIL when the HOM auto lock is destructed.
1092  PY_InterpreterAutoUnlock myPyInterpAutoUnlock;
1093 
1094  // Boolean to determine if the auto lock actually locked the HOM lock.
1095  bool myLocked;
1096 };
1097 
1098 // The HOM implementation uses HOM_AutoUnlock to allow the main thread to
1099 // run while waiting for something to happen. Constructing a HOM_AutoUnlock
1100 // instance will release the HOM lock but not the Python GIL. When it's
1101 // destructed it will reacquire the HOM lock. Since it releases the HOM lock,
1102 // it's important that a HOM_AutoLock was already created in a containing
1103 // scope.
1104 //
1105 // Use HOM_AutoUnlock in conjunction with PY_InterpreterAutoUnlock to
1106 // also release the Python GIL. Be sure to create the HOM_AutoUnlock *after*
1107 // the PY_InterpreterAutoUnlock, so that when the auto locks are destructed
1108 // the HOM lock is reacquired before the Python GIL. Otherwise, it will grab
1109 // the GIL and then try to grab the HOM lock, and if another thread with the
1110 // HOM lock tries to run Python we'll end up with deadlock.
1112 {
1113 public:
1115  { HOMgetLock().unlock(); }
1116 
1118  { HOMgetLock().lock(); }
1119 };
1120 
1121 
1122 // These macros are used to help detect memory leaks when debugging is enabled.
1123 #ifdef HOM_DEBUG
1124 #define HOM_CONSTRUCT_OBJECT(pointer) \
1125  HOM().constructObject(pointer, typeid(*pointer));
1126 #define HOM_DESTRUCT_OBJECT(pointer) \
1127  HOM().destructObject(pointer, typeid(*pointer));
1128 #else
1129 #define HOM_CONSTRUCT_OBJECT(pointer)
1130 #define HOM_DESTRUCT_OBJECT(pointer)
1131 #endif
1132 
1133 // gcc gets a parse error if we try to give a default map value in the
1134 // signature, and the typedef avoids the error.
1135 typedef std::map<std::string, std::string> HOM_StdMapStringString;
1136 typedef std::map<HOM_EnumValue, std::string> HOM_StdMapEnumString;
1137 
1138 
1139 // Houdini will call HOMextendLibrary() in HDK dso's so the user can install
1140 // C++ HOM extensions.
1141 extern "C" {
1143 }
1144 
1145 #endif //__HOM_Module_h__
GLbyte * weights
Definition: glew.h:7551
vint4 max(const vint4 &a, const vint4 &b)
Definition: simd.h:4703
OIIO_API string_view getenv(string_view name)
GLuint const GLchar * name
Definition: glew.h:1814
GLclampf GLclampf GLclampf alpha
Definition: glew.h:1520
GLenum mode
Definition: glew.h:2163
#define SYS_VISIBILITY_EXPORT
UT_TaskRootLock & HOMgetLock()
Definition: HOM_Module.h:1038
GLint GLint GLint GLint GLint GLint GLsizei width
Definition: glew.h:1252
GLuint GLenum GLenum transform
Definition: glew.h:14742
GT_API const UT_StringHolder time
GLuint index
Definition: glew.h:1814
GLuint const GLfloat * val
Definition: glew.h:2794
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
Definition: glew.h:1252
UT_UniquePtr< T > HOMdel(T *hom_object)
Definition: HOM_Module.h:1020
GLsizei GLsizei GLchar * source
Definition: glew.h:1832
Definition: HOM_qt.h:19
GLenum condition
Definition: glew.h:12785
long long int64
Definition: SYS_Types.h:111
UT_TaskLockT< false > UT_TaskRootLock
Definition: UT_TaskLock.h:281
HOM_API UT_TaskRootLock * HOM_theHOMLock
bool any(const vbool4 &v)
Definition: simd.h:3372
#define HOM_API
Definition: HOM_API.h:13
GLint GLint GLint GLint GLint x
Definition: glew.h:1252
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1252
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
virtual ~HOM_Module()
Definition: HOM_Module.h:158
const GLuint GLenum const void * binary
Definition: glew.h:3502
GLubyte GLubyte GLubyte GLubyte w
Definition: glew.h:1890
Definition: HOM_ui.h:42
void
Definition: png.h:1083
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
GLfloat GLfloat GLfloat GLfloat h
Definition: glew.h:8011
GLuint color
Definition: glew.h:7902
GLuint GLuint GLsizei GLenum type
Definition: glew.h:1253
std::map< HOM_EnumValue, std::string > HOM_StdMapEnumString
Definition: HOM_Module.h:1136
GLuint GLsizei GLsizei GLchar * label
Definition: glew.h:8986
GLsizei const GLchar *const * path
Definition: glew.h:6461
GLsizei const GLchar *const * string
Definition: glew.h:1844
double fpreal
Definition: SYS_Types.h:276
SYS_VISIBILITY_EXPORT void HOMextendLibrary()
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER T clip(const T &p, const Box< T > &box)
Definition: ImathBoxAlgo.h:89
std::string OIIO_API repeat(string_view str, int n)
Repeat a string formed by concatenating str n times.
GLenum GLsizei const GLuint GLboolean enabled
Definition: glew.h:2579
GLsizei const void * pointer
Definition: glew.h:1523
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:47
GLuint GLdouble GLdouble GLint GLint const GLdouble * points
Definition: glew.h:3446
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.
const GLfloat * params
Definition: glew.h:1531
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
SYS_VISIBILITY_EXPORT void newHandle(BM_ResourceManager *m)
void unlock()
Definition: UT_TaskLock.h:253
Quat< T > spline(const Quat< T > &q0, const Quat< T > &q1, const Quat< T > &q2, const Quat< T > &q3, T t)
Definition: ImathQuat.h:545
GLubyte * pattern
Definition: glew.h:5711
vint4 min(const vint4 &a, const vint4 &b)
Definition: simd.h:4694
HOM_API HOM_Module & HOM()
GLenum GLint GLint * precision
Definition: glew.h:3500
GLsizei const GLfloat * value
Definition: glew.h:1849
static bool isImplementationSet()
Definition: HOM_Module.h:470
std::map< std::string, std::string > HOM_StdMapStringString
Definition: HOM_Module.h:1135
GLfloat units
Definition: glew.h:10289
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)
GLenum const void * paths
Definition: glew.h:13589