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