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::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);
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);
621 return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
624 template <> InterpreterObject
625 HOMconvertValueForInterpreter<HOM_SopVerb*>(
628 return SWIG_NewPointerObj(verb, SWIGTYPE_p_HOM_SopVerb, own);
631 template <> InterpreterObject
632 HOMconvertValueForInterpreter<HOM_Geometry*>(
635 return SWIG_NewPointerObj(geo, SWIGTYPE_p_HOM_Geometry, own);
638 template <> InterpreterObject
639 HOMconvertValueForInterpreter<HOM_NetworkItem*>(
644 switch (item->networkItemType().id())
646 case HOM_networkItemType::Node_Id:
649 return HOMconvertValueForInterpreter(
650 dynamic_cast<HOM_Node* const>(item), own);
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);
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);
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);
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);
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);
682 return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_NetworkItem, own);
685 template <> InterpreterObject
686 HOMconvertValueForInterpreter<HOM_NetworkMovableItem*>(
690 return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_NetworkMovableItem, own);
692 return HOMconvertValueForInterpreter<HOM_NetworkItem *>(item, own);
695 template <> InterpreterObject
696 HOMconvertValueForInterpreter<
697 std::vector<HOM_ElemPtr<HOM_NodeConnection> >*>(
698 std::vector<HOM_ElemPtr<HOM_NodeConnection> > *
const &list,
701 return swig::from(*list);
704 template <> InterpreterObject
705 HOMconvertValueForInterpreter<HOM_DopData*>(
HOM_DopData *
const &
data,
int own)
710 return SWIG_NewPointerObj(
711 (
void *)dop_object, SWIGTYPE_p_HOM_DopObject, own);
715 if (dop_relationship)
716 return SWIG_NewPointerObj(
717 (
void *)dop_relationship, SWIGTYPE_p_HOM_DopRelationship, own);
719 return SWIG_NewPointerObj(data, SWIGTYPE_p_HOM_DopData, own);
722 template <> InterpreterObject
723 HOMconvertValueForInterpreter<HOM_RadialItem*>(
728 switch (item->type().id())
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);
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);
745 return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_RadialItem, own);
748 template <> InterpreterObject
749 HOMconvertValueForInterpreter<HOM_EnumValue*>(
756 return SWIG_NewPointerObj(
757 (
void*)dynamic_cast<const HOM_EnumValue* const>(item),
758 SWIGTYPE_p_HOM_EnumValue, 0);
763 #define HOM_PROVIDE_SWIG_LOOKUP(type) \
764 template <> InterpreterObject HOMconvertValueForInterpreter<type*>( \
765 type* const& value, int own) \
767 return SWIG_NewPointerObj(SWIG_as_voidptr(value), \
768 SWIGTYPE_p_ ## type, own); \
862 #define HOM_CONVERT_AND_CATCH \
865 $result = HOMconvertValueForInterpreter($1, $owner); \
869 (void)hom::raise_swig_exception(); \
875 HOM_CONVERT_AND_CATCH
879 HOM_CONVERT_AND_CATCH
883 HOM_CONVERT_AND_CATCH
887 HOM_CONVERT_AND_CATCH
891 HOM_CONVERT_AND_CATCH
895 HOM_CONVERT_AND_CATCH
899 HOM_CONVERT_AND_CATCH
903 HOM_CONVERT_AND_CATCH
907 HOM_CONVERT_AND_CATCH
911 HOM_CONVERT_AND_CATCH
915 HOM_CONVERT_AND_CATCH
919 HOM_CONVERT_AND_CATCH
923 HOM_CONVERT_AND_CATCH
930 %typemap(
throws) HOM_TypeError %{
931 SWIG_exception_fail(SWIG_TypeError, $1.instanceMessage().c_str());
934 %typemap(
throws) HOM_ValueError %{
935 SWIG_exception_fail(SWIG_ValueError, $1.instanceMessage().c_str());
940 PyErr_SetObject(PyExc_SystemExit, SWIG_From_int($1.code()));
950 %typemap(
in) hboost::
any {
955 HOMinterpreterObjectToBoostAny($input, $1);
959 (
void)hom::raise_swig_exception();
971 HOMinterpreterObjectToUTOptionAny($input, $1);
975 (
void)hom::raise_swig_exception();
980 %typemap(out) hboost::any {
983 $result = HOMboostAnyToInterpreterObject($1);
987 (
void)hom::raise_swig_exception();
994 $result = HOMDDSourceAnyToInterpreterObject($1);
998 (
void)hom::raise_swig_exception();
1006 $result = HOMincRef((InterpreterObject)$1.opaqueObject());
1016 struct traits_from<PY_OpaqueObject>
1018 static PyObject *from(
const PY_OpaqueObject &
val)
1020 return HOMincRef((InterpreterObject)val.
opaqueObject());
1036 if (input == Py_None)
1038 result = (
void *)NULL;
1044 if (input == Py_True)
1050 if (input == Py_False)
1058 if (SWIG_IsOK(SWIG_AsVal_int(input, &int_result)))
1060 result = int_result;
1064 double double_result;
1065 if (SWIG_IsOK(SWIG_AsVal_double(input, &double_result)))
1067 result = double_result;
1072 if (SWIG_IsOK(SWIG_AsVal_std_string(input, &string_result)))
1074 result = string_result;
1078 void *geometry_result = NULL;
1079 if (SWIG_IsOK(SWIG_ConvertPtr(input, &geometry_result,
1080 SWIGTYPE_p_HOM_Geometry, 0)) && geometry_result)
1082 result =
reinterpret_cast<HOM_Geometry *
>(geometry_result);
1086 void *ramp_result = NULL;
1087 if (SWIG_IsOK(SWIG_ConvertPtr(input, &ramp_result,
1088 SWIGTYPE_p_HOM_Ramp, 0)) && ramp_result)
1090 result =
reinterpret_cast<HOM_Ramp *
>(ramp_result);
1094 void *color_result = NULL;
1095 if (SWIG_IsOK(SWIG_ConvertPtr(input, &color_result,
1096 SWIGTYPE_p_HOM_Color, 0)) && color_result)
1098 result =
reinterpret_cast<HOM_Color *
>(color_result);
1102 void *parm_result = NULL;
1103 if (SWIG_IsOK(SWIG_ConvertPtr(input, &parm_result,
1104 SWIGTYPE_p_HOM_Parm, 0)) && parm_result)
1106 result =
reinterpret_cast<HOM_Parm *
>(parm_result);
1110 void *enum_result = NULL;
1111 if (SWIG_IsOK(SWIG_ConvertPtr(input, &enum_result,
1112 SWIGTYPE_p_HOM_EnumValue, 0)) && enum_result)
1118 void *vec2_result = NULL;
1119 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vec2_result,
1120 SWIGTYPE_p_HOM_Vector2, 0)) && vec2_result)
1122 result =
reinterpret_cast<HOM_Vector2 *
>(vec2_result);
1126 void *vec3_result = NULL;
1127 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vec3_result,
1128 SWIGTYPE_p_HOM_Vector3, 0)) && vec3_result)
1130 result =
reinterpret_cast<HOM_Vector3 *
>(vec3_result);
1134 void *vec4_result = NULL;
1135 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vec4_result,
1136 SWIGTYPE_p_HOM_Vector4, 0)) && vec4_result)
1138 result =
reinterpret_cast<HOM_Vector4 *
>(vec4_result);
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)))
1146 result = *int_vector_ptr;
1147 delete int_vector_ptr;
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)))
1155 result = *double_vector_ptr;
1156 delete double_vector_ptr;
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)))
1164 result = *string_vector_ptr;
1165 delete string_vector_ptr;
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)))
1173 result = *vector2_vector_ptr;
1174 delete vector2_vector_ptr;
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)))
1182 result = *vector3_vector_ptr;
1183 delete vector3_vector_ptr;
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)))
1191 result = *vector4_vector_ptr;
1192 delete vector4_vector_ptr;
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)))
1200 result = *matrix2_vector_ptr;
1201 delete matrix2_vector_ptr;
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)))
1209 result = *matrix3_vector_ptr;
1210 delete matrix3_vector_ptr;
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)))
1218 result = *matrix4_vector_ptr;
1219 delete matrix4_vector_ptr;
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)))
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)))
1236 result = *map_vector_ptr;
1237 delete map_vector_ptr;
1250 HOMinterpreterObjectToUTOptionAny(InterpreterObject input,
1251 HOM_UTOptionAny &result)
1254 if (input == Py_None)
1256 result = (
void *)NULL;
1262 if (input == Py_True)
1268 if (input == Py_False)
1276 if (SWIG_IsOK(SWIG_AsVal_int(input, &int_result)))
1278 result = int_result;
1282 double double_result;
1283 if (SWIG_IsOK(SWIG_AsVal_double(input, &double_result)))
1285 result = double_result;
1290 if (SWIG_IsOK(SWIG_AsVal_std_string(input, &string_result)))
1292 result = string_result;
1296 void *vector2_result = NULL;
1297 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vector2_result,
1298 SWIGTYPE_p_HOM_Vector2, 0)) && vector2_result)
1300 result =
reinterpret_cast<HOM_Vector2 *
>(vector2_result);
1304 void *vector3_result = NULL;
1305 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vector3_result,
1306 SWIGTYPE_p_HOM_Vector3, 0)) && vector3_result)
1308 result =
reinterpret_cast<HOM_Vector3 *
>(vector3_result);
1312 void *vector4_result = NULL;
1313 if (SWIG_IsOK(SWIG_ConvertPtr(input, &vector4_result,
1314 SWIGTYPE_p_HOM_Vector4, 0)) && vector4_result)
1316 result =
reinterpret_cast<HOM_Vector4 *
>(vector4_result);
1320 void *quat_result = NULL;
1321 if (SWIG_IsOK(SWIG_ConvertPtr(input, &quat_result,
1322 SWIGTYPE_p_HOM_Quaternion, 0)) && quat_result)
1328 void *matrix2_result = NULL;
1329 if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix2_result,
1330 SWIGTYPE_p_HOM_Matrix2, 0)) && matrix2_result)
1332 result =
reinterpret_cast<HOM_Matrix2 *
>(matrix2_result);
1336 void *matrix3_result = NULL;
1337 if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix3_result,
1338 SWIGTYPE_p_HOM_Matrix3, 0)) && matrix3_result)
1340 result =
reinterpret_cast<HOM_Matrix3 *
>(matrix3_result);
1344 void *matrix4_result = NULL;
1345 if (SWIG_IsOK(SWIG_ConvertPtr(input, &matrix4_result,
1346 SWIGTYPE_p_HOM_Matrix4, 0)) && matrix4_result)
1348 result =
reinterpret_cast<HOM_Matrix4 *
>(matrix4_result);
1352 void *geometry_result = NULL;
1353 if (SWIG_IsOK(SWIG_ConvertPtr(input, &geometry_result,
1354 SWIGTYPE_p_HOM_Geometry, 0)) && geometry_result)
1356 result =
reinterpret_cast<HOM_Geometry *
>(geometry_result);
1360 void *ramp_result = NULL;
1361 if (SWIG_IsOK(SWIG_ConvertPtr(input, &ramp_result,
1362 SWIGTYPE_p_HOM_Ramp, 0)) && ramp_result)
1364 result =
reinterpret_cast<HOM_Ramp *
>(ramp_result);
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)))
1372 result = *int_vector_ptr;
1373 delete int_vector_ptr;
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)))
1381 result = *double_vector_ptr;
1382 delete double_vector_ptr;
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)))
1390 result = *string_vector_ptr;
1391 delete string_vector_ptr;
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)))
1399 result = *vector2_vector_ptr;
1400 delete vector2_vector_ptr;
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)))
1408 result = *vector3_vector_ptr;
1409 delete vector3_vector_ptr;
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)))
1417 result = *vector4_vector_ptr;
1418 delete vector4_vector_ptr;
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)))
1426 result = *matrix2_vector_ptr;
1427 delete matrix2_vector_ptr;
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)))
1435 result = *matrix3_vector_ptr;
1436 delete matrix3_vector_ptr;
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)))
1444 result = *matrix4_vector_ptr;
1445 delete matrix4_vector_ptr;
1458 struct traits_asptr<hboost::any>
1464 HOMinterpreterObjectToBoostAny(obj, *p);
1479 static InterpreterObject
1480 HOMboostAnyToInterpreterObject(
const hboost::any &result)
1483 return SWIG_Py_Void();
1485 if (result.type() ==
typeid(
int))
1486 return SWIG_From_int(hboost::any_cast<int>(result));
1488 if (result.type() ==
typeid(long))
1489 return SWIG_From_long(hboost::any_cast<long>(result));
1491 if (result.type() ==
typeid(
int64))
1492 return swig::from(hboost::any_cast<int64>(result));
1494 if (result.type() ==
typeid(float))
1495 return SWIG_From_float(hboost::any_cast<float>(result));
1497 if (result.type() ==
typeid(double))
1498 return SWIG_From_double(hboost::any_cast<double>(result));
1500 if (result.type() ==
typeid(bool))
1501 return SWIG_From_bool(hboost::any_cast<bool>(result));
1504 return SWIG_From_std_string(hboost::any_cast<std::string>(result));
1507 return SWIG_From_HOM_BinaryString(hboost::any_cast<HOM_BinaryString>(result));
1509 if (result.type() ==
typeid(std::map<std::string, hboost::any>))
1511 hboost::any_cast<std::map<std::string, hboost::any> >(result));
1513 if (result.type() ==
typeid(std::vector<int>))
1514 return swig::from(hboost::any_cast<std::vector<int> >(result));
1516 if (result.type() ==
typeid(std::vector<int64>))
1517 return swig::from(hboost::any_cast<std::vector<int64> >(result));
1519 if (result.type() ==
typeid(std::vector<float>))
1520 return swig::from(hboost::any_cast<std::vector<float> >(result));
1522 if (result.type() ==
typeid(std::vector<std::string>))
1523 return swig::from(hboost::any_cast<std::vector<std::string> >(result));
1525 if (result.type() ==
typeid(std::vector<double>))
1526 return swig::from(hboost::any_cast<std::vector<double> >(result));
1528 if (result.type() ==
typeid(std::vector<std::vector<float> >))
1530 hboost::any_cast<std::vector<std::vector<float> > >(result));
1532 if (result.type() ==
typeid(std::vector<std::vector<double> >))
1534 hboost::any_cast<std::vector<std::vector<double> > >(result));
1536 if (result.type() ==
typeid(std::vector<std::map<std::string, hboost::any> >))
1538 hboost::any_cast<std::vector<std::map<std::string, hboost::any> > >(result));
1543 return HOMconvertValueForInterpreter(
1544 hboost::any_cast<HOM_Vector2 *>(result), SWIG_POINTER_OWN);
1547 return HOMconvertValueForInterpreter(
1548 hboost::any_cast<HOM_Vector3 *>(result), SWIG_POINTER_OWN);
1551 return HOMconvertValueForInterpreter(
1552 hboost::any_cast<HOM_Vector4 *>(result), SWIG_POINTER_OWN);
1555 return HOMconvertValueForInterpreter(
1556 hboost::any_cast<HOM_Matrix2 *>(result), SWIG_POINTER_OWN);
1559 return HOMconvertValueForInterpreter(
1560 hboost::any_cast<HOM_Matrix3 *>(result), SWIG_POINTER_OWN);
1563 return HOMconvertValueForInterpreter(
1564 hboost::any_cast<HOM_Matrix4 *>(result), SWIG_POINTER_OWN);
1567 return HOMconvertValueForInterpreter(
1568 hboost::any_cast<HOM_NodeType *>(result), SWIG_POINTER_OWN);
1570 if (result.type() ==
typeid(
HOM_Ramp *))
1571 return HOMconvertValueForInterpreter(
1572 hboost::any_cast<HOM_Ramp *>(result), SWIG_POINTER_OWN);
1574 if (result.type() ==
typeid(
HOM_Color *))
1575 return HOMconvertValueForInterpreter(
1576 hboost::any_cast<HOM_Color *>(result), SWIG_POINTER_OWN);
1578 if (result.type() ==
typeid(
HOM_Parm *))
1579 return HOMconvertValueForInterpreter(
1580 hboost::any_cast<HOM_Parm *>(result), SWIG_POINTER_OWN);
1583 return HOMconvertValueForInterpreter(
1584 hboost::any_cast<HOM_EnumValue *>(result), 0);
1587 return HOMconvertValueForInterpreter(
1588 hboost::any_cast<HOM_Geometry *>(result), SWIG_POINTER_OWN);
1590 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Vector2> >))
1594 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Vector3> >))
1598 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Vector4> >))
1602 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Matrix2> >))
1606 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Matrix3> >))
1610 if (result.type() ==
typeid(std::vector<HOM_ElemPtr<HOM_Matrix4> >))
1614 #if UT_ASSERT_LEVEL > 0
1615 std::cout <<
"Unknown data type: "
1619 return SWIG_Py_Void();
1624 static InterpreterObject
1625 HOMDDSourceAnyToInterpreterObject(
const HOM_DDSourceAny &result)
1627 if (result.type() ==
typeid(
HOM_Node *))
1629 return HOMconvertValueForInterpreter(
1630 hboost::any_cast<HOM_Node *>(result), SWIG_POINTER_OWN);
1632 if (result.type() ==
typeid(
HOM_Parm *))
1634 return HOMconvertValueForInterpreter(
1635 hboost::any_cast<HOM_Parm *>(result), SWIG_POINTER_OWN);
1639 return HOMconvertValueForInterpreter(
1640 hboost::any_cast<HOM_GalleryEntry *>(result), SWIG_POINTER_OWN);
1643 return HOMboostAnyToInterpreterObject(result);
1650 struct traits_from<hboost::any>
1653 {
return HOMboostAnyToInterpreterObject(val); }
1657 static InterpreterObject
1658 HOMoptionsToInterpreterObject(
const UT_Options &options);
1660 static InterpreterObject
1661 HOMoptionEntryToInterpreterObject(
const UT_OptionEntry &option_entry)
1667 InterpreterObject result = NULL;
1669 switch (option_entry.
getType())
1672 return SWIG_From_int(
1676 return SWIG_From_bool(
1680 return SWIG_From_double(
1686 return SWIG_From_std_string(
1691 return HOMconvertValueForInterpreter(
1697 return HOMconvertValueForInterpreter(
1703 return HOMconvertValueForInterpreter(
1709 return HOMconvertValueForInterpreter(
1715 return HOMconvertValueForInterpreter(
1721 return HOMconvertValueForInterpreter(
1727 return HOMconvertValueForInterpreter(
1733 return HOMconvertValueForInterpreter(
1739 return HOMconvertValueForInterpreter(
1746 std::vector<int64> int_vector;
1748 static_cast<const UT_OptionInt64Array &>(option_entry)
1749 .getValue(), int_vector);
1750 return swig::from(int_vector);
1755 std::vector<double> double_vector;
1757 static_cast<const UT_OptionFpreal64Array &>(option_entry)
1758 .getValue(), double_vector);
1759 return swig::from(double_vector);
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);
1774 opt =
static_cast<const UT_OptionDict &
>(option_entry).getValue();
1775 return HOMoptionsToInterpreterObject(*opt.
options());
1781 InterpreterObject result = PyList_New(0);
1783 for (
auto && opt : optlist)
1785 PyList_Append(result, HOMoptionsToInterpreterObject(*opt.
options()));
1796 return result ? result : SWIG_Py_Void();
1800 static InterpreterObject
1801 HOMoptionsToInterpreterObject(
const UT_Options &options)
1807 InterpreterObject result = PyDict_New();
1813 InterpreterObject value=HOMoptionEntryToInterpreterObject(*it.entry());
1814 PyDict_SetItemString(result, it.name(),
value);
1821 static InterpreterObject
1822 HOMoptionsListToInterpreterObject(
const std::vector<UT_Options>& options)
1824 auto pysize = options.size();
1830 InterpreterObject list = PyList_New(pysize);
1831 for (
int i = 0; i < pysize; ++i)
1833 auto value = HOMoptionsToInterpreterObject(options[i]);
1835 PyList_SET_ITEM(list, i, value);
1846 template<
typename T>
1847 PyObject* HOMgetattr(T* hom_object,
const char *
name)
1855 PyObject *dict = context
1858 ? PyDict_GetItemString(dict, name) : NULL;
1861 if (!attribute && dict)
1864 attribute = name ? PyDict_GetItemString(dict, name) : NULL;
1870 return HOMincRef(attribute);
1876 error_message.
sprintf(
"'module' object has no attribute '%s'", name);
1877 PyErr_SetString(PyExc_AttributeError, error_message.
buffer());
1891 HOM_PyBuffer(InterpreterObject py_object)
1893 #if PY_VERSION_HEX >= 0x03000000
1894 myBytesObj =
nullptr;
1899 PyObject *
obj = py_object;
1901 #if PY_VERSION_HEX >= 0x03000000
1903 if (PyUnicode_Check(obj))
1906 PyUnicode_AsEncodedString(obj,
"utf-8",
"surrogateescape");
1912 #if PY_VERSION_HEX >= 0x02060000
1913 myUseNewAPI =
false;
1914 if (PyObject_CheckBuffer(obj))
1916 if (PyObject_GetBuffer(obj, &myPyBuffer, PyBUF_SIMPLE) < 0)
1918 #if PY_VERSION_HEX >= 0x03000000
1919 cleanBytesObject_();
1921 throw HOM_TypeError(
"failed to get readable buffer");
1925 myData = myPyBuffer.buf;
1926 myLength = myPyBuffer.len;
1931 #if PY_VERSION_HEX >= 0x03000000
1932 cleanBytesObject_();
1933 throw HOM_TypeError(
"failed to get readable buffer");
1937 if (!PyObject_CheckReadBuffer(obj))
1938 throw HOM_TypeError(
"expected a readable buffer");
1940 if (PyObject_AsReadBuffer(obj, &myData, &myLength) < 0)
1941 throw HOM_TypeError(
"failed to get readable buffer");
1947 #if PY_VERSION_HEX >= 0x03000000
1948 cleanBytesObject_();
1951 #if PY_VERSION_HEX >= 0x02060000
1953 PyBuffer_Release(&myPyBuffer);
1957 #if PY_VERSION_HEX >= 0x03000000
1958 void cleanBytesObject_()
1963 Py_DECREF(myBytesObj);
1964 myBytesObj =
nullptr;
1968 #if PY_VERSION_HEX >= 0x03000000
1969 PyObject *myBytesObj;
1972 #if PY_VERSION_HEX >= 0x02060000
1974 Py_buffer myPyBuffer;
1977 Py_ssize_t myLength;
1986 template <
typename T>
1988 HOMattribValue(T &geo_element,
HOM_Attrib &hom_attrib)
1990 InterpreterObject result = NULL;
1991 const bool scalar = (hom_attrib.
size() == 1 && !hom_attrib.
isArrayType());
1994 case HOM_attribData::Int_Id:
1996 result = swig::from(
1997 hboost::any_cast<int64>(geo_element.intAttribValue(hom_attrib)));
1999 result = swig::from(
2000 hboost::any_cast<std::vector<int64> >(
2001 geo_element.intListAttribValue(hom_attrib)));
2004 case HOM_attribData::Float_Id:
2006 result = SWIG_From_double(geo_element.floatAttribValue(hom_attrib));
2008 result = swig::from(geo_element.floatListAttribValue(hom_attrib));
2011 case HOM_attribData::String_Id:
2013 result = SWIG_From_std_string(
2014 geo_element.stringAttribValue(hom_attrib));
2016 result = swig::from(geo_element.stringListAttribValue(hom_attrib));
2019 case HOM_attribData::Dict_Id:
2021 result = swig::from(geo_element.dictAttribValue(hom_attrib));
2023 result = swig::from(geo_element.dictListAttribValue(hom_attrib));
2034 HOMlookUpAttrib(T &geo_element,
const char *name);
2037 HOMlookUpAttrib(
HOM_Point &point,
const char *name)
2041 HOMlookUpAttrib(
HOM_Prim &prim,
const char *name)
2045 HOMlookUpAttrib(
HOM_Vertex &vertex,
const char *name)
2049 HOMlookUpAttrib(
HOM_Geometry &geometry,
const char *name)
2052 template <
typename T>
2054 HOMattribValue(T &geo_element,
const char *name)
2057 HOM_Attrib *hom_attrib = HOMlookUpAttrib(geo_element, name);
2059 throw HOM_OperationFailed();
2061 InterpreterObject result = HOMattribValue(geo_element, *hom_attrib);
2071 static InterpreterObject
2076 case HOM_parmData::Int_Id:
2078 case HOM_parmData::Float_Id:
2080 case HOM_parmData::String_Id:
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:
2089 return SWIG_NewPointerObj(
2090 (
void*)parm.
evalAsGeometry(), SWIGTYPE_p_HOM_Geometry, SWIG_POINTER_OWN);
2094 return SWIG_Py_Void();
2097 static InterpreterObject
2098 HOMevalParmAtFrame(
HOM_Parm &parm,
double frame)
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(
2111 SWIGTYPE_p_HOM_Ramp, SWIG_POINTER_OWN);
2112 case HOM_parmData::Data_Id:
2116 return SWIG_NewPointerObj(
2118 SWIGTYPE_p_HOM_Geometry, SWIG_POINTER_OWN);
2122 return SWIG_Py_Void();
2125 static InterpreterObject
2130 case HOM_parmData::Int_Id:
2132 case HOM_parmData::Float_Id:
2134 case HOM_parmData::String_Id:
2136 case HOM_parmData::Ramp_Id:
2138 case HOM_parmData::Data_Id:
2140 == HOM_dataParmType::KeyValueDictionary_Id)
2149 return SWIG_Py_Void();
2152 static InterpreterObject
2153 HOMevalParmTupleAtFrame(
HOM_ParmTuple &parm_tuple,
double frame)
2157 case HOM_parmData::Int_Id:
2159 case HOM_parmData::Float_Id:
2161 case HOM_parmData::String_Id:
2163 case HOM_parmData::Ramp_Id:
2165 case HOM_parmData::Data_Id:
2167 == HOM_dataParmType::KeyValueDictionary_Id)
2176 return SWIG_Py_Void();
2179 static InterpreterObject
2184 case HOM_parmData::Int_Id:
2186 case HOM_parmData::Float_Id:
2188 case HOM_parmData::String_Id:
2190 case HOM_parmData::Ramp_Id:
2191 return SWIG_NewPointerObj(
2192 (
void*)visualizer.
evalParmAsRamp(parm_name), SWIGTYPE_p_HOM_Ramp,
2197 return SWIG_Py_Void();
UT_Matrix4T< double > UT_DMatrix4
virtual std::vector< HOM_ElemPtr< HOM_Geometry > > evalAsGeometries()=0
UT_Matrix3T< double > UT_DMatrix3
GLenum GLenum GLenum input
virtual std::vector< int > evalAsIntsAtFrame(double frame)=0
GLuint const GLchar * name
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
GLuint const GLfloat * val
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)
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
GLint GLenum GLsizei GLint GLsizei const void * data
virtual UT_OptionType getType() const
UT_Matrix2T< double > UT_DMatrix2
virtual std::vector< std::map< std::string, std::string > > evalAsJSONMapsAtFrame(double frame)=0
virtual std::map< std::string, std::string > evalAsJSONMap()=0
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
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
GLsizei const GLchar *const * string
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
GLuint GLenum GLsizei GLsizei GLboolean packed
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
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
GLsizei const GLfloat * value
virtual std::string evalAsString()=0
virtual HOM_Geometry * evalAsGeometry()=0
virtual HOM_Geometry * geometry()=0