HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_Defines.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  */
8 
9 #ifndef __HOM_Defines_h__
10 #define __HOM_Defines_h__
11 
12 #include <UT/UT_Assert.h>
13 
14 // Unfortunately, we can't compare against UT_ASSERT_LEVEL_PARANOID here,
15 // otherwise the comparison sometimes succeeds under swig when it shouldn't.
16 // So, we instead compare against the numeric value itself.
17 #if UT_ASSERT_LEVEL >= 2
18 #define HOM_DEBUG
19 #endif
20 
21 #ifdef SWIG
22 #define SWIGOUT(x) x
23 #else
24 #define SWIGOUT(x)
25 #endif
26 
27 #if defined(SWIG) && defined(SWIGPYTHON)
28 #define SWIGPYTHONOUT(x) x
29 #else
30 #define SWIGPYTHONOUT(x)
31 #endif
32 
33 // Define a synonym for hboost::any to customize a typemap for arguments that
34 // are to hold values to be inserted into a UT_Options object. SWIG allows
35 // typemaps to be defined for each typename independently.
36 #include <hboost/any.hpp>
38 
39 // Define a synonym for hboost::any to customize a typemap for arguments that
40 // are to return drag-n-drop source data. SWIG allows typemaps to be defined
41 // for each typename independently.
43 
44 // The following define should go in SYS_Math.h when we are ready to
45 // add equivalent defines for MAX_DOUBLE, MAX_INT, MIN_INT etc.
46 #define HOM_MIN_NEGATIVE_DOUBLE -1 * std::numeric_limits<double>::max()
47 
48 #ifdef SWIG
49 
50 //----------------------------------------------------------------------------
51 
52 // Since there's no way for a C++ function to have varying return types,
53 // we need to add special methods and functions that are only known
54 // to swig. For python, there's a typemap for PyObject* so that when
55 // swig encounters a function returning that type it won't try to wrap
56 // the return value, and will instead send it directly to the interpreter.
57 // We create a typemap for this type so our code can use it instead of
58 // PyObject* directly so it's easier to use more than just python in the
59 // future.
60 
61 // The swig code we output directly to the swig wrapper below (using %{%})
62 // uses InterpreterObject, so we need to say what it is.
63 %{
64 #ifdef SWIGPYTHON
65 typedef PyObject *InterpreterObject;
66 
67 PyObject *HOMincRef(PyObject *object)
68 {
69  if (!object)
70  object = Py_None;
71  Py_INCREF(object);
72  return object;
73 }
74 #endif
75 %}
76 
77 // We need to tell swig what InterpreterObject is so it applies the PyObject*
78 // typemap properly.
79 typedef PyObject *InterpreterObject;
80 
81 //----------------------------------------------------------------------------
82 
83 %{
84 
85 #include <UT/UT_StdUtil.h>
86 #include <HOM/HOM_ErrorUtil.h>
87 
88 // These helper functions convert from C++ objects to corresponding
89 // interpreter objects (PyObject*'s in python). They're roughly the same
90 // as swig::from(), but swig::from() does a slow lookup on the name of the
91 // type. These functions know the type at compile-time so they're faster.
92 // Unfortunately, we need to explicitly specialize all the types supported by
93 // the functions. Specifically, since HOM_IterableList calls these functions,
94 // objects that can be inside HOM_IterableList need to be specialized below.
95 
96 // The general case is left unimplemented so we get compiler errors if
97 // we call the function with an unspecialized type.
98 template <typename T> InterpreterObject
99 HOMconvertValueForInterpreter(const T &value, int own);
100 
101 // These functions specialize the native data types.
102 template <> InterpreterObject
103 HOMconvertValueForInterpreter<int>(const int& value, int /*own*/)
104 { return SWIG_From_int(value); }
105 
106 template <> InterpreterObject
107 HOMconvertValueForInterpreter<float>(const float& value, int /*own*/)
108 { return SWIG_From_float(value); }
109 
110 template <> InterpreterObject
111 HOMconvertValueForInterpreter<double>(const double& value, int /*own*/)
112 { return SWIG_From_double(value); }
113 
114 template <> InterpreterObject
115 HOMconvertValueForInterpreter<std::string>(
116  const std::string& value, int /*own*/)
117 { return SWIG_From_std_string(value); }
118 
119 // These functions specialize base classes to return interpreter instances
120 // of the proper subclass.
121 template <> InterpreterObject
122 HOMconvertValueForInterpreter<HOM_Node*>(HOM_Node *const &node, int own)
123 {
124  OP_OpTypeId optypeid;
125  HOM_NodeType *nodetype = nullptr;
126  bool isnetwork = false;
127 
128  if (!node)
129  return SWIG_NewPointerObj(node, SWIGTYPE_p_HOM_Node, own);
130 
131  optypeid = (OP_OpTypeId)node->opTypeIdAsInt();
132  switch (optypeid)
133  {
134  case OBJ_OPTYPE_ID:
135  // Because of multiple inheritance, it's extremely important that
136  // we explicitly cast the pointer to a HOM_ObjNode so we
137  // pass the right address to SWIG_NewPointerObject, since it takes
138  // a void*.
139  return SWIG_NewPointerObj(
140  (void*)dynamic_cast<const HOM_ObjNode* const>(node),
141  SWIGTYPE_p_HOM_ObjNode, own);
142 
143  case SOP_OPTYPE_ID:
144  // Because of multiple inheritance, it's extremely important that
145  // we explicitly cast the pointer to a HOM_SopNode so we
146  // pass the right address to SWIG_NewPointerObject, since it takes
147  // a void*.
148  return SWIG_NewPointerObj(
149  (void*)dynamic_cast<const HOM_SopNode* const>(node),
150  SWIGTYPE_p_HOM_SopNode, own);
151 
152  case CHOP_OPTYPE_ID:
153  // Because of multiple inheritance, it's extremely important that
154  // we explicitly cast the pointer to a HOM_ChopNode so we
155  // pass the right address to SWIG_NewPointerObject, since it takes
156  // a void*.
157  return SWIG_NewPointerObj(
158  (void*)dynamic_cast<const HOM_ChopNode* const>(node),
159  SWIGTYPE_p_HOM_ChopNode, own);
160 
161  case COP2_OPTYPE_ID:
162  // Because of multiple inheritance, it's extremely important that
163  // we explicitly cast the pointer to a HOM_CopNode so we
164  // pass the right address to SWIG_NewPointerObject, since it takes
165  // a void*.
166  return SWIG_NewPointerObj(
167  (void*)dynamic_cast<const HOM_CopNode* const>(node),
168  SWIGTYPE_p_HOM_CopNode, own);
169 
170  case DOP_OPTYPE_ID:
171  // Because of multiple inheritance, it's extremely important that
172  // we explicitly cast the pointer to a HOM_DopNode so we
173  // pass the right address to SWIG_NewPointerObject, since it takes
174  // a void*.
175  return SWIG_NewPointerObj(
176  (void*)dynamic_cast<const HOM_DopNode* const>(node),
177  SWIGTYPE_p_HOM_DopNode, own);
178 
179  case SHOP_OPTYPE_ID:
180  // Because of multiple inheritance, it's extremely important that
181  // we explicitly cast the pointer to a HOM_ShopNode so we
182  // pass the right address to SWIG_NewPointerObject, since it takes
183  // a void*.
184  return SWIG_NewPointerObj(
185  (void*)dynamic_cast<const HOM_ShopNode* const>(node),
186  SWIGTYPE_p_HOM_ShopNode, own);
187 
188  case VOPNET_OPTYPE_ID:
189  // Because of multiple inheritance, it's extremely important that
190  // we explicitly cast the pointer to a HOM_VopNetNode so we
191  // pass the right address to SWIG_NewPointerObject, since it takes
192  // a void*.
193  return SWIG_NewPointerObj(
194  (void*)dynamic_cast<const HOM_VopNetNode* const>(node),
195  SWIGTYPE_p_HOM_VopNetNode, own);
196 
197  case ROP_OPTYPE_ID:
198  // Because of multiple inheritance, it's extremely important that
199  // we explicitly cast the pointer to a HOM_RopNode so we
200  // pass the right address to SWIG_NewPointerObject, since it takes
201  // a void*.
202  return SWIG_NewPointerObj(
203  (void*)dynamic_cast<const HOM_RopNode* const>(node),
204  SWIGTYPE_p_HOM_RopNode, own);
205 
206  case VOP_OPTYPE_ID:
207  // Because of multiple inheritance, it's extremely important that
208  // we explicitly cast the pointer to a HOM_VopNode so we
209  // pass the right address to SWIG_NewPointerObject, since it takes
210  // a void*.
211  return SWIG_NewPointerObj(
212  (void*)dynamic_cast<const HOM_VopNode* const>(node),
213  SWIGTYPE_p_HOM_VopNode, own);
214 
215  case TOP_OPTYPE_ID:
216  // Because of multiple inheritance, it's extremely important that
217  // we explicitly cast the pointer to a HOM_TopNode so we
218  // pass the right address to SWIG_NewPointerObject, since it takes
219  // a void*.
220  return SWIG_NewPointerObj(
221  (void*)dynamic_cast<const HOM_TopNode* const>(node),
222  SWIGTYPE_p_HOM_TopNode, own);
223 
224  case LOP_OPTYPE_ID:
225  // Because of multiple inheritance, it's extremely important that
226  // we explicitly cast the pointer to a HOM_LopNode so we
227  // pass the right address to SWIG_NewPointerObject, since it takes
228  // a void*.
229  //
230  // Special test for LOP Network management nodes, since LOP_Networks
231  // have their own HOM data type.
232  nodetype = node->type();
233  isnetwork = (nodetype && nodetype->isManager(true));
234  delete nodetype;
235  if (isnetwork)
236  return SWIG_NewPointerObj(
237  (void*)dynamic_cast<const HOM_LopNetwork* const>(node),
238  SWIGTYPE_p_HOM_LopNetwork, own);
239  else
240  return SWIG_NewPointerObj(
241  (void*)dynamic_cast<const HOM_LopNode* const>(node),
242  SWIGTYPE_p_HOM_LopNode, own);
243 
244  case MGR_OPTYPE_ID:
245  // Special case for the /stage manager node, which is actually a
246  // LOP_Network, and therefore a LOP_Node.
247  if (HOM().lopNodeTypeCategory() == node->childTypeCategory())
248  return SWIG_NewPointerObj(
249  (void*)dynamic_cast<const HOM_LopNetwork* const>(node),
250  SWIGTYPE_p_HOM_LopNetwork, own);
251 
252  default:
253  break;
254  };
255 
256  return SWIG_NewPointerObj(node, SWIGTYPE_p_HOM_Node, own);
257 }
258 
259 template <> InterpreterObject
260 HOMconvertValueForInterpreter<HOM_NodeType*>(
261  HOM_NodeType *const &nodetype, int own)
262 {
263  OP_OpTypeId optypeid;
264 
265  if (!nodetype)
266  return SWIG_NewPointerObj(nodetype, SWIGTYPE_p_HOM_NodeType, own);
267 
268  if( !nodetype->managerFlag() )
269  {
270  optypeid = (OP_OpTypeId)nodetype->opTypeIdAsInt();
271  switch (optypeid)
272  {
273  case SOP_OPTYPE_ID:
274  // Because of multiple inheritance, it's extremely important that
275  // we explicitly cast the pointer to a HOM_SopNodeType so we
276  // pass the right address to SWIG_NewPointerObject, since it takes
277  // a void*.
278  return SWIG_NewPointerObj(
279  (void*)dynamic_cast<const HOM_SopNodeType* const>(nodetype),
280  SWIGTYPE_p_HOM_SopNodeType, own);
281 
282  case SHOP_OPTYPE_ID:
283  // Because of multiple inheritance, it's extremely important that
284  // we explicitly cast the pointer to a HOM_ShopNodeType so we
285  // pass the right address to SWIG_NewPointerObject, since it takes
286  // a void*.
287  return SWIG_NewPointerObj(
288  (void*)dynamic_cast<const HOM_ShopNodeType* const>(nodetype),
289  SWIGTYPE_p_HOM_ShopNodeType, own);
290 
291  case VOP_OPTYPE_ID:
292  // Because of multiple inheritance, it's extremely important that
293  // we explicitly cast the pointer to a HOM_VopNodeType so we
294  // pass the right address to SWIG_NewPointerObject, since it takes
295  // a void*.
296  return SWIG_NewPointerObj(
297  (void*)dynamic_cast<const HOM_VopNodeType* const>(nodetype),
298  SWIGTYPE_p_HOM_VopNodeType, own);
299  default:
300  break;
301  }
302  }
303 
304  return SWIG_NewPointerObj(nodetype, SWIGTYPE_p_HOM_NodeType, own);
305 }
306 
307 template <> InterpreterObject
308 HOMconvertValueForInterpreter<HOM_BaseKeyframe*>(
309  HOM_BaseKeyframe *const &keyframe, int own)
310 {
311  if (!keyframe)
312  return SWIG_NewPointerObj(keyframe, SWIGTYPE_p_HOM_BaseKeyframe, own);
313 
314  if (keyframe->evaluatedType() == HOM_parmData::Float)
315  {
316  // Because of multiple inheritance, it's extremely important that
317  // we explicitly cast the pointer to a HOM_Keyframe so we
318  // pass the right address to SWIG_NewPointerObject, since it takes
319  // a void*.
320  return SWIG_NewPointerObj(
321  (void*)dynamic_cast<const HOM_Keyframe* const>(keyframe),
322  SWIGTYPE_p_HOM_Keyframe, own);
323  }
324  else if (keyframe->evaluatedType() == HOM_parmData::String)
325  {
326  // Because of multiple inheritance, it's extremely important that
327  // we explicitly cast the pointer to a HOM_Keyframe so we
328  // pass the right address to SWIG_NewPointerObject, since it takes
329  // a void*.
330  return SWIG_NewPointerObj(
331  (void*)dynamic_cast<const HOM_StringKeyframe* const>(keyframe),
332  SWIGTYPE_p_HOM_StringKeyframe, own);
333  }
334 
335  return SWIG_NewPointerObj(keyframe, SWIGTYPE_p_HOM_BaseKeyframe, own);
336 }
337 
338 template <> InterpreterObject
339 HOMconvertValueForInterpreter<HOM_PackedPrim*>(HOM_PackedPrim *const &prim, int own)
340 {
341  if (!prim)
342  return SWIG_NewPointerObj(prim, SWIGTYPE_p_HOM_PackedPrim, own);
343 
344  // Because of multiple inheritance, it's extremely important that
345  // we explicitly cast the pointer to the right HOM type so we
346  // pass the right address to SWIG_NewPointerObject, since it takes
347  // a void*.
348 
349  switch (prim->type().id())
350  {
351  case HOM_primType::Agent_Id:
352  return SWIG_NewPointerObj(
353  (void *)dynamic_cast<const HOM_Agent *const>(prim),
354  SWIGTYPE_p_HOM_Agent, own);
355 
356  case HOM_primType::PackedFragment_Id:
357  return SWIG_NewPointerObj(
358  (void *)dynamic_cast<const HOM_PackedFragment *const>(prim),
359  SWIGTYPE_p_HOM_PackedFragment, own);
360 
361  case HOM_primType::PackedGeometry_Id:
362  return SWIG_NewPointerObj(
363  (void *)dynamic_cast<const HOM_PackedGeometry *const>(prim),
364  SWIGTYPE_p_HOM_PackedGeometry, own);
365  }
366 
367  return SWIG_NewPointerObj(
368  (void *)dynamic_cast<const HOM_PackedPrim *const>(prim),
369  SWIGTYPE_p_HOM_PackedPrim, own);
370 }
371 
372 template <> InterpreterObject
373 HOMconvertValueForInterpreter<HOM_Prim*>(HOM_Prim *const &prim, int own)
374 {
375  if (!prim)
376  return SWIG_NewPointerObj(prim, SWIGTYPE_p_HOM_Prim, own);
377 
378  // Because of multiple inheritance, it's extremely important that
379  // we explicitly cast the pointer to the right HOM type so we
380  // pass the right address to SWIG_NewPointerObject, since it takes
381  // a void*.
382  HOM_PackedPrim * packed = dynamic_cast<HOM_PackedPrim *>(prim);
383  if(packed)
384  return HOMconvertValueForInterpreter(packed, own);
385 
386  switch (prim->type().id())
387  {
388  case HOM_primType::Polygon_Id:
389  return SWIG_NewPointerObj(
390  (void*)dynamic_cast<const HOM_Polygon* const>(prim),
391  SWIGTYPE_p_HOM_Polygon, own);
392 
393  case HOM_primType::NURBSCurve_Id:
394  case HOM_primType::BezierCurve_Id:
395  return SWIG_NewPointerObj(
396  (void*)dynamic_cast<const HOM_Face* const>(prim),
397  SWIGTYPE_p_HOM_Face, own);
398 
399  case HOM_primType::Mesh_Id:
400  case HOM_primType::NURBSSurface_Id:
401  case HOM_primType::BezierSurface_Id:
402  return SWIG_NewPointerObj(
403  (void*)dynamic_cast<const HOM_Surface* const>(prim),
404  SWIGTYPE_p_HOM_Surface, own);
405 
406  case HOM_primType::Circle_Id:
407  case HOM_primType::Sphere_Id:
408  case HOM_primType::Tube_Id:
409  return SWIG_NewPointerObj(
410  (void*)dynamic_cast<const HOM_Quadric* const>(prim),
411  SWIGTYPE_p_HOM_Quadric, own);
412 
413  case HOM_primType::Volume_Id:
414  return SWIG_NewPointerObj(
415  (void*)dynamic_cast<const HOM_Volume* const>(prim),
416  SWIGTYPE_p_HOM_Volume, own);
417 
418  case HOM_primType::VDB_Id:
419  return SWIG_NewPointerObj(
420  (void*)dynamic_cast<const HOM_VDB* const>(prim),
421  SWIGTYPE_p_HOM_VDB, own);
422 
423  // TODO: Support more primitive types.
424  }
425 
426  return SWIG_NewPointerObj(prim, SWIGTYPE_p_HOM_Prim, own);
427 }
428 
429 template <> InterpreterObject
430 HOMconvertValueForInterpreter<HOM_ParmTemplate*>(
431  HOM_ParmTemplate *const &parm_template, int own)
432 {
433  if (!parm_template)
434  return SWIG_NewPointerObj(
435  parm_template, SWIGTYPE_p_HOM_ParmTemplate, own);
436 
437  // Because of multiple inheritance, it's extremely important that we
438  // explicitly cast to a pointer to the subclass so we pass the right
439  // address to SWIG_NewPointerObject, since it takes a void*.
440  switch (parm_template->type().id())
441  {
442  case HOM_parmTemplateType::Int_Id:
443  return SWIG_NewPointerObj(
444  (void*)dynamic_cast<const HOM_IntParmTemplate* const>(
445  parm_template),
446  SWIGTYPE_p_HOM_IntParmTemplate, own);
447 
448  case HOM_parmTemplateType::Float_Id:
449  return SWIG_NewPointerObj(
450  (void*)dynamic_cast<const HOM_FloatParmTemplate* const>(
451  parm_template),
452  SWIGTYPE_p_HOM_FloatParmTemplate, own);
453 
454  case HOM_parmTemplateType::String_Id:
455  return SWIG_NewPointerObj(
456  (void*)dynamic_cast<const HOM_StringParmTemplate* const>(
457  parm_template),
458  SWIGTYPE_p_HOM_StringParmTemplate, own);
459 
460  case HOM_parmTemplateType::Data_Id:
461  return SWIG_NewPointerObj(
462  (void*)dynamic_cast<const HOM_DataParmTemplate* const>(
463  parm_template),
464  SWIGTYPE_p_HOM_DataParmTemplate, own);
465 
466  case HOM_parmTemplateType::Toggle_Id:
467  return SWIG_NewPointerObj(
468  (void*)dynamic_cast<const HOM_ToggleParmTemplate* const>(
469  parm_template),
470  SWIGTYPE_p_HOM_ToggleParmTemplate, own);
471 
472  case HOM_parmTemplateType::Menu_Id:
473  return SWIG_NewPointerObj(
474  (void*)dynamic_cast<const HOM_MenuParmTemplate* const>(
475  parm_template),
476  SWIGTYPE_p_HOM_MenuParmTemplate, own);
477 
478  case HOM_parmTemplateType::Button_Id:
479  return SWIG_NewPointerObj(
480  (void*)dynamic_cast<const HOM_ButtonParmTemplate* const>(
481  parm_template),
482  SWIGTYPE_p_HOM_ButtonParmTemplate, own);
483 
484  case HOM_parmTemplateType::Label_Id:
485  return SWIG_NewPointerObj(
486  (void*)dynamic_cast<const HOM_LabelParmTemplate* const>(
487  parm_template),
488  SWIGTYPE_p_HOM_LabelParmTemplate, own);
489 
490  case HOM_parmTemplateType::Separator_Id:
491  return SWIG_NewPointerObj(
492  (void*)dynamic_cast<const HOM_SeparatorParmTemplate* const>(
493  parm_template),
494  SWIGTYPE_p_HOM_SeparatorParmTemplate, own);
495 
496  case HOM_parmTemplateType::FolderSet_Id:
497  return SWIG_NewPointerObj(
498  (void*)dynamic_cast<const HOM_FolderSetParmTemplate* const>(
499  parm_template),
500  SWIGTYPE_p_HOM_FolderSetParmTemplate, own);
501 
502  case HOM_parmTemplateType::Folder_Id:
503  return SWIG_NewPointerObj(
504  (void*)dynamic_cast<const HOM_FolderParmTemplate* const>(
505  parm_template),
506  SWIGTYPE_p_HOM_FolderParmTemplate, own);
507 
508  case HOM_parmTemplateType::Ramp_Id:
509  return SWIG_NewPointerObj(
510  (void*)dynamic_cast<const HOM_RampParmTemplate* const>(
511  parm_template),
512  SWIGTYPE_p_HOM_RampParmTemplate, own);
513  };
514 
515  UT_ASSERT(!"Unknown parm template type");
516  return SWIG_NewPointerObj(parm_template, SWIGTYPE_p_HOM_ParmTemplate, own);
517 }
518 
519 template <> InterpreterObject
520 HOMconvertValueForInterpreter<HOM_PaneTab*>(
521  HOM_PaneTab *const &pane_tab, int own)
522 {
523  if (!pane_tab)
524  return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
525 
526  // Because of multiple inheritance, it's extremely important that
527  // we explicitly cast the pointer to the HOM type so we pass the right
528  // address to SWIG_NewPointerObject, since it takes a void*.
529 
530  switch (pane_tab->type().id())
531  {
532  case HOM_paneTabType::ContextViewer_Id:
533  return SWIG_NewPointerObj(
534  (void*)dynamic_cast<const HOM_ContextViewer* const>(pane_tab),
535  SWIGTYPE_p_HOM_ContextViewer, own);
536 
537  case HOM_paneTabType::SceneViewer_Id:
538  return SWIG_NewPointerObj(
539  (void*)dynamic_cast<const HOM_SceneViewer* const>(pane_tab),
540  SWIGTYPE_p_HOM_SceneViewer, own);
541 
542  case HOM_paneTabType::CompositorViewer_Id:
543  return SWIG_NewPointerObj(
544  (void*)dynamic_cast<const HOM_CompositorViewer* const>(pane_tab),
545  SWIGTYPE_p_HOM_CompositorViewer, own);
546 
547  case HOM_paneTabType::NetworkEditor_Id:
548  return SWIG_NewPointerObj(
549  (void*)dynamic_cast<const HOM_NetworkEditor* const>(pane_tab),
550  SWIGTYPE_p_HOM_NetworkEditor, own);
551 
552  case HOM_paneTabType::HelpBrowser_Id:
553  return SWIG_NewPointerObj(
554  (void*)dynamic_cast<const HOM_HelpBrowser* const>(pane_tab),
555  SWIGTYPE_p_HOM_HelpBrowser, own);
556 
557  case HOM_paneTabType::PythonPanel_Id:
558  return SWIG_NewPointerObj(
559  (void*)dynamic_cast<const HOM_PythonPanel* const>(pane_tab),
560  SWIGTYPE_p_HOM_PythonPanel, own);
561 
562  case HOM_paneTabType::IPRViewer_Id:
563  return SWIG_NewPointerObj(
564  (void*)dynamic_cast<const HOM_IPRViewer* const>(pane_tab),
565  SWIGTYPE_p_HOM_IPRViewer, own);
566 
567  case HOM_paneTabType::AssetBrowser_Id:
568  return SWIG_NewPointerObj(
569  (void*)dynamic_cast<const HOM_AssetBrowser* const>(pane_tab),
570  SWIGTYPE_p_HOM_AssetBrowser, own);
571 
572  case HOM_paneTabType::PerformanceMonitor_Id:
573  return SWIG_NewPointerObj(
574  (void*)dynamic_cast<const HOM_PerformanceMonitor* const>(pane_tab),
575  SWIGTYPE_p_HOM_PerformanceMonitor, own);
576 
577  case HOM_paneTabType::ChannelEditor_Id:
578  return SWIG_NewPointerObj(
579  (void*)dynamic_cast<const HOM_ChannelEditorPane* const>(pane_tab),
580  SWIGTYPE_p_HOM_ChannelEditorPane, own);
581 
582  case HOM_paneTabType::DataTree_Id:
583  return SWIG_NewPointerObj(
584  (void*)dynamic_cast<const HOM_DataTree* const>(pane_tab),
585  SWIGTYPE_p_HOM_DataTree, own);
586 
587  case HOM_paneTabType::SceneGraphTree_Id:
588  return SWIG_NewPointerObj(
589  (void*)dynamic_cast<const HOM_SceneGraphTree* const>(pane_tab),
590  SWIGTYPE_p_HOM_SceneGraphTree, own);
591 
592  case HOM_paneTabType::Parm_Id:
593  return SWIG_NewPointerObj(
594  (void*)dynamic_cast<const HOM_ParameterEditor* const>(pane_tab),
595  SWIGTYPE_p_HOM_ParameterEditor, own);
596 
597  case HOM_paneTabType::ChannelViewer_Id:
598  case HOM_paneTabType::OutputViewer_Id:
599  case HOM_paneTabType::ShaderViewer_Id:
600  case HOM_paneTabType::DetailsView_Id:
601  case HOM_paneTabType::TreeView_Id:
602  case HOM_paneTabType::RenderGallery_Id:
603  return SWIG_NewPointerObj(
604  (void*)dynamic_cast<const HOM_PathBasedPaneTab* const>(pane_tab),
605  SWIGTYPE_p_HOM_PathBasedPaneTab, own);
606 
607  case HOM_paneTabType::ChannelList_Id:
608  case HOM_paneTabType::Textport_Id:
609  case HOM_paneTabType::PythonShell_Id:
610  case HOM_paneTabType::HandleList_Id:
611  case HOM_paneTabType::BundleList_Id:
612  case HOM_paneTabType::TakeList_Id:
613  case HOM_paneTabType::ParmSpreadsheet_Id:
614  case HOM_paneTabType::LightLinker_Id:
615  case HOM_paneTabType::MaterialPalette_Id:
616  case HOM_paneTabType::EngineSessionSync_Id:
617  return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
618  };
619 
620  UT_ASSERT(!"Unknown pane tab type");
621  return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
622 }
623 
624 template <> InterpreterObject
625 HOMconvertValueForInterpreter<HOM_SopVerb*>(
626  HOM_SopVerb *const &verb, int own)
627 {
628  return SWIG_NewPointerObj(verb, SWIGTYPE_p_HOM_SopVerb, own);
629 }
630 
631 template <> InterpreterObject
632 HOMconvertValueForInterpreter<HOM_Geometry*>(
633  HOM_Geometry *const &geo, int own)
634 {
635  return SWIG_NewPointerObj(geo, SWIGTYPE_p_HOM_Geometry, own);
636 }
637 
638 template <> InterpreterObject
639 HOMconvertValueForInterpreter<HOM_NetworkItem*>(
640  HOM_NetworkItem *const &item, int own)
641 {
642  if (item)
643  {
644  switch (item->networkItemType().id())
645  {
646  case HOM_networkItemType::Node_Id:
647  // We know its a node, but we need to convert to the specific
648  // node type referred to by this item.
649  return HOMconvertValueForInterpreter(
650  dynamic_cast<HOM_Node* const>(item), own);
651 
652  case HOM_networkItemType::NetworkBox_Id:
653  return SWIG_NewPointerObj(
654  (void*)dynamic_cast<const HOM_NetworkBox* const>(item),
655  SWIGTYPE_p_HOM_NetworkBox, own);
656 
657  case HOM_networkItemType::StickyNote_Id:
658  return SWIG_NewPointerObj(
659  (void*)dynamic_cast<const HOM_StickyNote* const>(item),
660  SWIGTYPE_p_HOM_StickyNote, own);
661 
662  case HOM_networkItemType::SubnetIndirectInput_Id:
663  return SWIG_NewPointerObj(
664  (void*)dynamic_cast<const HOM_SubnetIndirectInput* const>(item),
665  SWIGTYPE_p_HOM_SubnetIndirectInput, own);
666 
667  case HOM_networkItemType::Connection_Id:
668  return SWIG_NewPointerObj(
669  (void*)dynamic_cast<const HOM_NodeConnection* const>(item),
670  SWIGTYPE_p_HOM_NodeConnection, own);
671 
672  case HOM_networkItemType::NetworkDot_Id:
673  return SWIG_NewPointerObj(
674  (void*)dynamic_cast<const HOM_NetworkDot* const>(item),
675  SWIGTYPE_p_HOM_NetworkDot, own);
676 
677  default:
678  break;
679  };
680  }
681 
682  return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_NetworkItem, own);
683 }
684 
685 template <> InterpreterObject
686 HOMconvertValueForInterpreter<HOM_NetworkMovableItem*>(
687  HOM_NetworkMovableItem *const &item, int own)
688 {
689  if (!item)
690  return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_NetworkMovableItem, own);
691 
692  return HOMconvertValueForInterpreter<HOM_NetworkItem *>(item, own);
693 }
694 
695 template <> InterpreterObject
696 HOMconvertValueForInterpreter<
697  std::vector<HOM_ElemPtr<HOM_NodeConnection> >*>(
698  std::vector<HOM_ElemPtr<HOM_NodeConnection> > *const &list,
699  int own)
700 {
701  return swig::from(*list);
702 }
703 
704 template <> InterpreterObject
705 HOMconvertValueForInterpreter<HOM_DopData*>(HOM_DopData *const &data, int own)
706 {
707  const HOM_DopObject *const dop_object =
708  dynamic_cast<const HOM_DopObject *const>(data);
709  if (dop_object)
710  return SWIG_NewPointerObj(
711  (void *)dop_object, SWIGTYPE_p_HOM_DopObject, own);
712 
713  const HOM_DopRelationship *const dop_relationship =
714  dynamic_cast<const HOM_DopRelationship *const>(data);
715  if (dop_relationship)
716  return SWIG_NewPointerObj(
717  (void *)dop_relationship, SWIGTYPE_p_HOM_DopRelationship, own);
718 
719  return SWIG_NewPointerObj(data, SWIGTYPE_p_HOM_DopData, own);
720 }
721 
722 template <> InterpreterObject
723 HOMconvertValueForInterpreter<HOM_RadialItem*>(
724  HOM_RadialItem *const &item, int own)
725 {
726  if (item)
727  {
728  switch (item->type().id())
729  {
730  case HOM_radialItemType::Script_Id:
731  return SWIG_NewPointerObj(
732  (void*)dynamic_cast<const HOM_RadialScriptItem* const>(item),
733  SWIGTYPE_p_HOM_RadialScriptItem, own);
734 
735  case HOM_radialItemType::Submenu_Id:
736  return SWIG_NewPointerObj(
737  (void*)dynamic_cast<const HOM_RadialSubmenu* const>(item),
738  SWIGTYPE_p_HOM_RadialSubmenu, own);
739 
740  default:
741  break;
742  };
743  }
744 
745  return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_RadialItem, own);
746 }
747 
748 template <> InterpreterObject
749 HOMconvertValueForInterpreter<HOM_EnumValue*>(
750  HOM_EnumValue *const &item, int own)
751 {
752  // We should NEVER heap allocate HOM_EnumValue because only return
753  // static instances of them to SWIG.
754  UT_ASSERT(!own);
755 
756  return SWIG_NewPointerObj(
757  (void*)dynamic_cast<const HOM_EnumValue* const>(item),
758  SWIGTYPE_p_HOM_EnumValue, /*own*/0);
759 }
760 
761 // These functions specialize pointers to other classes. If a class is
762 // used inside HOM_IterableList or HOM_ElemPtr, it must be listed here.
763 #define HOM_PROVIDE_SWIG_LOOKUP(type) \
764  template <> InterpreterObject HOMconvertValueForInterpreter<type*>( \
765  type* const& value, int own) \
766  { \
767  return SWIG_NewPointerObj(SWIG_as_voidptr(value), \
768  SWIGTYPE_p_ ## type, own); \
769  }
770 
771 HOM_PROVIDE_SWIG_LOOKUP(HOM_AdvancedDrawable)
772 HOM_PROVIDE_SWIG_LOOKUP(HOM_AgentClip)
773 HOM_PROVIDE_SWIG_LOOKUP(HOM_AgentDefinition)
774 HOM_PROVIDE_SWIG_LOOKUP(HOM_AgentLayer)
775 HOM_PROVIDE_SWIG_LOOKUP(HOM_AgentShape)
776 HOM_PROVIDE_SWIG_LOOKUP(HOM_AgentShapeBinding)
777 HOM_PROVIDE_SWIG_LOOKUP(HOM_AgentShapeDeformer)
778 HOM_PROVIDE_SWIG_LOOKUP(HOM_AgentTransformGroup)
779 HOM_PROVIDE_SWIG_LOOKUP(HOM_Attrib)
780 HOM_PROVIDE_SWIG_LOOKUP(HOM_AttribDataId)
781 HOM_PROVIDE_SWIG_LOOKUP(HOM_ChannelGraphSelection)
782 HOM_PROVIDE_SWIG_LOOKUP(HOM_Color)
783 HOM_PROVIDE_SWIG_LOOKUP(HOM_Desktop)
784 HOM_PROVIDE_SWIG_LOOKUP(HOM_Dialog)
785 HOM_PROVIDE_SWIG_LOOKUP(HOM_DopRecord)
786 HOM_PROVIDE_SWIG_LOOKUP(HOM_Drawable)
787 HOM_PROVIDE_SWIG_LOOKUP(HOM_FloatingPanel)
788 HOM_PROVIDE_SWIG_LOOKUP(HOM_GadgetContext)
789 HOM_PROVIDE_SWIG_LOOKUP(HOM_GadgetDrawable)
790 HOM_PROVIDE_SWIG_LOOKUP(HOM_Gallery)
791 HOM_PROVIDE_SWIG_LOOKUP(HOM_GalleryEntry)
792 HOM_PROVIDE_SWIG_LOOKUP(HOM_GeometrySelection)
793 HOM_PROVIDE_SWIG_LOOKUP(HOM_GeometryViewport)
794 HOM_PROVIDE_SWIG_LOOKUP(HOM_Handle)
795 HOM_PROVIDE_SWIG_LOOKUP(HOM_GeometryDrawable)
796 HOM_PROVIDE_SWIG_LOOKUP(HOM_GeometryDrawableGroup)
797 HOM_PROVIDE_SWIG_LOOKUP(HOM_HDADefinition)
798 HOM_PROVIDE_SWIG_LOOKUP(HOM_HDASection)
799 HOM_PROVIDE_SWIG_LOOKUP(HOM_ik_Joint)
800 HOM_PROVIDE_SWIG_LOOKUP(HOM_IndexPairPropertyTable)
801 HOM_PROVIDE_SWIG_LOOKUP(HOM_LopInstanceIdRule)
802 HOM_PROVIDE_SWIG_LOOKUP(HOM_LopSelectionRule)
803 HOM_PROVIDE_SWIG_LOOKUP(HOM_Matrix2)
804 HOM_PROVIDE_SWIG_LOOKUP(HOM_Matrix3)
805 HOM_PROVIDE_SWIG_LOOKUP(HOM_Matrix4)
806 HOM_PROVIDE_SWIG_LOOKUP(HOM_NetworkBox)
807 HOM_PROVIDE_SWIG_LOOKUP(HOM_NetworkDot)
808 HOM_PROVIDE_SWIG_LOOKUP(HOM_NodeBundle)
809 HOM_PROVIDE_SWIG_LOOKUP(HOM_NodeConnection)
810 HOM_PROVIDE_SWIG_LOOKUP(HOM_NodeGroup)
811 HOM_PROVIDE_SWIG_LOOKUP(HOM_Pane)
812 HOM_PROVIDE_SWIG_LOOKUP(HOM_Parm)
813 HOM_PROVIDE_SWIG_LOOKUP(HOM_ParmTuple)
814 HOM_PROVIDE_SWIG_LOOKUP(HOM_Point)
815 HOM_PROVIDE_SWIG_LOOKUP(HOM_Polygon)
816 HOM_PROVIDE_SWIG_LOOKUP(HOM_PythonPanelInterface)
817 HOM_PROVIDE_SWIG_LOOKUP(HOM_Edge)
818 HOM_PROVIDE_SWIG_LOOKUP(HOM_PointGroup)
819 HOM_PROVIDE_SWIG_LOOKUP(HOM_PrimGroup)
820 HOM_PROVIDE_SWIG_LOOKUP(HOM_EdgeGroup)
821 HOM_PROVIDE_SWIG_LOOKUP(HOM_VertexGroup)
822 HOM_PROVIDE_SWIG_LOOKUP(HOM_Quaternion)
823 HOM_PROVIDE_SWIG_LOOKUP(HOM_RadialMenu)
824 HOM_PROVIDE_SWIG_LOOKUP(HOM_Ramp)
825 HOM_PROVIDE_SWIG_LOOKUP(HOM_Selection)
826 HOM_PROVIDE_SWIG_LOOKUP(HOM_Selector)
827 HOM_PROVIDE_SWIG_LOOKUP(HOM_Shelf)
828 HOM_PROVIDE_SWIG_LOOKUP(HOM_ShelfSet)
829 HOM_PROVIDE_SWIG_LOOKUP(HOM_SimpleDrawable)
830 HOM_PROVIDE_SWIG_LOOKUP(HOM_StickyNote)
831 HOM_PROVIDE_SWIG_LOOKUP(HOM_SubnetIndirectInput)
832 HOM_PROVIDE_SWIG_LOOKUP(HOM_Take)
833 HOM_PROVIDE_SWIG_LOOKUP(HOM_TextDrawable)
834 HOM_PROVIDE_SWIG_LOOKUP(HOM_Tool)
835 HOM_PROVIDE_SWIG_LOOKUP(HOM_Track)
836 HOM_PROVIDE_SWIG_LOOKUP(HOM_UIEvent)
837 HOM_PROVIDE_SWIG_LOOKUP(HOM_UIEventDevice)
838 HOM_PROVIDE_SWIG_LOOKUP(HOM_Vector2)
839 HOM_PROVIDE_SWIG_LOOKUP(HOM_Vector3)
840 HOM_PROVIDE_SWIG_LOOKUP(HOM_Vector4)
841 HOM_PROVIDE_SWIG_LOOKUP(HOM_Vertex)
842 HOM_PROVIDE_SWIG_LOOKUP(HOM_VexContext)
843 HOM_PROVIDE_SWIG_LOOKUP(HOM_ViewerHandleContext)
844 HOM_PROVIDE_SWIG_LOOKUP(HOM_ViewerHandleTemplate)
845 HOM_PROVIDE_SWIG_LOOKUP(HOM_ViewerState)
846 HOM_PROVIDE_SWIG_LOOKUP(HOM_ViewerStateContext)
847 HOM_PROVIDE_SWIG_LOOKUP(HOM_ViewerStateMenu)
848 HOM_PROVIDE_SWIG_LOOKUP(HOM_ViewerStateTemplate)
849 HOM_PROVIDE_SWIG_LOOKUP(HOM_ViewportVisualizer)
850 HOM_PROVIDE_SWIG_LOOKUP(HOM_ViewportVisualizerType)
851 HOM_PROVIDE_SWIG_LOOKUP(HOM_WebServerRequest)
852 HOM_PROVIDE_SWIG_LOOKUP(HOM_WebServerResponse)
853 HOM_PROVIDE_SWIG_LOOKUP(HOM_WebServerUploadedFile)
854 
855 %}
856 
857 //----------------------------------------------------------------------------
858 
859 // We create typemaps for base classes that appear as return types to make
860 // sure swig instances the proper subclasses in the interpreter.
861 
862 #define HOM_CONVERT_AND_CATCH \
863  try \
864  { \
865  $result = HOMconvertValueForInterpreter($1, $owner); \
866  } \
867  catch (...) \
868  { \
869  (void)hom::raise_swig_exception(); \
870  $result = nullptr; \
871  } \
872 /**/
873 
874 %typemap(out) HOM_Prim* {
875  HOM_CONVERT_AND_CATCH
876 }
877 
878 %typemap(out) HOM_PackedPrim* {
879  HOM_CONVERT_AND_CATCH
880 }
881 
882 %typemap(out) HOM_Node* {
883  HOM_CONVERT_AND_CATCH
884 }
885 
886 %typemap(out) HOM_NodeType* {
887  HOM_CONVERT_AND_CATCH
888 }
889 
890 %typemap(out) HOM_BaseKeyframe* {
891  HOM_CONVERT_AND_CATCH
892 }
893 
894 %typemap(out) HOM_ParmTemplate* {
895  HOM_CONVERT_AND_CATCH
896 }
897 
898 %typemap(out) HOM_Pane* {
899  HOM_CONVERT_AND_CATCH
900 }
901 
902 %typemap(out) HOM_PaneTab* {
903  HOM_CONVERT_AND_CATCH
904 }
905 
906 %typemap(out) HOM_DopData* {
907  HOM_CONVERT_AND_CATCH
908 }
909 
910 %typemap(out) HOM_RadialItem* {
911  HOM_CONVERT_AND_CATCH
912 }
913 
914 %typemap(out) HOM_NetworkMovableItem* {
915  HOM_CONVERT_AND_CATCH
916 }
917 
918 %typemap(out) HOM_NetworkItem* {
919  HOM_CONVERT_AND_CATCH
920 }
921 
922 %typemap(out) std::vector<HOM_ElemPtr<HOM_NodeConnection> > * {
923  HOM_CONVERT_AND_CATCH
924 }
925 
926 //----------------------------------------------------------------------------
927 
928 // These typemaps convert HOM exceptions into corresponding python standard
929 // exceptions.
930 %typemap(throws) HOM_TypeError %{
931  SWIG_exception_fail(SWIG_TypeError, $1.instanceMessage().c_str());
932 %}
933 
934 %typemap(throws) HOM_ValueError %{
935  SWIG_exception_fail(SWIG_ValueError, $1.instanceMessage().c_str());
936 %}
937 
938 #ifdef SWIGPYTHON
939 %typemap(throws) HOM_SystemExit %{
940  PyErr_SetObject(PyExc_SystemExit, SWIG_From_int($1.code()));
941  SWIG_fail;
942 %}
943 #endif
944 
945 //----------------------------------------------------------------------------
946 
947 // This typemap lets you declare a hboost::any parameter and swig will convert
948 // the interpreter (Python) object to a hboost::any that wraps the C++ data
949 // type.
950 %typemap(in) hboost::any {
951  try
952  {
953  // Note that if we can't convert to a hboost::any, we leave the
954  // hboost::any as empty (i.e. its empty() method returns true).
955  HOMinterpreterObjectToBoostAny($input, $1);
956  }
957  catch (...)
958  {
959  (void)hom::raise_swig_exception();
960  }
961 }
962 
963 // This typemap lets you declare a HOM_UTOptionAny (hboost::any) parameter and
964 // swig will convert the interpreter (Python) object into the C++ data type
965 // for interpreter objects that correspond to a UT_OptionType.
966 %typemap(in) HOM_UTOptionAny {
967  try
968  {
969  // Note that if we can't convert to a hboost::any, we leave the
970  // hboost::any as empty (i.e. its empty() method returns true).
971  HOMinterpreterObjectToUTOptionAny($input, $1);
972  }
973  catch (...)
974  {
975  (void)hom::raise_swig_exception();
976  }
977 }
978 
979 // This typemap lets you return hboost::any objects.
980 %typemap(out) hboost::any {
981  try
982  {
983  $result = HOMboostAnyToInterpreterObject($1);
984  }
985  catch (...)
986  {
987  (void)hom::raise_swig_exception();
988  }
989 }
990 
991 %typemap(out) HOM_DDSourceAny {
992  try
993  {
994  $result = HOMDDSourceAnyToInterpreterObject($1);
995  }
996  catch (...)
997  {
998  (void)hom::raise_swig_exception();
999  }
1000 }
1001 
1002 //----------------------------------------------------------------------------
1003 
1004 #ifdef SWIGPYTHON
1005 %typemap(out) PY_OpaqueObject {
1006  $result = HOMincRef((InterpreterObject)$1.opaqueObject());
1007 }
1008 #endif
1009 
1010 // For whatever reason, adding the typemap does not customize swig::from(),
1011 // so we do that manually.
1012 %{
1013 #ifdef SWIGPYTHON
1014 namespace swig {
1015  template <>
1016  struct traits_from<PY_OpaqueObject>
1017  {
1018  static PyObject *from(const PY_OpaqueObject &val)
1019  {
1020  return HOMincRef((InterpreterObject)val.opaqueObject());
1021  }
1022  };
1023 }
1024 #endif
1025 
1026 //----------------------------------------------------------------------------
1027 
1028 // This helper function takes an interpreter (Python) object and converts it
1029 // into a hboost::any object. It returns whether or not the conversion was
1030 // possible, and leaves the hboost::any unchanged if a conversion wasn't
1031 // possible.
1032 bool
1033 HOMinterpreterObjectToBoostAny(InterpreterObject input, hboost::any &result)
1034 {
1035 #ifdef SWIGPYTHON
1036  if (input == Py_None)
1037  {
1038  result = (void *)NULL;
1039  return true;
1040  }
1041 
1042  // SWIG_AsVal_bool is too permissive, and treats thinks that an integer
1043  // is a bool. So, we explicitly check against True and False.
1044  if (input == Py_True)
1045  {
1046  result = true;
1047  return true;
1048  }
1049 
1050  if (input == Py_False)
1051  {
1052  result = false;
1053  return true;
1054  }
1055 #endif
1056 
1057  int int_result;
1058  if (SWIG_IsOK(SWIG_AsVal_int(input, &int_result)))
1059  {
1060  result = int_result;
1061  return true;
1062  }
1063 
1064  double double_result;
1065  if (SWIG_IsOK(SWIG_AsVal_double(input, &double_result)))
1066  {
1067  result = double_result;
1068  return true;
1069  }
1070 
1071  std::string string_result;
1072  if (SWIG_IsOK(SWIG_AsVal_std_string(input, &string_result)))
1073  {
1074  result = string_result;
1075  return true;
1076  }
1077 
1078  void *geometry_result = NULL;
1079  if (SWIG_IsOK(SWIG_ConvertPtr(input, &geometry_result,
1080  SWIGTYPE_p_HOM_Geometry, 0)) && geometry_result)
1081  {
1082  result = reinterpret_cast<HOM_Geometry *>(geometry_result);
1083  return true;
1084  }
1085 
1086  void *ramp_result = NULL;
1087  if (SWIG_IsOK(SWIG_ConvertPtr(input, &ramp_result,
1088  SWIGTYPE_p_HOM_Ramp, 0)) && ramp_result)
1089  {
1090  result = reinterpret_cast<HOM_Ramp *>(ramp_result);
1091  return true;
1092  }
1093 
1094  void *color_result = NULL;
1095  if (SWIG_IsOK(SWIG_ConvertPtr(input, &color_result,
1096  SWIGTYPE_p_HOM_Color, 0)) && color_result)
1097  {
1098  result = reinterpret_cast<HOM_Color *>(color_result);
1099  return true;
1100  }
1101 
1102  void *parm_result = NULL;
1103  if (SWIG_IsOK(SWIG_ConvertPtr(input, &parm_result,
1104  SWIGTYPE_p_HOM_Parm, 0)) && parm_result)
1105  {
1106  result = reinterpret_cast<HOM_Parm *>(parm_result);
1107  return true;
1108  }
1109 
1110  void *enum_result = NULL;
1111  if (SWIG_IsOK(SWIG_ConvertPtr(input, &enum_result,
1112  SWIGTYPE_p_HOM_EnumValue, 0)) && enum_result)
1113  {
1114  result = reinterpret_cast<HOM_EnumValue *>(enum_result);
1115  return true;
1116  }
1117 
1118  void *vec2_result = NULL;
1119  if (SWIG_IsOK(SWIG_ConvertPtr(input, &vec2_result,
1120  SWIGTYPE_p_HOM_Vector2, 0)) && vec2_result)
1121  {
1122  result = reinterpret_cast<HOM_Vector2 *>(vec2_result);
1123  return true;
1124  }
1125 
1126  void *vec3_result = NULL;
1127  if (SWIG_IsOK(SWIG_ConvertPtr(input, &vec3_result,
1128  SWIGTYPE_p_HOM_Vector3, 0)) && vec3_result)
1129  {
1130  result = reinterpret_cast<HOM_Vector3 *>(vec3_result);
1131  return true;
1132  }
1133 
1134  void *vec4_result = NULL;
1135  if (SWIG_IsOK(SWIG_ConvertPtr(input, &vec4_result,
1136  SWIGTYPE_p_HOM_Vector4, 0)) && vec4_result)
1137  {
1138  result = reinterpret_cast<HOM_Vector4 *>(vec4_result);
1139  return true;
1140  }
1141 
1142  std::vector<int> *int_vector_ptr = NULL;
1143  if (SWIG_IsOK(swig::asptr(input, (std::vector<int> **)NULL)) &&
1144  SWIG_IsOK(swig::asptr(input, &int_vector_ptr)))
1145  {
1146  result = *int_vector_ptr;
1147  delete int_vector_ptr;
1148  return true;
1149  }
1150 
1151  std::vector<double> *double_vector_ptr = NULL;
1152  if (SWIG_IsOK(swig::asptr(input, (std::vector<double> **)NULL)) &&
1153  SWIG_IsOK(swig::asptr(input, &double_vector_ptr)))
1154  {
1155  result = *double_vector_ptr;
1156  delete double_vector_ptr;
1157  return true;
1158  }
1159 
1160  std::vector<std::string> *string_vector_ptr = NULL;
1161  if (SWIG_IsOK(swig::asptr(input, (std::vector<std::string> **)NULL)) &&
1162  SWIG_IsOK(swig::asptr(input, &string_vector_ptr)))
1163  {
1164  result = *string_vector_ptr;
1165  delete string_vector_ptr;
1166  return true;
1167  }
1168 
1169  std::vector<HOM_Vector2> *vector2_vector_ptr = NULL;
1170  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector2> **)NULL)) &&
1171  SWIG_IsOK(swig::asptr(input, &vector2_vector_ptr)))
1172  {
1173  result = *vector2_vector_ptr;
1174  delete vector2_vector_ptr;
1175  return true;
1176  }
1177 
1178  std::vector<HOM_Vector3> *vector3_vector_ptr = NULL;
1179  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector3> **)NULL)) &&
1180  SWIG_IsOK(swig::asptr(input, &vector3_vector_ptr)))
1181  {
1182  result = *vector3_vector_ptr;
1183  delete vector3_vector_ptr;
1184  return true;
1185  }
1186 
1187  std::vector<HOM_Vector4> *vector4_vector_ptr = NULL;
1188  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector4> **)NULL)) &&
1189  SWIG_IsOK(swig::asptr(input, &vector4_vector_ptr)))
1190  {
1191  result = *vector4_vector_ptr;
1192  delete vector4_vector_ptr;
1193  return true;
1194  }
1195 
1196  std::vector<HOM_Matrix2> *matrix2_vector_ptr = NULL;
1197  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix2> **)NULL)) &&
1198  SWIG_IsOK(swig::asptr(input, &matrix2_vector_ptr)))
1199  {
1200  result = *matrix2_vector_ptr;
1201  delete matrix2_vector_ptr;
1202  return true;
1203  }
1204 
1205  std::vector<HOM_Matrix3> *matrix3_vector_ptr = NULL;
1206  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix3> **)NULL)) &&
1207  SWIG_IsOK(swig::asptr(input, &matrix3_vector_ptr)))
1208  {
1209  result = *matrix3_vector_ptr;
1210  delete matrix3_vector_ptr;
1211  return true;
1212  }
1213 
1214  std::vector<HOM_Matrix4> *matrix4_vector_ptr = NULL;
1215  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix4> **)NULL)) &&
1216  SWIG_IsOK(swig::asptr(input, &matrix4_vector_ptr)))
1217  {
1218  result = *matrix4_vector_ptr;
1219  delete matrix4_vector_ptr;
1220  return true;
1221  }
1222 
1223  std::map<std::string, hboost::any> *map_ptr = NULL;
1224  if (SWIG_IsOK(swig::asptr(input, (std::map<std::string, hboost::any> **)NULL)) &&
1225  SWIG_IsOK(swig::asptr(input, &map_ptr)))
1226  {
1227  result = *map_ptr;
1228  delete map_ptr;
1229  return true;
1230  }
1231 
1232  std::vector<std::map<std::string, hboost::any> > *map_vector_ptr = NULL;
1233  if (SWIG_IsOK(swig::asptr(input, (std::vector<std::map<std::string, hboost::any> > **)NULL)) &&
1234  SWIG_IsOK(swig::asptr(input, &map_vector_ptr)))
1235  {
1236  result = *map_vector_ptr;
1237  delete map_vector_ptr;
1238  return true;
1239  }
1240 
1241  UT_ASSERT(result.empty());
1242  return false;
1243 }
1244 
1245 // This helper function takes an interpreter (Python) object and converts it
1246 // into a HOM_UTOptionAny (hboost::any) object. It returns whether or not the
1247 // conversion was possible, and leaves the HOM_UTOptionAny unchanged if a
1248 // conversion wasn't possible.
1249 bool
1250 HOMinterpreterObjectToUTOptionAny(InterpreterObject input,
1251  HOM_UTOptionAny &result)
1252 {
1253 #ifdef SWIGPYTHON
1254  if (input == Py_None)
1255  {
1256  result = (void *)NULL;
1257  return true;
1258  }
1259 
1260  // SWIG_AsVal_bool is too permissive, and treats thinks that an integer
1261  // is a bool. So, we explicitly check against True and False.
1262  if (input == Py_True)
1263  {
1264  result = true;
1265  return true;
1266  }
1267 
1268  if (input == Py_False)
1269  {
1270  result = false;
1271  return true;
1272  }
1273 #endif
1274 
1275  int int_result;
1276  if (SWIG_IsOK(SWIG_AsVal_int(input, &int_result)))
1277  {
1278  result = int_result;
1279  return true;
1280  }
1281 
1282  double double_result;
1283  if (SWIG_IsOK(SWIG_AsVal_double(input, &double_result)))
1284  {
1285  result = double_result;
1286  return true;
1287  }
1288 
1289  std::string string_result;
1290  if (SWIG_IsOK(SWIG_AsVal_std_string(input, &string_result)))
1291  {
1292  result = string_result;
1293  return true;
1294  }
1295 
1296  void *vector2_result = NULL;
1297  if (SWIG_IsOK(SWIG_ConvertPtr(input, &vector2_result,
1298  SWIGTYPE_p_HOM_Vector2, 0)) && vector2_result)
1299  {
1300  result = reinterpret_cast<HOM_Vector2 *>(vector2_result);
1301  return true;
1302  }
1303 
1304  void *vector3_result = NULL;
1305  if (SWIG_IsOK(SWIG_ConvertPtr(input, &vector3_result,
1306  SWIGTYPE_p_HOM_Vector3, 0)) && vector3_result)
1307  {
1308  result = reinterpret_cast<HOM_Vector3 *>(vector3_result);
1309  return true;
1310  }
1311 
1312  void *vector4_result = NULL;
1313  if (SWIG_IsOK(SWIG_ConvertPtr(input, &vector4_result,
1314  SWIGTYPE_p_HOM_Vector4, 0)) && vector4_result)
1315  {
1316  result = reinterpret_cast<HOM_Vector4 *>(vector4_result);
1317  return true;
1318  }
1319 
1320  void *quat_result = NULL;
1321  if (SWIG_IsOK(SWIG_ConvertPtr(input, &quat_result,
1322  SWIGTYPE_p_HOM_Quaternion, 0)) && quat_result)
1323  {
1324  result = reinterpret_cast<HOM_Quaternion *>(quat_result);
1325  return true;
1326  }
1327 
1328  void *matrix2_result = NULL;
1329  if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix2_result,
1330  SWIGTYPE_p_HOM_Matrix2, 0)) && matrix2_result)
1331  {
1332  result = reinterpret_cast<HOM_Matrix2 *>(matrix2_result);
1333  return true;
1334  }
1335 
1336  void *matrix3_result = NULL;
1337  if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix3_result,
1338  SWIGTYPE_p_HOM_Matrix3, 0)) && matrix3_result)
1339  {
1340  result = reinterpret_cast<HOM_Matrix3 *>(matrix3_result);
1341  return true;
1342  }
1343 
1344  void *matrix4_result = NULL;
1345  if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix4_result,
1346  SWIGTYPE_p_HOM_Matrix4, 0)) && matrix4_result)
1347  {
1348  result = reinterpret_cast<HOM_Matrix4 *>(matrix4_result);
1349  return true;
1350  }
1351 
1352  void *geometry_result = NULL;
1353  if (SWIG_IsOK(SWIG_ConvertPtr(input, &geometry_result,
1354  SWIGTYPE_p_HOM_Geometry, 0)) && geometry_result)
1355  {
1356  result = reinterpret_cast<HOM_Geometry *>(geometry_result);
1357  return true;
1358  }
1359 
1360  void *ramp_result = NULL;
1361  if (SWIG_IsOK(SWIG_ConvertPtr(input, &ramp_result,
1362  SWIGTYPE_p_HOM_Ramp, 0)) && ramp_result)
1363  {
1364  result = reinterpret_cast<HOM_Ramp *>(ramp_result);
1365  return true;
1366  }
1367 
1368  std::vector<int> *int_vector_ptr = NULL;
1369  if (SWIG_IsOK(swig::asptr(input, (std::vector<int> **)NULL)) &&
1370  SWIG_IsOK(swig::asptr(input, &int_vector_ptr)))
1371  {
1372  result = *int_vector_ptr;
1373  delete int_vector_ptr;
1374  return true;
1375  }
1376 
1377  std::vector<double> *double_vector_ptr = NULL;
1378  if (SWIG_IsOK(swig::asptr(input, (std::vector<double> **)NULL)) &&
1379  SWIG_IsOK(swig::asptr(input, &double_vector_ptr)))
1380  {
1381  result = *double_vector_ptr;
1382  delete double_vector_ptr;
1383  return true;
1384  }
1385 
1386  std::vector<std::string> *string_vector_ptr = NULL;
1387  if (SWIG_IsOK(swig::asptr(input, (std::vector<std::string> **)NULL)) &&
1388  SWIG_IsOK(swig::asptr(input, &string_vector_ptr)))
1389  {
1390  result = *string_vector_ptr;
1391  delete string_vector_ptr;
1392  return true;
1393  }
1394 
1395  std::vector<HOM_Vector2> *vector2_vector_ptr = NULL;
1396  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector2> **)NULL)) &&
1397  SWIG_IsOK(swig::asptr(input, &vector2_vector_ptr)))
1398  {
1399  result = *vector2_vector_ptr;
1400  delete vector2_vector_ptr;
1401  return true;
1402  }
1403 
1404  std::vector<HOM_Vector3> *vector3_vector_ptr = NULL;
1405  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector3> **)NULL)) &&
1406  SWIG_IsOK(swig::asptr(input, &vector3_vector_ptr)))
1407  {
1408  result = *vector3_vector_ptr;
1409  delete vector3_vector_ptr;
1410  return true;
1411  }
1412 
1413  std::vector<HOM_Vector4> *vector4_vector_ptr = NULL;
1414  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector4> **)NULL)) &&
1415  SWIG_IsOK(swig::asptr(input, &vector4_vector_ptr)))
1416  {
1417  result = *vector4_vector_ptr;
1418  delete vector4_vector_ptr;
1419  return true;
1420  }
1421 
1422  std::vector<HOM_Matrix2> *matrix2_vector_ptr = NULL;
1423  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix2> **)NULL)) &&
1424  SWIG_IsOK(swig::asptr(input, &matrix2_vector_ptr)))
1425  {
1426  result = *matrix2_vector_ptr;
1427  delete matrix2_vector_ptr;
1428  return true;
1429  }
1430 
1431  std::vector<HOM_Matrix3> *matrix3_vector_ptr = NULL;
1432  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix3> **)NULL)) &&
1433  SWIG_IsOK(swig::asptr(input, &matrix3_vector_ptr)))
1434  {
1435  result = *matrix3_vector_ptr;
1436  delete matrix3_vector_ptr;
1437  return true;
1438  }
1439 
1440  std::vector<HOM_Matrix4> *matrix4_vector_ptr = NULL;
1441  if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix4> **)NULL)) &&
1442  SWIG_IsOK(swig::asptr(input, &matrix4_vector_ptr)))
1443  {
1444  result = *matrix4_vector_ptr;
1445  delete matrix4_vector_ptr;
1446  return true;
1447  }
1448 
1449  UT_ASSERT(result.empty());
1450  return false;
1451 }
1452 
1453 // Creating an input typemap isn't sufficient to handle input parameters with
1454 // std::vector's or std::map's of hboost::any's, so we need to specialize
1455 // swig::traits_asptr<hboost::any>.
1456 namespace swig {
1457  template <>
1458  struct traits_asptr<hboost::any>
1459  {
1460  static int asptr(InterpreterObject obj, hboost::any **val)
1461  {
1462  // TODO: Will the hboost::any be properly deleted?
1463  hboost::any *p = new hboost::any();
1464  HOMinterpreterObjectToBoostAny(obj, *p);
1465  if (val)
1466  *val = p;
1467  return SWIG_NEWOBJ;
1468  }
1469  };
1470 }
1471 
1472 // This function is not instantiated until the first use of HOM_BinaryString,
1473 // but we need to use it in HOMboostAnyToInterpreterObject. So just forward
1474 // declare it here.
1475 static PyObject * SWIG_From_HOM_BinaryString(const HOM_BinaryString& s);
1476 
1477 // This helper function takes a variable wrapped inside a hboost::any object
1478 // and creates a new instance of the corresponding InterpreterObject.
1479 static InterpreterObject
1480 HOMboostAnyToInterpreterObject(const hboost::any &result)
1481 {
1482  if (result.empty())
1483  return SWIG_Py_Void();
1484 
1485  if (result.type() == typeid(int))
1486  return SWIG_From_int(hboost::any_cast<int>(result));
1487 
1488  if (result.type() == typeid(long))
1489  return SWIG_From_long(hboost::any_cast<long>(result));
1490 
1491  if (result.type() == typeid(int64))
1492  return swig::from(hboost::any_cast<int64>(result));
1493 
1494  if (result.type() == typeid(float))
1495  return SWIG_From_float(hboost::any_cast<float>(result));
1496 
1497  if (result.type() == typeid(double))
1498  return SWIG_From_double(hboost::any_cast<double>(result));
1499 
1500  if (result.type() == typeid(bool))
1501  return SWIG_From_bool(hboost::any_cast<bool>(result));
1502 
1503  if (result.type() == typeid(std::string))
1504  return SWIG_From_std_string(hboost::any_cast<std::string>(result));
1505 
1506  if (result.type() == typeid(HOM_BinaryString))
1507  return SWIG_From_HOM_BinaryString(hboost::any_cast<HOM_BinaryString>(result));
1508 
1509  if (result.type() == typeid(std::map<std::string, hboost::any>))
1510  return swig::from(
1511  hboost::any_cast<std::map<std::string, hboost::any> >(result));
1512 
1513  if (result.type() == typeid(std::vector<int>))
1514  return swig::from(hboost::any_cast<std::vector<int> >(result));
1515 
1516  if (result.type() == typeid(std::vector<int64>))
1517  return swig::from(hboost::any_cast<std::vector<int64> >(result));
1518 
1519  if (result.type() == typeid(std::vector<float>))
1520  return swig::from(hboost::any_cast<std::vector<float> >(result));
1521 
1522  if (result.type() == typeid(std::vector<std::string>))
1523  return swig::from(hboost::any_cast<std::vector<std::string> >(result));
1524 
1525  if (result.type() == typeid(std::vector<double>))
1526  return swig::from(hboost::any_cast<std::vector<double> >(result));
1527 
1528  if (result.type() == typeid(std::vector<std::vector<float> >))
1529  return swig::from(
1530  hboost::any_cast<std::vector<std::vector<float> > >(result));
1531 
1532  if (result.type() == typeid(std::vector<std::vector<double> >))
1533  return swig::from(
1534  hboost::any_cast<std::vector<std::vector<double> > >(result));
1535 
1536  if (result.type() == typeid(std::vector<std::map<std::string, hboost::any> >))
1537  return swig::from(
1538  hboost::any_cast<std::vector<std::map<std::string, hboost::any> > >(result));
1539 
1540  // If a HOM function returns a pointer to a HOM_Vector*/HOM_Matrix*, it
1541  // will transfer the ownership of that object to swig.
1542  if (result.type() == typeid(HOM_Vector2 *))
1543  return HOMconvertValueForInterpreter(
1544  hboost::any_cast<HOM_Vector2 *>(result), SWIG_POINTER_OWN);
1545 
1546  if (result.type() == typeid(HOM_Vector3 *))
1547  return HOMconvertValueForInterpreter(
1548  hboost::any_cast<HOM_Vector3 *>(result), SWIG_POINTER_OWN);
1549 
1550  if (result.type() == typeid(HOM_Vector4 *))
1551  return HOMconvertValueForInterpreter(
1552  hboost::any_cast<HOM_Vector4 *>(result), SWIG_POINTER_OWN);
1553 
1554  if (result.type() == typeid(HOM_Matrix2 *))
1555  return HOMconvertValueForInterpreter(
1556  hboost::any_cast<HOM_Matrix2 *>(result), SWIG_POINTER_OWN);
1557 
1558  if (result.type() == typeid(HOM_Matrix3 *))
1559  return HOMconvertValueForInterpreter(
1560  hboost::any_cast<HOM_Matrix3 *>(result), SWIG_POINTER_OWN);
1561 
1562  if (result.type() == typeid(HOM_Matrix4 *))
1563  return HOMconvertValueForInterpreter(
1564  hboost::any_cast<HOM_Matrix4 *>(result), SWIG_POINTER_OWN);
1565 
1566  if (result.type() == typeid(HOM_NodeType *))
1567  return HOMconvertValueForInterpreter(
1568  hboost::any_cast<HOM_NodeType *>(result), SWIG_POINTER_OWN);
1569 
1570  if (result.type() == typeid(HOM_Ramp *))
1571  return HOMconvertValueForInterpreter(
1572  hboost::any_cast<HOM_Ramp *>(result), SWIG_POINTER_OWN);
1573 
1574  if (result.type() == typeid(HOM_Color *))
1575  return HOMconvertValueForInterpreter(
1576  hboost::any_cast<HOM_Color *>(result), SWIG_POINTER_OWN);
1577 
1578  if (result.type() == typeid(HOM_Parm *))
1579  return HOMconvertValueForInterpreter(
1580  hboost::any_cast<HOM_Parm *>(result), SWIG_POINTER_OWN);
1581 
1582  if (result.type() == typeid(HOM_EnumValue *))
1583  return HOMconvertValueForInterpreter(
1584  hboost::any_cast<HOM_EnumValue *>(result), /*own*/0);
1585 
1586  if (result.type() == typeid(HOM_Geometry *))
1587  return HOMconvertValueForInterpreter(
1588  hboost::any_cast<HOM_Geometry *>(result), SWIG_POINTER_OWN);
1589 
1590  if (result.type() == typeid(std::vector<HOM_ElemPtr<HOM_Vector2> >))
1591  return swig::from(
1592  hboost::any_cast<std::vector<HOM_ElemPtr<HOM_Vector2> > >(result));
1593 
1594  if (result.type() == typeid(std::vector<HOM_ElemPtr<HOM_Vector3> >))
1595  return swig::from(
1596  hboost::any_cast<std::vector<HOM_ElemPtr<HOM_Vector3> > >(result));
1597 
1598  if (result.type() == typeid(std::vector<HOM_ElemPtr<HOM_Vector4> >))
1599  return swig::from(
1600  hboost::any_cast<std::vector<HOM_ElemPtr<HOM_Vector4> > >(result));
1601 
1602  if (result.type() == typeid(std::vector<HOM_ElemPtr<HOM_Matrix2> >))
1603  return swig::from(
1604  hboost::any_cast<std::vector<HOM_ElemPtr<HOM_Matrix2> > >(result));
1605 
1606  if (result.type() == typeid(std::vector<HOM_ElemPtr<HOM_Matrix3> >))
1607  return swig::from(
1608  hboost::any_cast<std::vector<HOM_ElemPtr<HOM_Matrix3> > >(result));
1609 
1610  if (result.type() == typeid(std::vector<HOM_ElemPtr<HOM_Matrix4> >))
1611  return swig::from(
1612  hboost::any_cast<std::vector<HOM_ElemPtr<HOM_Matrix4> > >(result));
1613 
1614 #if UT_ASSERT_LEVEL > 0
1615  std::cout << "Unknown data type: "
1616  << UTunmangleClassNameFromTypeIdName(result.type().name()) << "\n";
1617 #endif
1618  UT_ASSERT(!"Unknown data type");
1619  return SWIG_Py_Void();
1620 }
1621 
1622 // This helper function takes a variable wrapped inside a hboost::any object
1623 // and creates a new instance of the corresponding InterpreterObject.
1624 static InterpreterObject
1625 HOMDDSourceAnyToInterpreterObject(const HOM_DDSourceAny &result)
1626 {
1627  if (result.type() == typeid(HOM_Node *))
1628  {
1629  return HOMconvertValueForInterpreter(
1630  hboost::any_cast<HOM_Node *>(result), SWIG_POINTER_OWN);
1631  }
1632  if (result.type() == typeid(HOM_Parm *))
1633  {
1634  return HOMconvertValueForInterpreter(
1635  hboost::any_cast<HOM_Parm *>(result), SWIG_POINTER_OWN);
1636  }
1637  if (result.type() == typeid(HOM_GalleryEntry *))
1638  {
1639  return HOMconvertValueForInterpreter(
1640  hboost::any_cast<HOM_GalleryEntry *>(result), SWIG_POINTER_OWN);
1641  }
1642 
1643  return HOMboostAnyToInterpreterObject(result);
1644 }
1645 
1646 namespace swig {
1647  // Adding the typemap does not customize swig::from() so we do that
1648  // manually.
1649  template <>
1650  struct traits_from<hboost::any>
1651  {
1652  static PyObject *from(const hboost::any &val)
1653  { return HOMboostAnyToInterpreterObject(val); }
1654  };
1655 }
1656 
1657 static InterpreterObject
1658 HOMoptionsToInterpreterObject(const UT_Options &options);
1659 
1660 static InterpreterObject
1661 HOMoptionEntryToInterpreterObject(const UT_OptionEntry &option_entry)
1662 {
1663  // We're usually called from code that has the GIL released so make sure we
1664  // acquire it here.
1665  PY_InterpreterAutoLock py_lock;
1666 
1667  InterpreterObject result = NULL;
1668 
1669  switch (option_entry.getType())
1670  {
1671  case UT_OPTION_INT:
1672  return SWIG_From_int(
1673  ((const UT_OptionInt &)option_entry).getValue());
1674 
1675  case UT_OPTION_BOOL:
1676  return SWIG_From_bool(
1677  ((const UT_OptionBool &)option_entry).getValue());
1678 
1679  case UT_OPTION_FPREAL:
1680  return SWIG_From_double(
1681  ((const UT_OptionFpreal &)option_entry).getValue());
1682 
1683  case UT_OPTION_STRING:
1684  case UT_OPTION_STRINGRAW:
1685  {
1686  return SWIG_From_std_string(
1687  ((const UT_OptionString &)option_entry).getValue().toStdString());
1688  }
1689 
1690  case UT_OPTION_VECTOR2:
1691  return HOMconvertValueForInterpreter(
1692  new HOM_Vector2(
1693  ((const UT_OptionVector2 &)option_entry).getValue()),
1694  SWIG_POINTER_OWN);
1695 
1696  case UT_OPTION_VECTOR3:
1697  return HOMconvertValueForInterpreter(
1698  new HOM_Vector3(
1699  ((const UT_OptionVector3 &)option_entry).getValue()),
1700  SWIG_POINTER_OWN);
1701 
1702  case UT_OPTION_VECTOR4:
1703  return HOMconvertValueForInterpreter(
1704  new HOM_Vector4(
1705  ((const UT_OptionVector4 &)option_entry).getValue()),
1706  SWIG_POINTER_OWN);
1707 
1708  case UT_OPTION_QUATERNION:
1709  return HOMconvertValueForInterpreter(
1710  new HOM_Quaternion(
1711  ((const UT_OptionQuaternion &)option_entry).getValue()),
1712  SWIG_POINTER_OWN);
1713 
1714  case UT_OPTION_MATRIX2:
1715  return HOMconvertValueForInterpreter(
1717  ((const UT_OptionMatrix2 &)option_entry).getValue())),
1718  SWIG_POINTER_OWN);
1719 
1720  case UT_OPTION_MATRIX3:
1721  return HOMconvertValueForInterpreter(
1723  ((const UT_OptionMatrix3 &)option_entry).getValue())),
1724  SWIG_POINTER_OWN);
1725 
1726  case UT_OPTION_MATRIX4:
1727  return HOMconvertValueForInterpreter(
1729  ((const UT_OptionMatrix4 &)option_entry).getValue())),
1730  SWIG_POINTER_OWN);
1731 
1732  case UT_OPTION_UV:
1733  return HOMconvertValueForInterpreter(
1734  new HOM_Vector2(
1735  ((const UT_OptionUV &)option_entry).getValue()),
1736  SWIG_POINTER_OWN);
1737 
1738  case UT_OPTION_UVW:
1739  return HOMconvertValueForInterpreter(
1740  new HOM_Vector3(
1741  ((const UT_OptionUVW &)option_entry).getValue()),
1742  SWIG_POINTER_OWN);
1743 
1744  case UT_OPTION_INTARRAY:
1745  {
1746  std::vector<int64> int_vector;
1747  UTarrayToStdVector(
1748  static_cast<const UT_OptionInt64Array &>(option_entry)
1749  .getValue(), int_vector);
1750  return swig::from(int_vector);
1751  }
1752 
1753  case UT_OPTION_FPREALARRAY:
1754  {
1755  std::vector<double> double_vector;
1756  UTarrayToStdVector(
1757  static_cast<const UT_OptionFpreal64Array &>(option_entry)
1758  .getValue(), double_vector);
1759  return swig::from(double_vector);
1760  }
1761 
1762  case UT_OPTION_STRINGARRAY:
1763  {
1764  std::vector<std::string> str_vector;
1765  UTarrayToStdVectorOfStrings(
1766  static_cast<const UT_OptionStringArray &>(option_entry)
1767  .getValue(), str_vector);
1768  return swig::from(str_vector);
1769  }
1770 
1771  case UT_OPTION_DICT:
1772  {
1773  UT_OptionsHolder opt;
1774  opt = static_cast<const UT_OptionDict &>(option_entry).getValue();
1775  return HOMoptionsToInterpreterObject(*opt.options());
1776  }
1777  case UT_OPTION_DICTARRAY:
1778  {
1780  optlist = static_cast<const UT_OptionDictArray &>(option_entry).getValue();
1781  InterpreterObject result = PyList_New(0);
1782 
1783  for (auto && opt : optlist)
1784  {
1785  PyList_Append(result, HOMoptionsToInterpreterObject(*opt.options()));
1786  }
1787 
1788  return result;
1789  }
1790  case UT_OPTION_INVALID:
1791  case UT_OPTION_NUM_TYPES:
1792  // Just exit the switch with no result.
1793  break;
1794  }
1795 
1796  return result ? result : SWIG_Py_Void();
1797 }
1798 
1799 #ifdef SWIGPYTHON
1800 static InterpreterObject
1801 HOMoptionsToInterpreterObject(const UT_Options &options)
1802 {
1803  // We're usually called from code that has the GIL released so make sure we
1804  // acquire it here.
1805  PY_InterpreterAutoLock py_lock;
1806 
1807  InterpreterObject result = PyDict_New();
1808 
1809  for (UT_Options::iterator it = options.begin(); !it.atEnd(); ++it)
1810  {
1811  // The Python dictionary object will increment the reference count
1812  // on the value, so we decrement it since we just allocated it.
1813  InterpreterObject value=HOMoptionEntryToInterpreterObject(*it.entry());
1814  PyDict_SetItemString(result, it.name(), value);
1815  Py_DECREF(value);
1816  }
1817 
1818  return result;
1819 }
1820 
1821 static InterpreterObject
1822 HOMoptionsListToInterpreterObject(const std::vector<UT_Options>& options)
1823 {
1824  auto pysize = options.size();
1825 
1826  // We're usually called from code that has the GIL released so make sure we
1827  // acquire it here.
1828  PY_InterpreterAutoLock py_lock;
1829 
1830  InterpreterObject list = PyList_New(pysize);
1831  for (int i = 0; i < pysize; ++i)
1832  {
1833  auto value = HOMoptionsToInterpreterObject(options[i]);
1834  // PyList_SET_ITEM will steal the reference
1835  PyList_SET_ITEM(list, i, value);
1836  }
1837  return list;
1838 }
1839 
1840 #endif
1841 
1842 #ifdef SWIGPYTHON
1843 
1844 // Helper for accessing a HOM object python attributes.
1845 // Used by HDAModule and HDAViewerStateModule.
1846 template<typename T>
1847 PyObject* HOMgetattr(T* hom_object, const char *name)
1848 {
1849  HOM_AutoLock hom_lock;
1850  PY_InterpreterAutoLock py_lock;
1851 
1852  // First check the context's locals dictionary. If the context
1853  // pointer is null we treat it as though the dictionary is empty.
1854  PY_EvaluationContext *context = hom_object->getEvaluationContext();
1855  PyObject *dict = context
1856  ? (PyObject *)context->getGlobalsDict() : NULL;
1857  PyObject *attribute = (dict && name)
1858  ? PyDict_GetItemString(dict, name) : NULL;
1859 
1860  // If the lookup failed, try the globals dictionary.
1861  if (!attribute && dict)
1862  {
1863  dict = (PyObject *)context->getGlobalsDict();
1864  attribute = name ? PyDict_GetItemString(dict, name) : NULL;
1865  }
1866 
1867  // If we found an object in the dictionary, return it, being careful
1868  // to increment the reference count on the object.
1869  if (attribute)
1870  return HOMincRef(attribute);
1871 
1872  // We didn't find the object, so raise an exception.
1873  if (!name)
1874  name = "";
1875  UT_WorkBuffer error_message;
1876  error_message.sprintf("'module' object has no attribute '%s'", name);
1877  PyErr_SetString(PyExc_AttributeError, error_message.buffer());
1878  return NULL;
1879 }
1880 #endif
1881 
1882 //----------------------------------------------------------------------------
1883 
1884 #ifdef SWIGPYTHON
1885 // This helper class takes a Python buffer object and provides access to
1886 // the underlying C buffer. Note that the class is only used inside the
1887 // swig file, so it doesn't need to be exported from the current library.
1888 class HOM_PyBuffer
1889 {
1890 public:
1891  HOM_PyBuffer(InterpreterObject py_object)
1892  {
1893 #if PY_VERSION_HEX >= 0x03000000
1894  myBytesObj = nullptr;
1895 #endif
1896  myData = NULL;
1897  myLength = 0;
1898 
1899  PyObject *obj = py_object;
1900 
1901 #if PY_VERSION_HEX >= 0x03000000
1902  // Automatically convert HOM binary strings to buffer-like objects.
1903  if (PyUnicode_Check(obj))
1904  {
1905  myBytesObj =
1906  PyUnicode_AsEncodedString(obj, "utf-8", "surrogateescape");
1907  obj = myBytesObj;
1908  }
1909 #endif
1910 
1911  // Python added a new buffer interface starting with Python 2.6.
1912 #if PY_VERSION_HEX >= 0x02060000
1913  myUseNewAPI = false;
1914  if (PyObject_CheckBuffer(obj))
1915  {
1916  if (PyObject_GetBuffer(obj, &myPyBuffer, PyBUF_SIMPLE) < 0)
1917  {
1918 #if PY_VERSION_HEX >= 0x03000000
1919  cleanBytesObject_();
1920 #endif
1921  throw HOM_TypeError("failed to get readable buffer");
1922  }
1923 
1924  myUseNewAPI = true;
1925  myData = myPyBuffer.buf;
1926  myLength = myPyBuffer.len;
1927  return;
1928  }
1929 #endif
1930 
1931 #if PY_VERSION_HEX >= 0x03000000
1932  cleanBytesObject_();
1933  throw HOM_TypeError("failed to get readable buffer");
1934 #else
1935  // Either the new API isn't supported in this Python version or the
1936  // Python object doesn't support it. Try the old API.
1937  if (!PyObject_CheckReadBuffer(obj))
1938  throw HOM_TypeError("expected a readable buffer");
1939 
1940  if (PyObject_AsReadBuffer(obj, &myData, &myLength) < 0)
1941  throw HOM_TypeError("failed to get readable buffer");
1942 #endif
1943  }
1944 
1945  ~HOM_PyBuffer()
1946  {
1947 #if PY_VERSION_HEX >= 0x03000000
1948  cleanBytesObject_();
1949 #endif
1950 
1951 #if PY_VERSION_HEX >= 0x02060000
1952  if (myUseNewAPI)
1953  PyBuffer_Release(&myPyBuffer);
1954 #endif
1955  }
1956 
1957 #if PY_VERSION_HEX >= 0x03000000
1958  void cleanBytesObject_()
1959  {
1960  if (!myBytesObj)
1961  return;
1962 
1963  Py_DECREF(myBytesObj);
1964  myBytesObj = nullptr;
1965  }
1966 #endif
1967 
1968 #if PY_VERSION_HEX >= 0x03000000
1969  PyObject *myBytesObj;
1970 #endif
1971 
1972 #if PY_VERSION_HEX >= 0x02060000
1973  bool myUseNewAPI;
1974  Py_buffer myPyBuffer;
1975 #endif
1976  const void *myData;
1977  Py_ssize_t myLength;
1978 };
1979 #endif
1980 
1981 //----------------------------------------------------------------------------
1982 
1983 // These helper functions are used to implement the attrib() methods of
1984 // Points, Prims, and Vertices. We need to do extra work for these methods
1985 // because the return type can vary.
1986 template <typename T>
1987 InterpreterObject
1988 HOMattribValue(T &geo_element, HOM_Attrib &hom_attrib)
1989 {
1990  InterpreterObject result = NULL;
1991  const bool scalar = (hom_attrib.size() == 1 && !hom_attrib.isArrayType());
1992  switch (hom_attrib.dataType().id())
1993  {
1994  case HOM_attribData::Int_Id:
1995  if (scalar)
1996  result = swig::from(
1997  hboost::any_cast<int64>(geo_element.intAttribValue(hom_attrib)));
1998  else
1999  result = swig::from(
2000  hboost::any_cast<std::vector<int64> >(
2001  geo_element.intListAttribValue(hom_attrib)));
2002  break;
2003 
2004  case HOM_attribData::Float_Id:
2005  if (scalar)
2006  result = SWIG_From_double(geo_element.floatAttribValue(hom_attrib));
2007  else
2008  result = swig::from(geo_element.floatListAttribValue(hom_attrib));
2009  break;
2010 
2011  case HOM_attribData::String_Id:
2012  if (scalar)
2013  result = SWIG_From_std_string(
2014  geo_element.stringAttribValue(hom_attrib));
2015  else
2016  result = swig::from(geo_element.stringListAttribValue(hom_attrib));
2017  break;
2018 
2019  case HOM_attribData::Dict_Id:
2020  if (scalar)
2021  result = swig::from(geo_element.dictAttribValue(hom_attrib));
2022  else
2023  result = swig::from(geo_element.dictListAttribValue(hom_attrib));
2024  break;
2025  }
2026  UT_ASSERT(result);
2027  return result;
2028 }
2029 
2030 
2031 // Note that the caller is responsible for deleting the HOM_Attrib object
2032 // that's returned.
2033 template <typename T> HOM_Attrib*
2034 HOMlookUpAttrib(T &geo_element, const char *name);
2035 
2036 template <> HOM_Attrib*
2037 HOMlookUpAttrib(HOM_Point &point, const char *name)
2038 { return HOMdel(point.geometry())->findPointAttrib(name); }
2039 
2040 template <> HOM_Attrib*
2041 HOMlookUpAttrib(HOM_Prim &prim, const char *name)
2042 { return HOMdel(prim.geometry())->findPrimAttrib(name); }
2043 
2044 template <> HOM_Attrib*
2045 HOMlookUpAttrib(HOM_Vertex &vertex, const char *name)
2046 { return HOMdel(vertex.geometry())->findVertexAttrib(name); }
2047 
2048 template <> HOM_Attrib*
2049 HOMlookUpAttrib(HOM_Geometry &geometry, const char *name)
2050 { return geometry.findGlobalAttrib(name); }
2051 
2052 template <typename T>
2053 InterpreterObject
2054 HOMattribValue(T &geo_element, const char *name)
2055 {
2056  HOMthrowIfNone(name, "name cannot be None");
2057  HOM_Attrib *hom_attrib = HOMlookUpAttrib(geo_element, name);
2058  if (!hom_attrib)
2059  throw HOM_OperationFailed();
2060 
2061  InterpreterObject result = HOMattribValue(geo_element, *hom_attrib);
2062  delete hom_attrib;
2063  return result;
2064 }
2065 %}
2066 
2067 //----------------------------------------------------------------------------
2068 
2069 %{
2070 // These helper functions are used to implement parm evaluation.
2071 static InterpreterObject
2072 HOMevalParm(HOM_Parm &parm)
2073 {
2074  switch (parm.parmDataTypeEnumId())
2075  {
2076  case HOM_parmData::Int_Id:
2077  return SWIG_From_int(parm.evalAsInt());
2078  case HOM_parmData::Float_Id:
2079  return SWIG_From_double(parm.evalAsFloat());
2080  case HOM_parmData::String_Id:
2081  return SWIG_From_std_string(parm.evalAsString());
2082  case HOM_parmData::Ramp_Id:
2083  return SWIG_NewPointerObj(
2084  (void*)parm.evalAsRamp(), SWIGTYPE_p_HOM_Ramp, SWIG_POINTER_OWN);
2085  case HOM_parmData::Data_Id:
2086  if (parm.dataParmTypeEnumId() == HOM_dataParmType::KeyValueDictionary_Id)
2087  return swig::from(parm.evalAsJSONMap());
2088 
2089  return SWIG_NewPointerObj(
2090  (void*)parm.evalAsGeometry(), SWIGTYPE_p_HOM_Geometry, SWIG_POINTER_OWN);
2091  }
2092 
2093  UT_ASSERT(!"Unknown parm data type");
2094  return SWIG_Py_Void();
2095 }
2096 
2097 static InterpreterObject
2098 HOMevalParmAtFrame(HOM_Parm &parm, double frame)
2099 {
2100  switch (parm.parmDataTypeEnumId())
2101  {
2102  case HOM_parmData::Int_Id:
2103  return SWIG_From_int(parm.evalAsIntAtFrame(frame));
2104  case HOM_parmData::Float_Id:
2105  return SWIG_From_double(parm.evalAsFloatAtFrame(frame));
2106  case HOM_parmData::String_Id:
2107  return SWIG_From_std_string(parm.evalAsStringAtFrame(frame));
2108  case HOM_parmData::Ramp_Id:
2109  return SWIG_NewPointerObj(
2110  (void*)parm.evalAsRampAtFrame(frame),
2111  SWIGTYPE_p_HOM_Ramp, SWIG_POINTER_OWN);
2112  case HOM_parmData::Data_Id:
2113  if (parm.dataParmTypeEnumId() == HOM_dataParmType::KeyValueDictionary_Id)
2114  return swig::from(parm.evalAsJSONMapAtFrame(frame));
2115 
2116  return SWIG_NewPointerObj(
2117  (void*)parm.evalAsGeometryAtFrame(frame),
2118  SWIGTYPE_p_HOM_Geometry, SWIG_POINTER_OWN);
2119  }
2120 
2121  UT_ASSERT(!"Unknown parm data type");
2122  return SWIG_Py_Void();
2123 }
2124 
2125 static InterpreterObject
2126 HOMevalParmTuple(HOM_ParmTuple &parm_tuple)
2127 {
2128  switch (parm_tuple.parmDataTypeEnumId())
2129  {
2130  case HOM_parmData::Int_Id:
2131  return swig::from(parm_tuple.evalAsInts());
2132  case HOM_parmData::Float_Id:
2133  return swig::from(parm_tuple.evalAsFloats());
2134  case HOM_parmData::String_Id:
2135  return swig::from(parm_tuple.evalAsStrings());
2136  case HOM_parmData::Ramp_Id:
2137  return swig::from(parm_tuple.evalAsRamps());
2138  case HOM_parmData::Data_Id:
2139  if (parm_tuple.dataParmTypeEnumId()
2140  == HOM_dataParmType::KeyValueDictionary_Id)
2141  {
2142  return swig::from(parm_tuple.evalAsJSONMaps());
2143  }
2144 
2145  return swig::from(parm_tuple.evalAsGeometries());
2146  }
2147 
2148  UT_ASSERT(!"Unknown parm data type");
2149  return SWIG_Py_Void();
2150 }
2151 
2152 static InterpreterObject
2153 HOMevalParmTupleAtFrame(HOM_ParmTuple &parm_tuple, double frame)
2154 {
2155  switch (parm_tuple.parmDataTypeEnumId())
2156  {
2157  case HOM_parmData::Int_Id:
2158  return swig::from(parm_tuple.evalAsIntsAtFrame(frame));
2159  case HOM_parmData::Float_Id:
2160  return swig::from(parm_tuple.evalAsFloatsAtFrame(frame));
2161  case HOM_parmData::String_Id:
2162  return swig::from(parm_tuple.evalAsStringsAtFrame(frame));
2163  case HOM_parmData::Ramp_Id:
2164  return swig::from(parm_tuple.evalAsRampsAtFrame(frame));
2165  case HOM_parmData::Data_Id:
2166  if (parm_tuple.dataParmTypeEnumId()
2167  == HOM_dataParmType::KeyValueDictionary_Id)
2168  {
2169  return swig::from(parm_tuple.evalAsJSONMapsAtFrame(frame));
2170  }
2171 
2172  return swig::from(parm_tuple.evalAsGeometriesAtFrame(frame));
2173  }
2174 
2175  UT_ASSERT(!"Unknown parm data type");
2176  return SWIG_Py_Void();
2177 }
2178 
2179 static InterpreterObject
2180 HOMevalViewportVisualizerParm(HOM_ViewportVisualizer &visualizer, const char *parm_name)
2181 {
2182  switch (visualizer.parmDataTypeEnumId(parm_name))
2183  {
2184  case HOM_parmData::Int_Id:
2185  return SWIG_From_int(visualizer.evalParmAsInt(parm_name));
2186  case HOM_parmData::Float_Id:
2187  return SWIG_From_double(visualizer.evalParmAsFloat(parm_name));
2188  case HOM_parmData::String_Id:
2189  return SWIG_From_std_string(visualizer.evalParmAsString(parm_name));
2190  case HOM_parmData::Ramp_Id:
2191  return SWIG_NewPointerObj(
2192  (void*)visualizer.evalParmAsRamp(parm_name), SWIGTYPE_p_HOM_Ramp,
2193  SWIG_POINTER_OWN);
2194  }
2195 
2196  UT_ASSERT(!"Unknown parm data type");
2197  return SWIG_Py_Void();
2198 }
2199 
2200 
2201 //----------------------------------------------------------------------------
2202 
2203 %}
2204 #endif
2205 
2206 #endif
GLdouble s
Definition: glew.h:1390
UT_Matrix4T< double > UT_DMatrix4
virtual std::vector< HOM_ElemPtr< HOM_Geometry > > evalAsGeometries()=0
UT_Matrix3T< double > UT_DMatrix3
GLenum GLenum GLenum input
Definition: glew.h:13879
virtual std::vector< int > evalAsIntsAtFrame(double frame)=0
GLuint const GLchar * name
Definition: glew.h:1814
virtual int size()=0
virtual std::string evalParmAsString(const char *parm_name)=0
virtual HOM_Prim * prim(int index)=0
virtual bool isArrayType()=0
virtual std::vector< HOM_ElemPtr< HOM_Ramp > > evalAsRampsAtFrame(double frame)=0
virtual HOM_Attrib * findGlobalAttrib(const char *name)=0
hboost::any HOM_UTOptionAny
Definition: HOM_Defines.h:37
GLuint const GLfloat * val
Definition: glew.h:2794
virtual int parmDataTypeEnumId()=0
virtual double evalAsFloat()=0
virtual std::vector< int > evalAsInts()=0
SYS_FORCE_INLINE const char * buffer() const
UT_UniquePtr< T > HOMdel(T *hom_object)
Definition: HOM_Module.h:1099
GLhandleARB obj
Definition: glew.h:6236
bool atEnd() const
Definition: UT_Options.h:292
virtual HOM_Ramp * evalParmAsRamp(const char *parm_name)=0
virtual HOM_Ramp * evalAsRampAtFrame(double frame)=0
virtual std::vector< std::string > evalAsStrings()=0
UT_API std::string UTunmangleClassNameFromTypeIdName(const std::string &name)
virtual HOM_Geometry * geometry()=0
virtual double evalAsFloatAtFrame(double frame)=0
virtual std::vector< std::map< std::string, std::string > > evalAsJSONMaps()=0
virtual int evalAsIntAtFrame(double frame)=0
virtual int dataParmTypeEnumId()=0
bool any(const vbool4 &v)
Definition: simd.h:3372
GLuint in
Definition: glew.h:11510
virtual std::map< std::string, std::string > evalAsJSONMapAtFrame(double frame)=0
virtual HOM_Geometry * geometry()=0
virtual HOM_Geometry * evalAsGeometryAtFrame(double frame)=0
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
virtual UT_OptionType getType() const
UT_Matrix2T< double > UT_DMatrix2
virtual std::vector< std::map< std::string, std::string > > evalAsJSONMapsAtFrame(double frame)=0
GLuint object
Definition: glew.h:8986
void
Definition: png.h:1083
virtual std::map< std::string, std::string > evalAsJSONMap()=0
long long int64
Definition: SYS_Types.h:116
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
OP_OpTypeId
Definition: OP_OpTypeId.h:18
void * opaqueObject() const
virtual int parmDataTypeEnumId()=0
virtual std::string evalAsStringAtFrame(double frame)=0
virtual std::vector< HOM_ElemPtr< HOM_Geometry > > evalAsGeometriesAtFrame(double frame)=0
virtual std::vector< double > evalAsFloatsAtFrame(double frame)=0
virtual HOM_Ramp * evalAsRamp()=0
int sprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
virtual int dataParmTypeEnumId()=0
hboost::any HOM_DDSourceAny
Definition: HOM_Defines.h:42
virtual int evalAsInt()=0
iterator begin() const
Definition: UT_Options.h:404
GLfloat GLfloat p
Definition: glew.h:16321
virtual std::vector< double > evalAsFloats()=0
GLsizei const GLchar *const * string
Definition: glew.h:1844
A map of string to various well defined value types.
Definition: UT_Options.h:84
virtual double evalParmAsFloat(const char *parm_name)=0
virtual int parmDataTypeEnumId(const char *parm_name)=0
void HOMthrowIfNone(const T *pointer, const char *msg, bool allow_empty=true)
Definition: HOM_ErrorUtil.h:34
SYS_FORCE_INLINE const UT_Options * options() const
Definition: UT_Options.h:801
GLuint GLenum GLsizei GLsizei GLboolean packed
Definition: glew.h:12722
virtual bool isManager(bool include_management_types=true)=0
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
virtual HOM_EnumValue & dataType()=0
GLuint64EXT * result
Definition: glew.h:14007
int id() const
Definition: HOM_EnumValue.h:82
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
virtual std::vector< HOM_ElemPtr< HOM_Ramp > > evalAsRamps()=0
#define const
Definition: zconf.h:214
virtual int evalParmAsInt(const char *parm_name)=0
HOM_API HOM_Module & HOM()
virtual std::vector< std::string > evalAsStringsAtFrame(double frame)=0
GLsizei const GLfloat * value
Definition: glew.h:1849
virtual std::string evalAsString()=0
virtual HOM_Geometry * evalAsGeometry()=0
virtual HOM_Geometry * geometry()=0