9 #ifndef __HOM_Defines_h__
10 #define __HOM_Defines_h__
17 #if UT_ASSERT_LEVEL >= 2
27 #if defined(SWIG) && defined(SWIGPYTHON)
28 #define SWIGPYTHONOUT(x) x
30 #define SWIGPYTHONOUT(x)
36 #include <hboost/any.hpp>
46 #define HOM_MIN_NEGATIVE_DOUBLE -1 * std::numeric_limits<double>::max()
65 typedef PyObject *InterpreterObject;
67 PyObject *HOMincRef(PyObject *
object)
79 typedef PyObject *InterpreterObject;
98 template <
typename T> InterpreterObject
99 HOMconvertValueForInterpreter(
const T &
value,
int own);
102 template <> InterpreterObject
103 HOMconvertValueForInterpreter<int>(
const int&
value,
int )
104 {
return SWIG_From_int(value); }
106 template <> InterpreterObject
107 HOMconvertValueForInterpreter<float>(
const float&
value,
int )
108 {
return SWIG_From_float(value); }
110 template <> InterpreterObject
111 HOMconvertValueForInterpreter<double>(
const double&
value,
int )
112 {
return SWIG_From_double(value); }
114 template <> InterpreterObject
115 HOMconvertValueForInterpreter<std::string>(
117 {
return SWIG_From_std_string(value); }
121 template <> InterpreterObject
122 HOMconvertValueForInterpreter<HOM_Node*>(
HOM_Node *
const &node,
int own)
126 bool isnetwork =
false;
129 return SWIG_NewPointerObj(node, SWIGTYPE_p_HOM_Node, own);
139 return SWIG_NewPointerObj(
140 (
void*)dynamic_cast<const HOM_ObjNode* const>(node),
141 SWIGTYPE_p_HOM_ObjNode, own);
148 return SWIG_NewPointerObj(
149 (
void*)dynamic_cast<const HOM_SopNode* const>(node),
150 SWIGTYPE_p_HOM_SopNode, own);
157 return SWIG_NewPointerObj(
158 (
void*)dynamic_cast<const HOM_ChopNode* const>(node),
159 SWIGTYPE_p_HOM_ChopNode, own);
166 return SWIG_NewPointerObj(
167 (
void*)dynamic_cast<const HOM_CopNode* const>(node),
168 SWIGTYPE_p_HOM_CopNode, own);
175 return SWIG_NewPointerObj(
176 (
void*)dynamic_cast<const HOM_DopNode* const>(node),
177 SWIGTYPE_p_HOM_DopNode, own);
184 return SWIG_NewPointerObj(
185 (
void*)dynamic_cast<const HOM_ShopNode* const>(node),
186 SWIGTYPE_p_HOM_ShopNode, own);
193 return SWIG_NewPointerObj(
194 (
void*)dynamic_cast<const HOM_VopNetNode* const>(node),
195 SWIGTYPE_p_HOM_VopNetNode, own);
202 return SWIG_NewPointerObj(
203 (
void*)dynamic_cast<const HOM_RopNode* const>(node),
204 SWIGTYPE_p_HOM_RopNode, own);
211 return SWIG_NewPointerObj(
212 (
void*)dynamic_cast<const HOM_VopNode* const>(node),
213 SWIGTYPE_p_HOM_VopNode, own);
220 return SWIG_NewPointerObj(
221 (
void*)dynamic_cast<const HOM_TopNode* const>(node),
222 SWIGTYPE_p_HOM_TopNode, own);
232 nodetype = node->type();
233 isnetwork = (nodetype && nodetype->
isManager(
true));
236 return SWIG_NewPointerObj(
237 (
void*)dynamic_cast<const HOM_LopNetwork* const>(node),
238 SWIGTYPE_p_HOM_LopNetwork, own);
240 return SWIG_NewPointerObj(
241 (
void*)dynamic_cast<const HOM_LopNode* const>(node),
242 SWIGTYPE_p_HOM_LopNode, own);
247 if (
HOM().lopNodeTypeCategory() == node->childTypeCategory())
248 return SWIG_NewPointerObj(
250 SWIGTYPE_p_HOM_LopNetwork, own);
256 return SWIG_NewPointerObj(node, SWIGTYPE_p_HOM_Node, own);
259 template <> InterpreterObject
260 HOMconvertValueForInterpreter<HOM_NodeType*>(
266 return SWIG_NewPointerObj(nodetype, SWIGTYPE_p_HOM_NodeType, own);
268 if( !nodetype->managerFlag() )
278 return SWIG_NewPointerObj(
279 (
void*)dynamic_cast<const HOM_SopNodeType* const>(nodetype),
280 SWIGTYPE_p_HOM_SopNodeType, own);
287 return SWIG_NewPointerObj(
288 (
void*)dynamic_cast<const HOM_ShopNodeType* const>(nodetype),
289 SWIGTYPE_p_HOM_ShopNodeType, own);
296 return SWIG_NewPointerObj(
297 (
void*)dynamic_cast<const HOM_VopNodeType* const>(nodetype),
298 SWIGTYPE_p_HOM_VopNodeType, own);
304 return SWIG_NewPointerObj(nodetype, SWIGTYPE_p_HOM_NodeType, own);
307 template <> InterpreterObject
308 HOMconvertValueForInterpreter<HOM_BaseKeyframe*>(
312 return SWIG_NewPointerObj(keyframe, SWIGTYPE_p_HOM_BaseKeyframe, own);
314 if (keyframe->evaluatedType() == HOM_parmData::Float)
320 return SWIG_NewPointerObj(
321 (
void*)dynamic_cast<const HOM_Keyframe* const>(keyframe),
322 SWIGTYPE_p_HOM_Keyframe, own);
324 else if (keyframe->evaluatedType() == HOM_parmData::String)
330 return SWIG_NewPointerObj(
331 (
void*)dynamic_cast<const HOM_StringKeyframe* const>(keyframe),
332 SWIGTYPE_p_HOM_StringKeyframe, own);
335 return SWIG_NewPointerObj(keyframe, SWIGTYPE_p_HOM_BaseKeyframe, own);
338 template <> InterpreterObject
342 return SWIG_NewPointerObj(prim, SWIGTYPE_p_HOM_PackedPrim, own);
349 switch (prim->type().id())
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);
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);
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);
367 return SWIG_NewPointerObj(
368 (
void *)dynamic_cast<const HOM_PackedPrim *const>(prim),
369 SWIGTYPE_p_HOM_PackedPrim, own);
372 template <> InterpreterObject
373 HOMconvertValueForInterpreter<HOM_Prim*>(
HOM_Prim *
const &
prim,
int own)
376 return SWIG_NewPointerObj(prim, SWIGTYPE_p_HOM_Prim, own);
384 return HOMconvertValueForInterpreter(packed, own);
386 switch (prim->type().id())
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);
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);
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);
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);
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);
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);
426 return SWIG_NewPointerObj(prim, SWIGTYPE_p_HOM_Prim, own);
429 template <> InterpreterObject
430 HOMconvertValueForInterpreter<HOM_ParmTemplate*>(
434 return SWIG_NewPointerObj(
435 parm_template, SWIGTYPE_p_HOM_ParmTemplate, own);
440 switch (parm_template->type().id())
442 case HOM_parmTemplateType::Int_Id:
443 return SWIG_NewPointerObj(
444 (
void*)dynamic_cast<const HOM_IntParmTemplate* const>(
446 SWIGTYPE_p_HOM_IntParmTemplate, own);
448 case HOM_parmTemplateType::Float_Id:
449 return SWIG_NewPointerObj(
450 (
void*)dynamic_cast<const HOM_FloatParmTemplate* const>(
452 SWIGTYPE_p_HOM_FloatParmTemplate, own);
454 case HOM_parmTemplateType::String_Id:
455 return SWIG_NewPointerObj(
456 (
void*)dynamic_cast<const HOM_StringParmTemplate* const>(
458 SWIGTYPE_p_HOM_StringParmTemplate, own);
460 case HOM_parmTemplateType::Data_Id:
461 return SWIG_NewPointerObj(
462 (
void*)dynamic_cast<const HOM_DataParmTemplate* const>(
464 SWIGTYPE_p_HOM_DataParmTemplate, own);
466 case HOM_parmTemplateType::Toggle_Id:
467 return SWIG_NewPointerObj(
468 (
void*)dynamic_cast<const HOM_ToggleParmTemplate* const>(
470 SWIGTYPE_p_HOM_ToggleParmTemplate, own);
472 case HOM_parmTemplateType::Menu_Id:
473 return SWIG_NewPointerObj(
474 (
void*)dynamic_cast<const HOM_MenuParmTemplate* const>(
476 SWIGTYPE_p_HOM_MenuParmTemplate, own);
478 case HOM_parmTemplateType::Button_Id:
479 return SWIG_NewPointerObj(
480 (
void*)dynamic_cast<const HOM_ButtonParmTemplate* const>(
482 SWIGTYPE_p_HOM_ButtonParmTemplate, own);
484 case HOM_parmTemplateType::Label_Id:
485 return SWIG_NewPointerObj(
486 (
void*)dynamic_cast<const HOM_LabelParmTemplate* const>(
488 SWIGTYPE_p_HOM_LabelParmTemplate, own);
490 case HOM_parmTemplateType::Separator_Id:
491 return SWIG_NewPointerObj(
492 (
void*)dynamic_cast<const HOM_SeparatorParmTemplate* const>(
494 SWIGTYPE_p_HOM_SeparatorParmTemplate, own);
496 case HOM_parmTemplateType::FolderSet_Id:
497 return SWIG_NewPointerObj(
498 (
void*)dynamic_cast<const HOM_FolderSetParmTemplate* const>(
500 SWIGTYPE_p_HOM_FolderSetParmTemplate, own);
502 case HOM_parmTemplateType::Folder_Id:
503 return SWIG_NewPointerObj(
504 (
void*)dynamic_cast<const HOM_FolderParmTemplate* const>(
506 SWIGTYPE_p_HOM_FolderParmTemplate, own);
508 case HOM_parmTemplateType::Ramp_Id:
509 return SWIG_NewPointerObj(
510 (
void*)dynamic_cast<const HOM_RampParmTemplate* const>(
512 SWIGTYPE_p_HOM_RampParmTemplate, own);
515 UT_ASSERT(!
"Unknown parm template type");
516 return SWIG_NewPointerObj(parm_template, SWIGTYPE_p_HOM_ParmTemplate, own);
519 template <> InterpreterObject
520 HOMconvertValueForInterpreter<HOM_PaneTab*>(
524 return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
530 switch (pane_tab->type().id())
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
597 case HOM_paneTabType::DetailsView_Id:
598 return SWIG_NewPointerObj(
599 (
void*)dynamic_cast<const HOM_GeometrySpreadsheet * const>(pane_tab),
600 SWIGTYPE_p_HOM_GeometrySpreadsheet, own);
602 case HOM_paneTabType::ChannelViewer_Id:
603 case HOM_paneTabType::OutputViewer_Id:
604 case HOM_paneTabType::ShaderViewer_Id:
605 case HOM_paneTabType::TreeView_Id:
606 case HOM_paneTabType::RenderGallery_Id:
607 return SWIG_NewPointerObj(
608 (
void*)dynamic_cast<const HOM_PathBasedPaneTab* const>(pane_tab),
609 SWIGTYPE_p_HOM_PathBasedPaneTab, own);
611 case HOM_paneTabType::ChannelList_Id:
612 case HOM_paneTabType::Textport_Id:
613 case HOM_paneTabType::PythonShell_Id:
614 case HOM_paneTabType::HandleList_Id:
615 case HOM_paneTabType::BundleList_Id:
616 case HOM_paneTabType::TakeList_Id:
617 case HOM_paneTabType::ParmSpreadsheet_Id:
618 case HOM_paneTabType::LightLinker_Id:
619 case HOM_paneTabType::MaterialPalette_Id:
620 case HOM_paneTabType::EngineSessionSync_Id:
621 return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
625 return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
628 template <> InterpreterObject
629 HOMconvertValueForInterpreter<HOM_SopVerb*>(
632 return SWIG_NewPointerObj(verb, SWIGTYPE_p_HOM_SopVerb, own);
635 template <> InterpreterObject
636 HOMconvertValueForInterpreter<HOM_Geometry*>(
639 return SWIG_NewPointerObj(geo, SWIGTYPE_p_HOM_Geometry, own);
642 template <> InterpreterObject
643 HOMconvertValueForInterpreter<HOM_NetworkItem*>(
648 switch (item->networkItemType().id())
650 case HOM_networkItemType::Node_Id:
653 return HOMconvertValueForInterpreter(
654 dynamic_cast<HOM_Node* const>(item), own);
656 case HOM_networkItemType::NetworkBox_Id:
657 return SWIG_NewPointerObj(
658 (
void*)dynamic_cast<const HOM_NetworkBox* const>(item),
659 SWIGTYPE_p_HOM_NetworkBox, own);
661 case HOM_networkItemType::StickyNote_Id:
662 return SWIG_NewPointerObj(
663 (
void*)dynamic_cast<const HOM_StickyNote* const>(item),
664 SWIGTYPE_p_HOM_StickyNote, own);
666 case HOM_networkItemType::SubnetIndirectInput_Id:
667 return SWIG_NewPointerObj(
668 (
void*)dynamic_cast<const HOM_SubnetIndirectInput* const>(item),
669 SWIGTYPE_p_HOM_SubnetIndirectInput, own);
671 case HOM_networkItemType::Connection_Id:
672 return SWIG_NewPointerObj(
673 (
void*)dynamic_cast<const HOM_NodeConnection* const>(item),
674 SWIGTYPE_p_HOM_NodeConnection, own);
676 case HOM_networkItemType::NetworkDot_Id:
677 return SWIG_NewPointerObj(
678 (
void*)dynamic_cast<const HOM_NetworkDot* const>(item),
679 SWIGTYPE_p_HOM_NetworkDot, own);
686 return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_NetworkItem, own);
689 template <> InterpreterObject
690 HOMconvertValueForInterpreter<HOM_NetworkMovableItem*>(
694 return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_NetworkMovableItem, own);
696 return HOMconvertValueForInterpreter<HOM_NetworkItem *>(item, own);
699 template <> InterpreterObject
700 HOMconvertValueForInterpreter<
701 std::vector<HOM_ElemPtr<HOM_NodeConnection> >*>(
702 std::vector<HOM_ElemPtr<HOM_NodeConnection> > *
const &list,
705 return swig::from(*list);
708 template <> InterpreterObject
709 HOMconvertValueForInterpreter<HOM_DopData*>(
HOM_DopData *
const &
data,
int own)
714 return SWIG_NewPointerObj(
715 (
void *)dop_object, SWIGTYPE_p_HOM_DopObject, own);
719 if (dop_relationship)
720 return SWIG_NewPointerObj(
721 (
void *)dop_relationship, SWIGTYPE_p_HOM_DopRelationship, own);
723 return SWIG_NewPointerObj(data, SWIGTYPE_p_HOM_DopData, own);
726 template <> InterpreterObject
727 HOMconvertValueForInterpreter<HOM_RadialItem*>(
732 switch (item->type().id())
734 case HOM_radialItemType::Script_Id:
735 return SWIG_NewPointerObj(
736 (
void*)dynamic_cast<const HOM_RadialScriptItem* const>(item),
737 SWIGTYPE_p_HOM_RadialScriptItem, own);
739 case HOM_radialItemType::Submenu_Id:
740 return SWIG_NewPointerObj(
741 (
void*)dynamic_cast<const HOM_RadialSubmenu* const>(item),
742 SWIGTYPE_p_HOM_RadialSubmenu, own);
749 return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_RadialItem, own);
752 template <> InterpreterObject
753 HOMconvertValueForInterpreter<HOM_EnumValue*>(
760 return SWIG_NewPointerObj(
761 (
void*)dynamic_cast<const HOM_EnumValue* const>(item),
762 SWIGTYPE_p_HOM_EnumValue, 0);
767 #define HOM_PROVIDE_SWIG_LOOKUP(type) \
768 template <> InterpreterObject HOMconvertValueForInterpreter<type*>( \
769 type* const& value, int own) \
771 return SWIG_NewPointerObj(SWIG_as_voidptr(value), \
772 SWIGTYPE_p_ ## type, own); \
864 #define HOM_CONVERT_AND_CATCH \
867 $result = HOMconvertValueForInterpreter($1, $owner); \
871 (void)hom::raise_swig_exception(); \
877 HOM_CONVERT_AND_CATCH
881 HOM_CONVERT_AND_CATCH
885 HOM_CONVERT_AND_CATCH
889 HOM_CONVERT_AND_CATCH
893 HOM_CONVERT_AND_CATCH
897 HOM_CONVERT_AND_CATCH
901 HOM_CONVERT_AND_CATCH
905 HOM_CONVERT_AND_CATCH
909 HOM_CONVERT_AND_CATCH
913 HOM_CONVERT_AND_CATCH
917 HOM_CONVERT_AND_CATCH
921 HOM_CONVERT_AND_CATCH
925 HOM_CONVERT_AND_CATCH
932 %typemap(
throws) HOM_TypeError %{
933 SWIG_exception_fail(SWIG_TypeError, $1.instanceMessage().c_str());
936 %typemap(
throws) HOM_ValueError %{
937 SWIG_exception_fail(SWIG_ValueError, $1.instanceMessage().c_str());
942 PyErr_SetObject(PyExc_SystemExit, SWIG_From_int($1.code()));
952 %typemap(
in) hboost::
any {
957 HOMinterpreterObjectToBoostAny($input, $1);
961 (
void)hom::raise_swig_exception();
973 HOMinterpreterObjectToUTOptionAny($input, $1);
977 (
void)hom::raise_swig_exception();
982 %typemap(out) hboost::any {
985 $result = HOMboostAnyToInterpreterObject($1);
989 (
void)hom::raise_swig_exception();
996 $result = HOMDDSourceAnyToInterpreterObject($1);
1000 (
void)hom::raise_swig_exception();
1008 $result = HOMincRef((InterpreterObject)$1.opaqueObject());
1018 struct traits_from<PY_OpaqueObject>
1020 static PyObject *from(
const PY_OpaqueObject &
val)
1022 return HOMincRef((InterpreterObject)val.
opaqueObject());
1038 if (input == Py_None)
1040 result = (
void *)NULL;
1046 if (input == Py_True)
1052 if (input == Py_False)
1060 if (SWIG_IsOK(SWIG_AsVal_int(input, &int_result)))
1062 result = int_result;
1066 double double_result;
1067 if (SWIG_IsOK(SWIG_AsVal_double(input, &double_result)))
1069 result = double_result;
1074 if (SWIG_IsOK(SWIG_AsVal_std_string(input, &string_result)))
1076 result = string_result;
1080 void *geometry_result = NULL;
1081 if (SWIG_IsOK(SWIG_ConvertPtr(input, &geometry_result,
1082 SWIGTYPE_p_HOM_Geometry, 0)) && geometry_result)
1084 result =
reinterpret_cast<HOM_Geometry *
>(geometry_result);
1088 void *ramp_result = NULL;
1089 if (SWIG_IsOK(SWIG_ConvertPtr(input, &ramp_result,
1090 SWIGTYPE_p_HOM_Ramp, 0)) && ramp_result)
1092 result =
reinterpret_cast<HOM_Ramp *
>(ramp_result);
1096 void *color_result = NULL;
1097 if (SWIG_IsOK(SWIG_ConvertPtr(input, &color_result,
1098 SWIGTYPE_p_HOM_Color, 0)) && color_result)
1100 result =
reinterpret_cast<HOM_Color *
>(color_result);
1104 void *parm_result = NULL;
1105 if (SWIG_IsOK(SWIG_ConvertPtr(input, &parm_result,
1106 SWIGTYPE_p_HOM_Parm, 0)) && parm_result)
1108 result =
reinterpret_cast<HOM_Parm *
>(parm_result);
1112 void *enum_result = NULL;
1113 if (SWIG_IsOK(SWIG_ConvertPtr(input, &enum_result,
1114 SWIGTYPE_p_HOM_EnumValue, 0)) && enum_result)
1120 void *vec2_result = NULL;
1121 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vec2_result,
1122 SWIGTYPE_p_HOM_Vector2, 0)) && vec2_result)
1124 result =
reinterpret_cast<HOM_Vector2 *
>(vec2_result);
1128 void *vec3_result = NULL;
1129 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vec3_result,
1130 SWIGTYPE_p_HOM_Vector3, 0)) && vec3_result)
1132 result =
reinterpret_cast<HOM_Vector3 *
>(vec3_result);
1136 void *vec4_result = NULL;
1137 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vec4_result,
1138 SWIGTYPE_p_HOM_Vector4, 0)) && vec4_result)
1140 result =
reinterpret_cast<HOM_Vector4 *
>(vec4_result);
1144 void *matrix2_result = NULL;
1145 if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix2_result,
1146 SWIGTYPE_p_HOM_Matrix2, 0)) && matrix2_result)
1148 result =
reinterpret_cast<HOM_Matrix2 *
>(matrix2_result);
1152 void *matrix3_result = NULL;
1153 if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix3_result,
1154 SWIGTYPE_p_HOM_Matrix3, 0)) && matrix3_result)
1156 result =
reinterpret_cast<HOM_Matrix3 *
>(matrix3_result);
1160 void *matrix4_result = NULL;
1161 if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix4_result,
1162 SWIGTYPE_p_HOM_Matrix4, 0)) && matrix4_result)
1164 result =
reinterpret_cast<HOM_Matrix4 *
>(matrix4_result);
1168 std::vector<int> *int_vector_ptr = NULL;
1169 if (SWIG_IsOK(swig::asptr(input, (std::vector<int> **)NULL)) &&
1170 SWIG_IsOK(swig::asptr(input, &int_vector_ptr)))
1172 result = *int_vector_ptr;
1173 delete int_vector_ptr;
1177 std::vector<double> *double_vector_ptr = NULL;
1178 if (SWIG_IsOK(swig::asptr(input, (std::vector<double> **)NULL)) &&
1179 SWIG_IsOK(swig::asptr(input, &double_vector_ptr)))
1181 result = *double_vector_ptr;
1182 delete double_vector_ptr;
1186 std::vector<std::string> *string_vector_ptr = NULL;
1187 if (SWIG_IsOK(swig::asptr(input, (std::vector<std::string> **)NULL)) &&
1188 SWIG_IsOK(swig::asptr(input, &string_vector_ptr)))
1190 result = *string_vector_ptr;
1191 delete string_vector_ptr;
1195 std::vector<HOM_Vector2> *vector2_vector_ptr = NULL;
1196 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector2> **)NULL)) &&
1197 SWIG_IsOK(swig::asptr(input, &vector2_vector_ptr)))
1199 result = *vector2_vector_ptr;
1200 delete vector2_vector_ptr;
1204 std::vector<HOM_Vector3> *vector3_vector_ptr = NULL;
1205 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector3> **)NULL)) &&
1206 SWIG_IsOK(swig::asptr(input, &vector3_vector_ptr)))
1208 result = *vector3_vector_ptr;
1209 delete vector3_vector_ptr;
1213 std::vector<HOM_Vector4> *vector4_vector_ptr = NULL;
1214 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector4> **)NULL)) &&
1215 SWIG_IsOK(swig::asptr(input, &vector4_vector_ptr)))
1217 result = *vector4_vector_ptr;
1218 delete vector4_vector_ptr;
1222 std::vector<HOM_Matrix2> *matrix2_vector_ptr = NULL;
1223 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix2> **)NULL)) &&
1224 SWIG_IsOK(swig::asptr(input, &matrix2_vector_ptr)))
1226 result = *matrix2_vector_ptr;
1227 delete matrix2_vector_ptr;
1231 std::vector<HOM_Matrix3> *matrix3_vector_ptr = NULL;
1232 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix3> **)NULL)) &&
1233 SWIG_IsOK(swig::asptr(input, &matrix3_vector_ptr)))
1235 result = *matrix3_vector_ptr;
1236 delete matrix3_vector_ptr;
1240 std::vector<HOM_Matrix4> *matrix4_vector_ptr = NULL;
1241 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix4> **)NULL)) &&
1242 SWIG_IsOK(swig::asptr(input, &matrix4_vector_ptr)))
1244 result = *matrix4_vector_ptr;
1245 delete matrix4_vector_ptr;
1249 std::map<std::string, hboost::any> *map_ptr = NULL;
1250 if (SWIG_IsOK(swig::asptr(input, (std::map<std::string, hboost::any> **)NULL)) &&
1251 SWIG_IsOK(swig::asptr(input, &map_ptr)))
1258 std::vector<std::map<std::string, hboost::any> > *map_vector_ptr = NULL;
1259 if (SWIG_IsOK(swig::asptr(input, (std::vector<std::map<std::string, hboost::any> > **)NULL)) &&
1260 SWIG_IsOK(swig::asptr(input, &map_vector_ptr)))
1262 result = *map_vector_ptr;
1263 delete map_vector_ptr;
1276 HOMinterpreterObjectToUTOptionAny(InterpreterObject input,
1277 HOM_UTOptionAny &result)
1280 if (input == Py_None)
1282 result = (
void *)NULL;
1288 if (input == Py_True)
1294 if (input == Py_False)
1302 if (SWIG_IsOK(SWIG_AsVal_int(input, &int_result)))
1304 result = int_result;
1308 double double_result;
1309 if (SWIG_IsOK(SWIG_AsVal_double(input, &double_result)))
1311 result = double_result;
1316 if (SWIG_IsOK(SWIG_AsVal_std_string(input, &string_result)))
1318 result = string_result;
1322 void *vector2_result = NULL;
1323 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vector2_result,
1324 SWIGTYPE_p_HOM_Vector2, 0)) && vector2_result)
1326 result =
reinterpret_cast<HOM_Vector2 *
>(vector2_result);
1330 void *vector3_result = NULL;
1331 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vector3_result,
1332 SWIGTYPE_p_HOM_Vector3, 0)) && vector3_result)
1334 result =
reinterpret_cast<HOM_Vector3 *
>(vector3_result);
1338 void *vector4_result = NULL;
1339 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vector4_result,
1340 SWIGTYPE_p_HOM_Vector4, 0)) && vector4_result)
1342 result =
reinterpret_cast<HOM_Vector4 *
>(vector4_result);
1346 void *quat_result = NULL;
1347 if (SWIG_IsOK(SWIG_ConvertPtr(input, &quat_result,
1348 SWIGTYPE_p_HOM_Quaternion, 0)) && quat_result)
1354 void *matrix2_result = NULL;
1355 if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix2_result,
1356 SWIGTYPE_p_HOM_Matrix2, 0)) && matrix2_result)
1358 result =
reinterpret_cast<HOM_Matrix2 *
>(matrix2_result);
1362 void *matrix3_result = NULL;
1363 if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix3_result,
1364 SWIGTYPE_p_HOM_Matrix3, 0)) && matrix3_result)
1366 result =
reinterpret_cast<HOM_Matrix3 *
>(matrix3_result);
1370 void *matrix4_result = NULL;
1371 if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix4_result,
1372 SWIGTYPE_p_HOM_Matrix4, 0)) && matrix4_result)
1374 result =
reinterpret_cast<HOM_Matrix4 *
>(matrix4_result);
1378 void *geometry_result = NULL;
1379 if (SWIG_IsOK(SWIG_ConvertPtr(input, &geometry_result,
1380 SWIGTYPE_p_HOM_Geometry, 0)) && geometry_result)
1382 result =
reinterpret_cast<HOM_Geometry *
>(geometry_result);
1386 void *ramp_result = NULL;
1387 if (SWIG_IsOK(SWIG_ConvertPtr(input, &ramp_result,
1388 SWIGTYPE_p_HOM_Ramp, 0)) && ramp_result)
1390 result =
reinterpret_cast<HOM_Ramp *
>(ramp_result);
1394 std::vector<int> *int_vector_ptr = NULL;
1395 if (SWIG_IsOK(swig::asptr(input, (std::vector<int> **)NULL)) &&
1396 SWIG_IsOK(swig::asptr(input, &int_vector_ptr)))
1398 result = *int_vector_ptr;
1399 delete int_vector_ptr;
1403 std::vector<double> *double_vector_ptr = NULL;
1404 if (SWIG_IsOK(swig::asptr(input, (std::vector<double> **)NULL)) &&
1405 SWIG_IsOK(swig::asptr(input, &double_vector_ptr)))
1407 result = *double_vector_ptr;
1408 delete double_vector_ptr;
1412 std::vector<std::string> *string_vector_ptr = NULL;
1413 if (SWIG_IsOK(swig::asptr(input, (std::vector<std::string> **)NULL)) &&
1414 SWIG_IsOK(swig::asptr(input, &string_vector_ptr)))
1416 result = *string_vector_ptr;
1417 delete string_vector_ptr;
1421 std::vector<HOM_Vector2> *vector2_vector_ptr = NULL;
1422 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector2> **)NULL)) &&
1423 SWIG_IsOK(swig::asptr(input, &vector2_vector_ptr)))
1425 result = *vector2_vector_ptr;
1426 delete vector2_vector_ptr;
1430 std::vector<HOM_Vector3> *vector3_vector_ptr = NULL;
1431 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector3> **)NULL)) &&
1432 SWIG_IsOK(swig::asptr(input, &vector3_vector_ptr)))
1434 result = *vector3_vector_ptr;
1435 delete vector3_vector_ptr;
1439 std::vector<HOM_Vector4> *vector4_vector_ptr = NULL;
1440 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Vector4> **)NULL)) &&
1441 SWIG_IsOK(swig::asptr(input, &vector4_vector_ptr)))
1443 result = *vector4_vector_ptr;
1444 delete vector4_vector_ptr;
1448 std::vector<HOM_Matrix2> *matrix2_vector_ptr = NULL;
1449 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix2> **)NULL)) &&
1450 SWIG_IsOK(swig::asptr(input, &matrix2_vector_ptr)))
1452 result = *matrix2_vector_ptr;
1453 delete matrix2_vector_ptr;
1457 std::vector<HOM_Matrix3> *matrix3_vector_ptr = NULL;
1458 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix3> **)NULL)) &&
1459 SWIG_IsOK(swig::asptr(input, &matrix3_vector_ptr)))
1461 result = *matrix3_vector_ptr;
1462 delete matrix3_vector_ptr;
1466 std::vector<HOM_Matrix4> *matrix4_vector_ptr = NULL;
1467 if (SWIG_IsOK(swig::asptr(input, (std::vector<HOM_Matrix4> **)NULL)) &&
1468 SWIG_IsOK(swig::asptr(input, &matrix4_vector_ptr)))
1470 result = *matrix4_vector_ptr;
1471 delete matrix4_vector_ptr;
1484 struct traits_asptr<hboost::any>
1490 HOMinterpreterObjectToBoostAny(obj, *p);
1505 static InterpreterObject
1506 HOMboostAnyToInterpreterObject(
const hboost::any &result)
1509 return SWIG_Py_Void();
1511 if (result.type() ==
typeid(
int))
1512 return SWIG_From_int(hboost::any_cast<int>(result));
1514 if (result.type() ==
typeid(long))
1515 return SWIG_From_long(hboost::any_cast<long>(result));
1517 if (result.type() ==
typeid(
int64))
1518 return swig::from(hboost::any_cast<int64>(result));
1520 if (result.type() ==
typeid(float))
1521 return SWIG_From_float(hboost::any_cast<float>(result));
1523 if (result.type() ==
typeid(double))
1524 return SWIG_From_double(hboost::any_cast<double>(result));
1526 if (result.type() ==
typeid(bool))
1527 return SWIG_From_bool(hboost::any_cast<bool>(result));
1530 return SWIG_From_std_string(hboost::any_cast<std::string>(result));
1533 return SWIG_From_HOM_BinaryString(hboost::any_cast<HOM_BinaryString>(result));
1535 if (result.type() ==
typeid(std::map<std::string, hboost::any>))
1537 hboost::any_cast<std::map<std::string, hboost::any> >(result));
1539 if (result.type() ==
typeid(std::vector<int>))
1540 return swig::from(hboost::any_cast<std::vector<int> >(result));
1542 if (result.type() ==
typeid(std::vector<int64>))
1543 return swig::from(hboost::any_cast<std::vector<int64> >(result));
1545 if (result.type() ==
typeid(std::vector<float>))
1546 return swig::from(hboost::any_cast<std::vector<float> >(result));
1548 if (result.type() ==
typeid(std::vector<std::string>))
1549 return swig::from(hboost::any_cast<std::vector<std::string> >(result));
1551 if (result.type() ==
typeid(std::vector<double>))
1552 return swig::from(hboost::any_cast<std::vector<double> >(result));
1554 if (result.type() ==
typeid(std::vector<std::vector<float> >))
1556 hboost::any_cast<std::vector<std::vector<float> > >(result));
1558 if (result.type() ==
typeid(std::vector<std::vector<double> >))
1560 hboost::any_cast<std::vector<std::vector<double> > >(result));
1562 if (result.type() ==
typeid(std::vector<std::map<std::string, hboost::any> >))
1564 hboost::any_cast<std::vector<std::map<std::string, hboost::any> > >(result));
1569 return HOMconvertValueForInterpreter(
1570 hboost::any_cast<HOM_Vector2 *>(result), SWIG_POINTER_OWN);
1573 return HOMconvertValueForInterpreter(
1574 hboost::any_cast<HOM_Vector3 *>(result), SWIG_POINTER_OWN);
1577 return HOMconvertValueForInterpreter(
1578 hboost::any_cast<HOM_Vector4 *>(result), SWIG_POINTER_OWN);
1581 return HOMconvertValueForInterpreter(
1582 hboost::any_cast<HOM_Matrix2 *>(result), SWIG_POINTER_OWN);
1585 return HOMconvertValueForInterpreter(
1586 hboost::any_cast<HOM_Matrix3 *>(result), SWIG_POINTER_OWN);
1589 return HOMconvertValueForInterpreter(
1590 hboost::any_cast<HOM_Matrix4 *>(result), SWIG_POINTER_OWN);
1593 return HOMconvertValueForInterpreter(
1594 hboost::any_cast<HOM_NodeType *>(result), SWIG_POINTER_OWN);
1596 if (result.type() ==
typeid(
HOM_Ramp *))
1597 return HOMconvertValueForInterpreter(
1598 hboost::any_cast<HOM_Ramp *>(result), SWIG_POINTER_OWN);
1600 if (result.type() ==
typeid(
HOM_Color *))
1601 return HOMconvertValueForInterpreter(
1602 hboost::any_cast<HOM_Color *>(result), SWIG_POINTER_OWN);
1604 if (result.type() ==
typeid(
HOM_Parm *))
1605 return HOMconvertValueForInterpreter(
1606 hboost::any_cast<HOM_Parm *>(result), SWIG_POINTER_OWN);
1609 return HOMconvertValueForInterpreter(
1610 hboost::any_cast<HOM_EnumValue *>(result), 0);
1613 return HOMconvertValueForInterpreter(
1614 hboost::any_cast<HOM_Geometry *>(result), SWIG_POINTER_OWN);
1616 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Vector2> >))
1620 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Vector3> >))
1624 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Vector4> >))
1628 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Matrix2> >))
1632 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Matrix3> >))
1636 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Matrix4> >))
1640 #if UT_ASSERT_LEVEL > 0
1641 std::cout <<
"Unknown data type: "
1645 return SWIG_Py_Void();
1650 static InterpreterObject
1651 HOMDDSourceAnyToInterpreterObject(
const HOM_DDSourceAny &result)
1653 if (result.type() ==
typeid(
HOM_Node *))
1655 return HOMconvertValueForInterpreter(
1656 hboost::any_cast<HOM_Node *>(result), SWIG_POINTER_OWN);
1658 if (result.type() ==
typeid(
HOM_Parm *))
1660 return HOMconvertValueForInterpreter(
1661 hboost::any_cast<HOM_Parm *>(result), SWIG_POINTER_OWN);
1665 return HOMconvertValueForInterpreter(
1666 hboost::any_cast<HOM_GalleryEntry *>(result), SWIG_POINTER_OWN);
1669 return HOMboostAnyToInterpreterObject(result);
1676 struct traits_from<hboost::any>
1679 {
return HOMboostAnyToInterpreterObject(val); }
1683 static InterpreterObject
1684 HOMoptionsToInterpreterObject(
const UT_Options &options);
1686 static InterpreterObject
1687 HOMoptionEntryToInterpreterObject(
const UT_OptionEntry &option_entry)
1693 InterpreterObject result = NULL;
1695 switch (option_entry.
getType())
1698 return SWIG_From_int(
1702 return SWIG_From_bool(
1706 return SWIG_From_double(
1712 return SWIG_From_std_string(
1717 return HOMconvertValueForInterpreter(
1723 return HOMconvertValueForInterpreter(
1729 return HOMconvertValueForInterpreter(
1735 return HOMconvertValueForInterpreter(
1741 return HOMconvertValueForInterpreter(
1747 return HOMconvertValueForInterpreter(
1753 return HOMconvertValueForInterpreter(
1759 return HOMconvertValueForInterpreter(
1765 return HOMconvertValueForInterpreter(
1772 std::vector<int64> int_vector;
1774 static_cast<const UT_OptionInt64Array &>(option_entry)
1775 .getValue(), int_vector);
1776 return swig::from(int_vector);
1781 std::vector<double> double_vector;
1783 static_cast<const UT_OptionFpreal64Array &>(option_entry)
1784 .getValue(), double_vector);
1785 return swig::from(double_vector);
1790 std::vector<std::string> str_vector;
1791 UTarrayToStdVectorOfStrings(
1792 static_cast<const UT_OptionStringArray &>(option_entry)
1793 .getValue(), str_vector);
1794 return swig::from(str_vector);
1800 opt =
static_cast<const UT_OptionDict &
>(option_entry).getValue();
1801 return HOMoptionsToInterpreterObject(*opt.
options());
1807 InterpreterObject result = PyList_New(0);
1809 for (
auto && opt : optlist)
1811 PyList_Append(result, HOMoptionsToInterpreterObject(*opt.
options()));
1822 return result ? result : SWIG_Py_Void();
1826 static InterpreterObject
1827 HOMoptionsToInterpreterObject(
const UT_Options &options)
1833 InterpreterObject result = PyDict_New();
1839 InterpreterObject value=HOMoptionEntryToInterpreterObject(*it.entry());
1840 PyDict_SetItemString(result, it.name(),
value);
1847 static InterpreterObject
1848 HOMoptionsListToInterpreterObject(
const std::vector<UT_Options>& options)
1850 auto pysize = options.size();
1856 InterpreterObject list = PyList_New(pysize);
1857 for (
int i = 0; i < pysize; ++i)
1859 auto value = HOMoptionsToInterpreterObject(options[i]);
1861 PyList_SET_ITEM(list, i, value);
1872 template<
typename T>
1873 PyObject* HOMgetattr(T* hom_object,
const char *
name)
1881 PyObject *dict = context
1884 ? PyDict_GetItemString(dict, name) : NULL;
1887 if (!attribute && dict)
1890 attribute = name ? PyDict_GetItemString(dict, name) : NULL;
1896 return HOMincRef(attribute);
1902 error_message.
sprintf(
"'module' object has no attribute '%s'", name);
1903 PyErr_SetString(PyExc_AttributeError, error_message.
buffer());
1917 HOM_PyBuffer(InterpreterObject py_object)
1919 #if PY_VERSION_HEX >= 0x03000000
1920 myBytesObj =
nullptr;
1925 PyObject *
obj = py_object;
1927 #if PY_VERSION_HEX >= 0x03000000
1929 if (PyUnicode_Check(obj))
1932 PyUnicode_AsEncodedString(obj,
"utf-8",
"surrogateescape");
1938 #if PY_VERSION_HEX >= 0x02060000
1939 myUseNewAPI =
false;
1940 if (PyObject_CheckBuffer(obj))
1942 if (PyObject_GetBuffer(obj, &myPyBuffer, PyBUF_SIMPLE) < 0)
1944 #if PY_VERSION_HEX >= 0x03000000
1945 cleanBytesObject_();
1947 throw HOM_TypeError(
"failed to get readable buffer");
1951 myData = myPyBuffer.buf;
1952 myLength = myPyBuffer.len;
1957 #if PY_VERSION_HEX >= 0x03000000
1958 cleanBytesObject_();
1959 throw HOM_TypeError(
"failed to get readable buffer");
1963 if (!PyObject_CheckReadBuffer(obj))
1964 throw HOM_TypeError(
"expected a readable buffer");
1966 if (PyObject_AsReadBuffer(obj, &myData, &myLength) < 0)
1967 throw HOM_TypeError(
"failed to get readable buffer");
1973 #if PY_VERSION_HEX >= 0x03000000
1974 cleanBytesObject_();
1977 #if PY_VERSION_HEX >= 0x02060000
1979 PyBuffer_Release(&myPyBuffer);
1983 #if PY_VERSION_HEX >= 0x03000000
1984 void cleanBytesObject_()
1989 Py_DECREF(myBytesObj);
1990 myBytesObj =
nullptr;
1994 #if PY_VERSION_HEX >= 0x03000000
1995 PyObject *myBytesObj;
1998 #if PY_VERSION_HEX >= 0x02060000
2000 Py_buffer myPyBuffer;
2003 Py_ssize_t myLength;
2012 template <
typename T>
2014 HOMattribValue(T &geo_element,
HOM_Attrib &hom_attrib)
2016 InterpreterObject result = NULL;
2017 const bool scalar = (hom_attrib.
size() == 1 && !hom_attrib.
isArrayType());
2020 case HOM_attribData::Int_Id:
2022 result = swig::from(
2023 hboost::any_cast<int64>(geo_element.intAttribValue(hom_attrib)));
2025 result = swig::from(
2026 hboost::any_cast<std::vector<int64> >(
2027 geo_element.intListAttribValue(hom_attrib)));
2030 case HOM_attribData::Float_Id:
2032 result = SWIG_From_double(geo_element.floatAttribValue(hom_attrib));
2034 result = swig::from(geo_element.floatListAttribValue(hom_attrib));
2037 case HOM_attribData::String_Id:
2039 result = SWIG_From_std_string(
2040 geo_element.stringAttribValue(hom_attrib));
2042 result = swig::from(geo_element.stringListAttribValue(hom_attrib));
2045 case HOM_attribData::Dict_Id:
2047 result = swig::from(geo_element.dictAttribValue(hom_attrib));
2049 result = swig::from(geo_element.dictListAttribValue(hom_attrib));
2060 HOMlookUpAttrib(T &geo_element,
const char *name);
2063 HOMlookUpAttrib(
HOM_Point &point,
const char *name)
2067 HOMlookUpAttrib(
HOM_Prim &prim,
const char *name)
2071 HOMlookUpAttrib(
HOM_Vertex &vertex,
const char *name)
2075 HOMlookUpAttrib(
HOM_Geometry &geometry,
const char *name)
2078 template <
typename T>
2080 HOMattribValue(T &geo_element,
const char *name)
2083 HOM_Attrib *hom_attrib = HOMlookUpAttrib(geo_element, name);
2085 throw HOM_OperationFailed();
2087 InterpreterObject result = HOMattribValue(geo_element, *hom_attrib);
2097 static InterpreterObject
2102 case HOM_parmData::Int_Id:
2104 case HOM_parmData::Float_Id:
2106 case HOM_parmData::String_Id:
2108 case HOM_parmData::Ramp_Id:
2109 return SWIG_NewPointerObj(
2110 (
void*)parm.
evalAsRamp(), SWIGTYPE_p_HOM_Ramp, SWIG_POINTER_OWN);
2111 case HOM_parmData::Data_Id:
2115 return SWIG_NewPointerObj(
2116 (
void*)parm.
evalAsGeometry(), SWIGTYPE_p_HOM_Geometry, SWIG_POINTER_OWN);
2120 return SWIG_Py_Void();
2123 static InterpreterObject
2124 HOMevalParmAtFrame(
HOM_Parm &parm,
double frame)
2128 case HOM_parmData::Int_Id:
2130 case HOM_parmData::Float_Id:
2132 case HOM_parmData::String_Id:
2134 case HOM_parmData::Ramp_Id:
2135 return SWIG_NewPointerObj(
2137 SWIGTYPE_p_HOM_Ramp, SWIG_POINTER_OWN);
2138 case HOM_parmData::Data_Id:
2142 return SWIG_NewPointerObj(
2144 SWIGTYPE_p_HOM_Geometry, SWIG_POINTER_OWN);
2148 return SWIG_Py_Void();
2151 static InterpreterObject
2156 case HOM_parmData::Int_Id:
2158 case HOM_parmData::Float_Id:
2160 case HOM_parmData::String_Id:
2162 case HOM_parmData::Ramp_Id:
2164 case HOM_parmData::Data_Id:
2166 == HOM_dataParmType::KeyValueDictionary_Id)
2175 return SWIG_Py_Void();
2178 static InterpreterObject
2179 HOMevalParmTupleAtFrame(
HOM_ParmTuple &parm_tuple,
double frame)
2183 case HOM_parmData::Int_Id:
2185 case HOM_parmData::Float_Id:
2187 case HOM_parmData::String_Id:
2189 case HOM_parmData::Ramp_Id:
2191 case HOM_parmData::Data_Id:
2193 == HOM_dataParmType::KeyValueDictionary_Id)
2202 return SWIG_Py_Void();
2205 static InterpreterObject
2210 case HOM_parmData::Int_Id:
2212 case HOM_parmData::Float_Id:
2214 case HOM_parmData::String_Id:
2216 case HOM_parmData::Ramp_Id:
2217 return SWIG_NewPointerObj(
2218 (
void*)visualizer.
evalParmAsRamp(parm_name), SWIGTYPE_p_HOM_Ramp,
2223 return SWIG_Py_Void();
UT_Matrix4T< double > UT_DMatrix4
virtual std::vector< HOM_ElemPtr< HOM_Geometry > > evalAsGeometries()=0
UT_Matrix3T< double > UT_DMatrix3
virtual std::vector< int > evalAsIntsAtFrame(double frame)=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
virtual int parmDataTypeEnumId()=0
virtual double evalAsFloat()=0
GLenum GLenum GLenum input
virtual std::vector< int > evalAsInts()=0
SYS_FORCE_INLINE const char * buffer() const
UT_UniquePtr< T > HOMdel(T *hom_object)
GLuint const GLchar * name
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)
virtual std::map< std::string, std::string > evalAsJSONMapAtFrame(double frame)=0
virtual HOM_Geometry * geometry()=0
virtual HOM_Geometry * evalAsGeometryAtFrame(double frame)=0
virtual UT_OptionType getType() const
UT_Matrix2T< double > UT_DMatrix2
virtual std::vector< std::map< std::string, std::string > > evalAsJSONMapsAtFrame(double frame)=0
GLsizei const GLchar *const * string
virtual std::map< std::string, std::string > evalAsJSONMap()=0
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
GLuint GLenum GLsizei GLsizei GLboolean packed
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
virtual int evalAsInt()=0
virtual std::vector< double > evalAsFloats()=0
A map of string to various well defined value types.
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)
SYS_FORCE_INLINE const UT_Options * options() const
virtual bool isManager(bool include_management_types=true)=0
GLsizei const GLfloat * value
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
virtual HOM_EnumValue & dataType()=0
virtual std::vector< HOM_ElemPtr< HOM_Ramp > > evalAsRamps()=0
virtual int evalParmAsInt(const char *parm_name)=0
HOM_API HOM_Module & HOM()
virtual std::vector< std::string > evalAsStringsAtFrame(double frame)=0
virtual std::string evalAsString()=0
virtual HOM_Geometry * evalAsGeometry()=0
virtual HOM_Geometry * geometry()=0