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>
50 #define HOM_MIN_NEGATIVE_DOUBLE -1 * std::numeric_limits<double>::max()
69 typedef PyObject *InterpreterObject;
71 PyObject *HOMincRef(PyObject *
object)
83 typedef PyObject *InterpreterObject;
102 template <
typename T> InterpreterObject
103 HOMconvertValueForInterpreter(
const T &
value,
int own);
106 template <> InterpreterObject
107 HOMconvertValueForInterpreter<int>(
const int&
value,
int )
108 {
return SWIG_From_int(value); }
110 template <> InterpreterObject
111 HOMconvertValueForInterpreter<float>(
const float&
value,
int )
112 {
return SWIG_From_float(value); }
114 template <> InterpreterObject
115 HOMconvertValueForInterpreter<double>(
const double&
value,
int )
116 {
return SWIG_From_double(value); }
118 template <> InterpreterObject
119 HOMconvertValueForInterpreter<std::string>(
121 {
return SWIG_From_std_string(value); }
125 template <> InterpreterObject
126 HOMconvertValueForInterpreter<HOM_Node*>(
HOM_Node *
const &node,
int own)
132 bool isnetwork =
false;
134 if (!node || (!opnode && !apexnode))
135 return SWIG_NewPointerObj(node, SWIGTYPE_p_HOM_Node, own);
138 return SWIG_NewPointerObj(node, SWIGTYPE_p_HOM_ApexNode, own);
148 return SWIG_NewPointerObj(
149 (
void*)dynamic_cast<HOM_ObjNode* const>(node),
150 SWIGTYPE_p_HOM_ObjNode, own);
157 return SWIG_NewPointerObj(
158 (
void*)dynamic_cast<HOM_SopNode* const>(node),
159 SWIGTYPE_p_HOM_SopNode, own);
166 return SWIG_NewPointerObj(
167 (
void*)dynamic_cast<HOM_ChopNode* const>(node),
168 SWIGTYPE_p_HOM_ChopNode, own);
175 return SWIG_NewPointerObj(
176 (
void*)dynamic_cast<HOM_Cop2Node* const>(node),
177 SWIGTYPE_p_HOM_Cop2Node, own);
184 return SWIG_NewPointerObj(
185 (
void*)dynamic_cast<HOM_CopNode* const>(node),
186 SWIGTYPE_p_HOM_CopNode, own);
193 return SWIG_NewPointerObj(
194 (
void*)dynamic_cast<HOM_DopNode* const>(node),
195 SWIGTYPE_p_HOM_DopNode, own);
202 return SWIG_NewPointerObj(
203 (
void*)dynamic_cast<HOM_ShopNode* const>(node),
204 SWIGTYPE_p_HOM_ShopNode, own);
211 return SWIG_NewPointerObj(
212 (
void*)dynamic_cast<HOM_VopNetNode* const>(node),
213 SWIGTYPE_p_HOM_VopNetNode, own);
220 return SWIG_NewPointerObj(
221 (
void*)dynamic_cast<HOM_RopNode* const>(node),
222 SWIGTYPE_p_HOM_RopNode, own);
229 return SWIG_NewPointerObj(
230 (
void*)dynamic_cast<HOM_VopNode* const>(node),
231 SWIGTYPE_p_HOM_VopNode, own);
238 return SWIG_NewPointerObj(
239 (
void*)dynamic_cast<HOM_TopNode* const>(node),
240 SWIGTYPE_p_HOM_TopNode, own);
250 nodetype = node->type();
251 isnetwork = (nodetype && nodetype->
isManager(
true));
254 return SWIG_NewPointerObj(
255 (
void*)dynamic_cast<HOM_LopNetwork* const>(node),
256 SWIGTYPE_p_HOM_LopNetwork, own);
258 return SWIG_NewPointerObj(
259 (
void*)dynamic_cast<HOM_LopNode* const>(node),
260 SWIGTYPE_p_HOM_LopNode, own);
270 if (
HOM().lopNodeTypeCategory() == node->childTypeCategory())
271 return SWIG_NewPointerObj(
273 SWIGTYPE_p_HOM_LopNetwork, own);
279 return SWIG_NewPointerObj(opnode, SWIGTYPE_p_HOM_OpNode, own);
282 template <> InterpreterObject
283 HOMconvertValueForInterpreter<HOM_NodeType*>(
290 if (!nodetype || (!opnodetype && !apexnodetype))
291 return SWIG_NewPointerObj(nodetype, SWIGTYPE_p_HOM_NodeType, own);
294 return SWIG_NewPointerObj(nodetype, SWIGTYPE_p_HOM_ApexNodeType, own);
296 if( !nodetype->isManager() )
306 return SWIG_NewPointerObj(
307 (
void*)dynamic_cast<const HOM_SopNodeType* const>(nodetype),
308 SWIGTYPE_p_HOM_SopNodeType, own);
315 return SWIG_NewPointerObj(
316 (
void*)dynamic_cast<const HOM_ShopNodeType* const>(nodetype),
317 SWIGTYPE_p_HOM_ShopNodeType, own);
324 return SWIG_NewPointerObj(
325 (
void*)dynamic_cast<const HOM_VopNodeType* const>(nodetype),
326 SWIGTYPE_p_HOM_VopNodeType, own);
332 return SWIG_NewPointerObj(nodetype, SWIGTYPE_p_HOM_OpNodeType, own);
335 template <> InterpreterObject
336 HOMconvertValueForInterpreter<HOM_NodeTypeCategory*>(
344 if (!nodetypecategory || (!opnodetypecategory && !apexnodetypecategory))
345 return SWIG_NewPointerObj(nodetypecategory,
346 SWIGTYPE_p_HOM_NodeTypeCategory, own);
348 if (apexnodetypecategory)
349 return SWIG_NewPointerObj(nodetypecategory,
350 SWIGTYPE_p_HOM_ApexNodeTypeCategory, own);
352 return SWIG_NewPointerObj(nodetypecategory,
353 SWIGTYPE_p_HOM_OpNodeTypeCategory, own);
356 template <> InterpreterObject
357 HOMconvertValueForInterpreter<HOM_NodeTypeCategory&>(
365 if (!opnodetypecategory && !apexnodetypecategory)
366 return SWIG_NewPointerObj(&nodetypecategory,
367 SWIGTYPE_p_HOM_NodeTypeCategory, own);
369 if (apexnodetypecategory)
370 return SWIG_NewPointerObj(&nodetypecategory,
371 SWIGTYPE_p_HOM_ApexNodeTypeCategory, own);
373 return SWIG_NewPointerObj(&nodetypecategory,
374 SWIGTYPE_p_HOM_OpNodeTypeCategory, own);
390 result = HOMconvertValueForInterpreter(val, 0);
406 template <> InterpreterObject
407 HOMconvertValueForInterpreter<HOM_NetworkBox*>(
413 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_NetworkBox, own);
415 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_OpNetworkBox, own);
418 template <> InterpreterObject
419 HOMconvertValueForInterpreter<HOM_NetworkDot*>(
425 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_NetworkDot, own);
427 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_OpNetworkDot, own);
430 template <> InterpreterObject
431 HOMconvertValueForInterpreter<HOM_NodeConnection*>(
437 if (!obj || (!opobj && !apexobj))
438 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_NodeConnection, own);
441 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_ApexNodeConnection, own);
443 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_OpNodeConnection, own);
446 template <> InterpreterObject
447 HOMconvertValueForInterpreter<HOM_StickyNote*>(
453 if (!obj || (!opobj && !apexobj))
454 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_StickyNote, own);
457 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_ApexStickyNote, own);
459 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_OpStickyNote, own);
462 template <> InterpreterObject
463 HOMconvertValueForInterpreter<HOM_SubnetIndirectInput*>(
469 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_SubnetIndirectInput, own);
471 return SWIG_NewPointerObj(obj, SWIGTYPE_p_HOM_OpSubnetIndirectInput, own);
474 template <> InterpreterObject
475 HOMconvertValueForInterpreter<HOM_BaseKeyframe*>(
479 return SWIG_NewPointerObj(keyframe, SWIGTYPE_p_HOM_BaseKeyframe, own);
481 if (keyframe->evaluatedType() == HOM_parmData::Float)
487 return SWIG_NewPointerObj(
488 (
void*)dynamic_cast<const HOM_Keyframe* const>(keyframe),
489 SWIGTYPE_p_HOM_Keyframe, own);
491 else if (keyframe->evaluatedType() == HOM_parmData::String)
497 return SWIG_NewPointerObj(
498 (
void*)dynamic_cast<const HOM_StringKeyframe* const>(keyframe),
499 SWIGTYPE_p_HOM_StringKeyframe, own);
502 return SWIG_NewPointerObj(keyframe, SWIGTYPE_p_HOM_BaseKeyframe, own);
505 template <> InterpreterObject
506 HOMconvertValueForInterpreter<HOM_PackedPrim*>(
HOM_PackedPrim *
const &prim,
int own)
509 return SWIG_NewPointerObj(prim, SWIGTYPE_p_HOM_PackedPrim, own);
516 switch (prim->type().id())
518 case HOM_primType::Agent_Id:
519 return SWIG_NewPointerObj(
520 (
void *)dynamic_cast<HOM_Agent *const>(prim),
521 SWIGTYPE_p_HOM_Agent, own);
523 case HOM_primType::PackedFragment_Id:
524 return SWIG_NewPointerObj(
525 (
void *)dynamic_cast<HOM_PackedFragment *const>(prim),
526 SWIGTYPE_p_HOM_PackedFragment, own);
528 case HOM_primType::PackedGeometry_Id:
529 return SWIG_NewPointerObj(
530 (
void *)dynamic_cast<HOM_PackedGeometry *const>(prim),
531 SWIGTYPE_p_HOM_PackedGeometry, own);
535 return SWIG_NewPointerObj((
void *)prim, SWIGTYPE_p_HOM_PackedPrim, own);
538 template <> InterpreterObject
539 HOMconvertValueForInterpreter<HOM_Prim*>(
HOM_Prim *
const &prim,
int own)
542 return SWIG_NewPointerObj(prim, SWIGTYPE_p_HOM_Prim, own);
550 return HOMconvertValueForInterpreter(packed, own);
552 switch (prim->type().id())
554 case HOM_primType::Polygon_Id:
555 return SWIG_NewPointerObj(
556 (
void*)dynamic_cast<const HOM_Polygon* const>(prim),
557 SWIGTYPE_p_HOM_Polygon, own);
559 case HOM_primType::NURBSCurve_Id:
560 case HOM_primType::BezierCurve_Id:
561 return SWIG_NewPointerObj(
562 (
void*)dynamic_cast<const HOM_Face* const>(prim),
563 SWIGTYPE_p_HOM_Face, own);
565 case HOM_primType::Mesh_Id:
566 case HOM_primType::NURBSSurface_Id:
567 case HOM_primType::BezierSurface_Id:
568 return SWIG_NewPointerObj(
569 (
void*)dynamic_cast<const HOM_Surface* const>(prim),
570 SWIGTYPE_p_HOM_Surface, own);
572 case HOM_primType::Circle_Id:
573 case HOM_primType::Sphere_Id:
574 case HOM_primType::Tube_Id:
575 return SWIG_NewPointerObj(
576 (
void*)dynamic_cast<const HOM_Quadric* const>(prim),
577 SWIGTYPE_p_HOM_Quadric, own);
579 case HOM_primType::Volume_Id:
580 return SWIG_NewPointerObj(
581 (
void*)dynamic_cast<const HOM_Volume* const>(prim),
582 SWIGTYPE_p_HOM_Volume, own);
584 case HOM_primType::VDB_Id:
585 return SWIG_NewPointerObj(
586 (
void*)dynamic_cast<const HOM_VDB* const>(prim),
587 SWIGTYPE_p_HOM_VDB, own);
589 case HOM_primType::ChannelPrim_Id:
590 return SWIG_NewPointerObj(
591 (
void*)dynamic_cast<const HOM_ChannelPrim* const>(prim),
592 SWIGTYPE_p_HOM_ChannelPrim, own);
597 return SWIG_NewPointerObj(prim, SWIGTYPE_p_HOM_Prim, own);
600 template <> InterpreterObject
601 HOMconvertValueForInterpreter<HOM_ParmTemplate*>(
605 return SWIG_NewPointerObj(
606 parm_template, SWIGTYPE_p_HOM_ParmTemplate, own);
611 switch (parm_template->type().id())
613 case HOM_parmTemplateType::Int_Id:
614 return SWIG_NewPointerObj(
615 (
void*)dynamic_cast<const HOM_IntParmTemplate* const>(
617 SWIGTYPE_p_HOM_IntParmTemplate, own);
619 case HOM_parmTemplateType::Float_Id:
620 return SWIG_NewPointerObj(
621 (
void*)dynamic_cast<const HOM_FloatParmTemplate* const>(
623 SWIGTYPE_p_HOM_FloatParmTemplate, own);
625 case HOM_parmTemplateType::String_Id:
626 return SWIG_NewPointerObj(
627 (
void*)dynamic_cast<const HOM_StringParmTemplate* const>(
629 SWIGTYPE_p_HOM_StringParmTemplate, own);
631 case HOM_parmTemplateType::Data_Id:
632 return SWIG_NewPointerObj(
633 (
void*)dynamic_cast<const HOM_DataParmTemplate* const>(
635 SWIGTYPE_p_HOM_DataParmTemplate, own);
637 case HOM_parmTemplateType::Toggle_Id:
638 return SWIG_NewPointerObj(
639 (
void*)dynamic_cast<const HOM_ToggleParmTemplate* const>(
641 SWIGTYPE_p_HOM_ToggleParmTemplate, own);
643 case HOM_parmTemplateType::Menu_Id:
644 return SWIG_NewPointerObj(
645 (
void*)dynamic_cast<const HOM_MenuParmTemplate* const>(
647 SWIGTYPE_p_HOM_MenuParmTemplate, own);
649 case HOM_parmTemplateType::Button_Id:
650 return SWIG_NewPointerObj(
651 (
void*)dynamic_cast<const HOM_ButtonParmTemplate* const>(
653 SWIGTYPE_p_HOM_ButtonParmTemplate, own);
655 case HOM_parmTemplateType::Label_Id:
656 return SWIG_NewPointerObj(
657 (
void*)dynamic_cast<const HOM_LabelParmTemplate* const>(
659 SWIGTYPE_p_HOM_LabelParmTemplate, own);
661 case HOM_parmTemplateType::Separator_Id:
662 return SWIG_NewPointerObj(
663 (
void*)dynamic_cast<const HOM_SeparatorParmTemplate* const>(
665 SWIGTYPE_p_HOM_SeparatorParmTemplate, own);
667 case HOM_parmTemplateType::FolderSet_Id:
668 return SWIG_NewPointerObj(
669 (
void*)dynamic_cast<const HOM_FolderSetParmTemplate* const>(
671 SWIGTYPE_p_HOM_FolderSetParmTemplate, own);
673 case HOM_parmTemplateType::Folder_Id:
674 return SWIG_NewPointerObj(
675 (
void*)dynamic_cast<const HOM_FolderParmTemplate* const>(
677 SWIGTYPE_p_HOM_FolderParmTemplate, own);
679 case HOM_parmTemplateType::Ramp_Id:
680 return SWIG_NewPointerObj(
681 (
void*)dynamic_cast<const HOM_RampParmTemplate* const>(
683 SWIGTYPE_p_HOM_RampParmTemplate, own);
686 UT_ASSERT(!
"Unknown parm template type");
687 return SWIG_NewPointerObj(parm_template, SWIGTYPE_p_HOM_ParmTemplate, own);
690 template <> InterpreterObject
691 HOMconvertValueForInterpreter<HOM_PaneTab*>(
695 return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
701 switch (pane_tab->type().id())
703 case HOM_paneTabType::ContextViewer_Id:
704 return SWIG_NewPointerObj(
705 (
void*)dynamic_cast<const HOM_ContextViewer* const>(pane_tab),
706 SWIGTYPE_p_HOM_ContextViewer, own);
708 case HOM_paneTabType::SceneViewer_Id:
709 return SWIG_NewPointerObj(
710 (
void*)dynamic_cast<const HOM_SceneViewer* const>(pane_tab),
711 SWIGTYPE_p_HOM_SceneViewer, own);
713 case HOM_paneTabType::CompositorViewer_Id:
714 return SWIG_NewPointerObj(
715 (
void*)dynamic_cast<const HOM_CompositorViewer* const>(pane_tab),
716 SWIGTYPE_p_HOM_CompositorViewer, own);
718 case HOM_paneTabType::NetworkEditor_Id:
719 case HOM_paneTabType::ApexEditor_Id:
720 return SWIG_NewPointerObj(
721 (
void*)dynamic_cast<const HOM_NetworkEditor* const>(pane_tab),
722 SWIGTYPE_p_HOM_NetworkEditor, own);
724 case HOM_paneTabType::HelpBrowser_Id:
725 return SWIG_NewPointerObj(
726 (
void*)dynamic_cast<const HOM_HelpBrowser* const>(pane_tab),
727 SWIGTYPE_p_HOM_HelpBrowser, own);
729 case HOM_paneTabType::PythonPanel_Id:
730 return SWIG_NewPointerObj(
731 (
void*)dynamic_cast<const HOM_PythonPanel* const>(pane_tab),
732 SWIGTYPE_p_HOM_PythonPanel, own);
734 case HOM_paneTabType::IPRViewer_Id:
735 return SWIG_NewPointerObj(
736 (
void*)dynamic_cast<const HOM_IPRViewer* const>(pane_tab),
737 SWIGTYPE_p_HOM_IPRViewer, own);
739 case HOM_paneTabType::AssetBrowser_Id:
740 return SWIG_NewPointerObj(
741 (
void*)dynamic_cast<const HOM_AssetBrowser* const>(pane_tab),
742 SWIGTYPE_p_HOM_AssetBrowser, own);
744 case HOM_paneTabType::PerformanceMonitor_Id:
745 return SWIG_NewPointerObj(
746 (
void*)dynamic_cast<const HOM_PerformanceMonitor* const>(pane_tab),
747 SWIGTYPE_p_HOM_PerformanceMonitor, own);
749 case HOM_paneTabType::ChannelEditor_Id:
750 return SWIG_NewPointerObj(
751 (
void*)dynamic_cast<const HOM_ChannelEditorPane* const>(pane_tab),
752 SWIGTYPE_p_HOM_ChannelEditorPane, own);
754 case HOM_paneTabType::DataTree_Id:
755 return SWIG_NewPointerObj(
756 (
void*)dynamic_cast<const HOM_DataTree* const>(pane_tab),
757 SWIGTYPE_p_HOM_DataTree, own);
759 case HOM_paneTabType::SceneGraphTree_Id:
760 return SWIG_NewPointerObj(
761 (
void*)dynamic_cast<const HOM_SceneGraphTree* const>(pane_tab),
762 SWIGTYPE_p_HOM_SceneGraphTree, own);
764 case HOM_paneTabType::Parm_Id:
765 return SWIG_NewPointerObj(
766 (
void*)dynamic_cast<const HOM_ParameterEditor* const>(pane_tab),
767 SWIGTYPE_p_HOM_ParameterEditor, own);
769 case HOM_paneTabType::DetailsView_Id:
770 return SWIG_NewPointerObj(
771 (
void*)dynamic_cast<const HOM_GeometrySpreadsheet * const>(pane_tab),
772 SWIGTYPE_p_HOM_GeometrySpreadsheet, own);
774 case HOM_paneTabType::ChannelViewer_Id:
775 case HOM_paneTabType::OutputViewer_Id:
776 case HOM_paneTabType::ShaderViewer_Id:
777 case HOM_paneTabType::TreeView_Id:
778 case HOM_paneTabType::RenderGallery_Id:
779 return SWIG_NewPointerObj(
780 (
void*)dynamic_cast<const HOM_PathBasedPaneTab* const>(pane_tab),
781 SWIGTYPE_p_HOM_PathBasedPaneTab, own);
783 case HOM_paneTabType::ChannelList_Id:
784 case HOM_paneTabType::Textport_Id:
785 case HOM_paneTabType::PythonShell_Id:
786 case HOM_paneTabType::HandleList_Id:
787 case HOM_paneTabType::BundleList_Id:
788 case HOM_paneTabType::TakeList_Id:
789 case HOM_paneTabType::ParmSpreadsheet_Id:
790 case HOM_paneTabType::LightLinker_Id:
791 case HOM_paneTabType::MaterialPalette_Id:
792 case HOM_paneTabType::EngineSessionSync_Id:
793 return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
797 return SWIG_NewPointerObj(pane_tab, SWIGTYPE_p_HOM_PaneTab, own);
800 template <> InterpreterObject
801 HOMconvertValueForInterpreter<HOM_SopVerb*>(
804 return SWIG_NewPointerObj(verb, SWIGTYPE_p_HOM_SopVerb, own);
807 template <> InterpreterObject
808 HOMconvertValueForInterpreter<HOM_Geometry*>(
811 return SWIG_NewPointerObj(geo, SWIGTYPE_p_HOM_Geometry, own);
814 template <> InterpreterObject
815 HOMconvertValueForInterpreter<HOM_NetworkItem*>(
823 switch (item->networkItemType().id())
825 case HOM_networkItemType::Node_Id:
826 return HOMconvertValueForInterpreter(
827 dynamic_cast<HOM_Node* const>(item), own);
829 case HOM_networkItemType::NetworkBox_Id:
830 return HOMconvertValueForInterpreter(
831 dynamic_cast<HOM_NetworkBox* const>(item), own);
833 case HOM_networkItemType::StickyNote_Id:
834 return HOMconvertValueForInterpreter(
835 dynamic_cast<HOM_StickyNote* const>(item), own);
837 case HOM_networkItemType::SubnetIndirectInput_Id:
838 return HOMconvertValueForInterpreter(
839 dynamic_cast<HOM_SubnetIndirectInput* const>(item), own);
841 case HOM_networkItemType::Connection_Id:
842 return HOMconvertValueForInterpreter(
843 dynamic_cast<HOM_NodeConnection* const>(item), own);
845 case HOM_networkItemType::NetworkDot_Id:
846 return HOMconvertValueForInterpreter(
847 dynamic_cast<HOM_NetworkDot* const>(item), own);
854 return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_NetworkItem, own);
857 template <> InterpreterObject
858 HOMconvertValueForInterpreter<HOM_NetworkMovableItem*>(
862 return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_NetworkMovableItem, own);
864 return HOMconvertValueForInterpreter<HOM_NetworkItem *>(item, own);
867 template <> InterpreterObject
868 HOMconvertValueForInterpreter<
869 std::vector<HOM_ElemPtr<HOM_NodeConnection> >*>(
870 std::vector<HOM_ElemPtr<HOM_NodeConnection> > *
const &list,
873 return swig::from(*list);
876 template <> InterpreterObject
877 HOMconvertValueForInterpreter<HOM_DopData*>(
HOM_DopData *
const &
data,
int own)
882 return SWIG_NewPointerObj(
883 (
void *)dop_object, SWIGTYPE_p_HOM_DopObject, own);
887 if (dop_relationship)
888 return SWIG_NewPointerObj(
889 (
void *)dop_relationship, SWIGTYPE_p_HOM_DopRelationship, own);
891 return SWIG_NewPointerObj(data, SWIGTYPE_p_HOM_DopData, own);
894 template <> InterpreterObject
895 HOMconvertValueForInterpreter<HOM_RadialItem*>(
900 switch (item->type().id())
902 case HOM_radialItemType::Script_Id:
903 return SWIG_NewPointerObj(
904 (
void*)dynamic_cast<const HOM_RadialScriptItem* const>(item),
905 SWIGTYPE_p_HOM_RadialScriptItem, own);
907 case HOM_radialItemType::Submenu_Id:
908 return SWIG_NewPointerObj(
909 (
void*)dynamic_cast<const HOM_RadialSubmenu* const>(item),
910 SWIGTYPE_p_HOM_RadialSubmenu, own);
917 return SWIG_NewPointerObj(item, SWIGTYPE_p_HOM_RadialItem, own);
920 template <> InterpreterObject
921 HOMconvertValueForInterpreter<HOM_EnumValue*>(
929 return SWIG_NewPointerObj((
void*)item, SWIGTYPE_p_HOM_EnumValue, 0);
934 #define HOM_PROVIDE_SWIG_LOOKUP(type) \
935 template <> InterpreterObject HOMconvertValueForInterpreter<type*>( \
936 type* const& value, int own) \
938 return SWIG_NewPointerObj(SWIG_as_voidptr(value), \
939 SWIGTYPE_p_ ## type, own); \
1032 #define HOM_CONVERT_AND_CATCH \
1035 $result = HOMconvertValueForInterpreter($1, $owner); \
1039 (void)hom::raise_swig_exception(); \
1040 $result = nullptr; \
1045 HOM_CONVERT_AND_CATCH
1049 HOM_CONVERT_AND_CATCH
1053 HOM_CONVERT_AND_CATCH
1057 HOM_CONVERT_AND_CATCH
1061 HOM_CONVERT_AND_CATCH
1065 HOM_CONVERT_AND_CATCH
1069 HOM_CONVERT_AND_CATCH
1073 HOM_CONVERT_AND_CATCH
1077 HOM_CONVERT_AND_CATCH
1081 HOM_CONVERT_AND_CATCH
1085 HOM_CONVERT_AND_CATCH
1089 HOM_CONVERT_AND_CATCH
1093 HOM_CONVERT_AND_CATCH
1097 HOM_CONVERT_AND_CATCH
1101 HOM_CONVERT_AND_CATCH
1105 HOM_CONVERT_AND_CATCH
1109 HOM_CONVERT_AND_CATCH
1113 HOM_CONVERT_AND_CATCH
1117 HOM_CONVERT_AND_CATCH
1121 HOM_CONVERT_AND_CATCH
1128 %typemap(
throws) HOM_TypeError %{
1129 SWIG_exception_fail(SWIG_TypeError, $1.instanceMessage().c_str());
1132 %typemap(
throws) HOM_ValueError %{
1133 SWIG_exception_fail(SWIG_ValueError, $1.instanceMessage().c_str());
1138 PyErr_SetObject(PyExc_SystemExit, SWIG_From_int($1.code()));
1148 %typemap(in) hboost::
any {
1153 HOMinterpreterObjectToBoostAny($input, $1);
1157 (
void)hom::raise_swig_exception();
1169 HOMinterpreterObjectToUTOptionAny($input, $1);
1173 (
void)hom::raise_swig_exception();
1178 %typemap(out) hboost::any {
1181 $result = HOMboostAnyToInterpreterObject($1);
1185 (
void)hom::raise_swig_exception();
1192 $result = HOMDDSourceAnyToInterpreterObject($1);
1196 (
void)hom::raise_swig_exception();
1206 if ($input != Py_None)
1210 if (SWIG_IsOK(SWIG_AsVal_double($input, &res)))
1218 (
void)hom::raise_swig_exception();
1226 if ($input != Py_None)
1230 if (SWIG_IsOK(SWIG_AsVal_int($input, &res)))
1238 (
void)hom::raise_swig_exception();
1242 %typemap(out) HOM_OptionalInt {
1246 $result = SWIG_From_int($1.
value());
1248 $result = SWIG_Py_Void();
1252 (
void)hom::raise_swig_exception();
1260 $result = HOMincRef((InterpreterObject)$1.opaqueObject());
1270 struct traits_from<PY_OpaqueObject>
1272 static PyObject *from(
const PY_OpaqueObject &
val)
1274 return HOMincRef((InterpreterObject)val.
opaqueObject());
1280 template <
typename T>
1283 swig_type_info *descriptor)
1286 int res = SWIG_ConvertPtr(input, &t_ptr, descriptor, 0);;
1287 if (SWIG_IsOK(res) && t_ptr)
1290 result =
reinterpret_cast<T*
>(t_ptr);
1301 template <
typename Seq,
typename T =
typename Seq::value_type>
1303 HOMinterpreterObjectConvertSeq(InterpreterObject input,
hboost::any &result)
1305 swig::SwigPySequence_Cont<T> swigpyseq(input);
1306 if (!swigpyseq.check())
1309 auto n = swigpyseq.size();
1312 for (
auto i=0;i<
n; ++i)
1313 seq[i] = swigpyseq[i];
1315 result = std::move(seq);
1320 template <
typename T>
1322 HOMinterpreterObjectConvertVal(InterpreterObject input,
hboost::any &result)
1327 swig_type_info *descriptor = swig::type_info<T>();
1332 int res = SWIG_ConvertPtr(input, (
void**)&t_ptr, descriptor, 0);
1334 if (!SWIG_IsOK(res) || !t_ptr)
1342 result = std::move(*t_ptr);
1343 if (SWIG_IsNewObj(res))
1349 template <
typename T>
1351 HOMinterpreterObjectConvertAsPtr(InterpreterObject input,
hboost::any &result)
1355 int res = swig::asptr(input, (T**)NULL);
1356 if (!SWIG_IsOK(res))
1361 res = swig::asptr(input, &t_ptr);
1362 if (!SWIG_IsOK(res) || !t_ptr)
1370 result = std::move(*t_ptr);
1371 if (SWIG_IsNewObj(res))
1377 #define CONVERT_PTR(X) \
1378 if (HOMinterpreterObjectConvertPtr<X>(\
1379 swig_input,result,SWIGTYPE_p_##X))\
1382 #define CONVERT_VAL(X) \
1383 if (HOMinterpreterObjectConvertVal<X>(swig_input,result))\
1386 #define CONVERT_ASPTR(X) \
1387 if (HOMinterpreterObjectConvertAsPtr<X>(input,result))\
1390 #define CONVERT_SEQ(X) \
1391 if (HOMinterpreterObjectConvertSeq<X>(input,result))\
1395 typedef std::map<std::string,hboost::any> std__map_std__string_hboost__any_;
1396 typedef std::vector<std::map<std::string,hboost::any>> std__vector_std__map_std__string_hboost__any__;
1405 HOMinterpreterObjectToBoostAny(InterpreterObject input,
hboost::any &result)
1408 if (input == Py_None)
1410 result = (
void *)NULL;
1416 if (input == Py_True)
1422 if (input == Py_False)
1430 if (SWIG_IsOK(SWIG_AsVal_int(input, &int_result)))
1432 result = int_result;
1436 double double_result;
1437 if (SWIG_IsOK(SWIG_AsVal_double(input, &double_result)))
1439 result = double_result;
1444 char*
buf = 0 ;
size_t size = 0;
int alloc = SWIG_OLDOBJ;
1445 if (SWIG_IsOK((SWIG_AsCharPtrAndSize(input, &buf, &size, &alloc))))
1450 if (alloc == SWIG_NEWOBJ)
1465 bool is_seq = PyList_Check(input) || PyTuple_Check(input);
1466 bool is_dict = PyDict_Check(input);
1469 CONVERT_SEQ(std::vector<int>);
1470 CONVERT_SEQ(std::vector<double>);
1471 CONVERT_SEQ(std::vector<std::string>);
1472 CONVERT_SEQ(std::vector<HOM_Quaternion>);
1473 CONVERT_SEQ(std::vector<HOM_Vector2>);
1474 CONVERT_SEQ(std::vector<HOM_Vector3>);
1475 CONVERT_SEQ(std::vector<HOM_Vector4>);
1476 CONVERT_SEQ(std::vector<HOM_Matrix2>);
1477 CONVERT_SEQ(std::vector<HOM_Matrix3>);
1478 CONVERT_SEQ(std::vector<HOM_Matrix4>);
1479 CONVERT_SEQ(std__vector_std__map_std__string_hboost__any__);
1483 CONVERT_ASPTR(std__map_std__string_hboost__any_);
1490 InterpreterObject swig_input =
1491 (InterpreterObject)SWIG_Python_GetSwigThis(input);
1509 CONVERT_VAL(std::vector<int>);
1510 CONVERT_VAL(std::vector<double>);
1511 CONVERT_VAL(std::vector<std::string>);
1512 CONVERT_VAL(std::vector<HOM_Quaternion>);
1513 CONVERT_VAL(std::vector<HOM_Vector2>);
1514 CONVERT_VAL(std::vector<HOM_Vector3>);
1515 CONVERT_VAL(std::vector<HOM_Vector4>);
1516 CONVERT_VAL(std::vector<HOM_Matrix2>);
1517 CONVERT_VAL(std::vector<HOM_Matrix3>);
1518 CONVERT_VAL(std::vector<HOM_Matrix4>);
1519 CONVERT_VAL(std__map_std__string_hboost__any_);
1520 CONVERT_VAL(std__vector_std__map_std__string_hboost__any__);
1533 HOMinterpreterObjectToUTOptionAny(InterpreterObject input,
1534 HOM_UTOptionAny &result)
1536 return HOMinterpreterObjectToBoostAny(input, result);
1544 struct traits_asptr<hboost::any>
1550 HOMinterpreterObjectToBoostAny(obj, *p);
1565 static InterpreterObject
1566 HOMboostAnyToInterpreterObject(
const hboost::any &result)
1569 return SWIG_Py_Void();
1571 namespace ti = hboost::typeindex;
1573 if (result.type() == ti::type_id<int>())
1574 return SWIG_From_int(hboost::any_cast<int>(result));
1576 if (result.type() == ti::type_id<long>())
1577 return SWIG_From_long(hboost::any_cast<long>(result));
1579 if (result.type() == ti::type_id<int64>())
1580 return swig::from(hboost::any_cast<int64>(result));
1582 if (result.type() == ti::type_id<float>())
1583 return SWIG_From_float(hboost::any_cast<float>(result));
1585 if (result.type() == ti::type_id<double>())
1586 return SWIG_From_double(hboost::any_cast<double>(result));
1588 if (result.type() == ti::type_id<bool>())
1589 return SWIG_From_bool(hboost::any_cast<bool>(result));
1591 if (result.type() == ti::type_id<std::string>())
1592 return SWIG_From_std_string(hboost::any_cast<std::string>(result));
1594 if (result.type() == ti::type_id<HOM_BinaryString>())
1595 return SWIG_From_HOM_BinaryString(hboost::any_cast<HOM_BinaryString>(result));
1597 if (result.type() == ti::type_id<std::map<std::string, hboost::any>>())
1599 hboost::any_cast<std::map<std::string, hboost::any> >(result));
1601 if (result.type() == ti::type_id<std::vector<int>>())
1602 return swig::from(hboost::any_cast<std::vector<int> >(result));
1604 if (result.type() == ti::type_id<std::vector<int64>>())
1605 return swig::from(hboost::any_cast<std::vector<int64> >(result));
1607 if (result.type() == ti::type_id<std::vector<float>>())
1608 return swig::from(hboost::any_cast<std::vector<float> >(result));
1610 if (result.type() == ti::type_id<std::vector<std::string>>())
1611 return swig::from(hboost::any_cast<std::vector<std::string> >(result));
1613 if (result.type() == ti::type_id<std::vector<double>>())
1614 return swig::from(hboost::any_cast<std::vector<double> >(result));
1616 if (result.type() == ti::type_id<std::vector<std::vector<float> >>())
1618 hboost::any_cast<std::vector<std::vector<float> > >(result));
1620 if (result.type() == ti::type_id<std::vector<std::vector<double> >>())
1622 hboost::any_cast<std::vector<std::vector<double> > >(result));
1624 if (result.type() == ti::type_id<std::vector<std::map<std::string, hboost::any> >>())
1626 hboost::any_cast<std::vector<std::map<std::string, hboost::any> > >(result));
1630 if (result.type() == ti::type_id<HOM_Vector2 *>())
1631 return HOMconvertValueForInterpreter(
1632 hboost::any_cast<HOM_Vector2 *>(result), SWIG_POINTER_OWN);
1634 if (result.type() == ti::type_id<HOM_Vector3 *>())
1635 return HOMconvertValueForInterpreter(
1636 hboost::any_cast<HOM_Vector3 *>(result), SWIG_POINTER_OWN);
1638 if (result.type() == ti::type_id<HOM_Vector4 *>())
1639 return HOMconvertValueForInterpreter(
1640 hboost::any_cast<HOM_Vector4 *>(result), SWIG_POINTER_OWN);
1642 if (result.type() == ti::type_id<HOM_Matrix2 *>())
1643 return HOMconvertValueForInterpreter(
1644 hboost::any_cast<HOM_Matrix2 *>(result), SWIG_POINTER_OWN);
1646 if (result.type() == ti::type_id<HOM_Matrix3 *>())
1647 return HOMconvertValueForInterpreter(
1648 hboost::any_cast<HOM_Matrix3 *>(result), SWIG_POINTER_OWN);
1650 if (result.type() == ti::type_id<HOM_Matrix4 *>())
1651 return HOMconvertValueForInterpreter(
1652 hboost::any_cast<HOM_Matrix4 *>(result), SWIG_POINTER_OWN);
1654 if (result.type() == ti::type_id<HOM_Quaternion *>())
1655 return HOMconvertValueForInterpreter(
1656 hboost::any_cast<HOM_Quaternion *>(result), SWIG_POINTER_OWN);
1658 if (result.type() == ti::type_id<HOM_NodeType *>())
1659 return HOMconvertValueForInterpreter(
1660 hboost::any_cast<HOM_NodeType *>(result), SWIG_POINTER_OWN);
1662 if (result.type() == ti::type_id<HOM_Ramp *>())
1663 return HOMconvertValueForInterpreter(
1664 hboost::any_cast<HOM_Ramp *>(result), SWIG_POINTER_OWN);
1666 if (result.type() == ti::type_id<HOM_Color *>())
1667 return HOMconvertValueForInterpreter(
1668 hboost::any_cast<HOM_Color *>(result), SWIG_POINTER_OWN);
1670 if (result.type() == ti::type_id<HOM_Parm *>())
1671 return HOMconvertValueForInterpreter(
1672 hboost::any_cast<HOM_Parm *>(result), SWIG_POINTER_OWN);
1674 if (result.type() == ti::type_id<HOM_EnumValue *>())
1675 return HOMconvertValueForInterpreter(
1676 hboost::any_cast<HOM_EnumValue *>(result), 0);
1678 if (result.type() == ti::type_id<HOM_Geometry *>())
1679 return HOMconvertValueForInterpreter(
1680 hboost::any_cast<HOM_Geometry *>(result), SWIG_POINTER_OWN);
1682 if (result.type() == ti::type_id<std::vector<HOM_ElemPtr<HOM_Vector2> >>())
1686 if (result.type() == ti::type_id<std::vector<HOM_ElemPtr<HOM_Vector3> >>())
1690 if (result.type() == ti::type_id<std::vector<HOM_ElemPtr<HOM_Vector4> >>())
1694 if (result.type() == ti::type_id<std::vector<HOM_ElemPtr<HOM_Matrix2> >>())
1698 if (result.type() == ti::type_id<std::vector<HOM_ElemPtr<HOM_Matrix3> >>())
1702 if (result.type() == ti::type_id<std::vector<HOM_ElemPtr<HOM_Matrix4> >>())
1706 if (result.type() == ti::type_id<std::vector<HOM_ElemPtr<HOM_Quaternion> >>())
1710 #if UT_ASSERT_LEVEL > 0
1711 std::cout <<
"Unknown data type: "
1715 return SWIG_Py_Void();
1720 static InterpreterObject
1721 HOMDDSourceAnyToInterpreterObject(
const HOM_DDSourceAny &result)
1723 namespace ti = hboost::typeindex;
1725 if (result.type() == ti::type_id<HOM_Node *>())
1727 return HOMconvertValueForInterpreter(
1728 hboost::any_cast<HOM_Node *>(result), SWIG_POINTER_OWN);
1730 if (result.type() == ti::type_id<HOM_Parm *>())
1732 return HOMconvertValueForInterpreter(
1733 hboost::any_cast<HOM_Parm *>(result), SWIG_POINTER_OWN);
1735 if (result.type() == ti::type_id<HOM_GalleryEntry *>())
1737 return HOMconvertValueForInterpreter(
1738 hboost::any_cast<HOM_GalleryEntry *>(result), SWIG_POINTER_OWN);
1741 return HOMboostAnyToInterpreterObject(result);
1748 struct traits_from<hboost::any>
1751 {
return HOMboostAnyToInterpreterObject(val); }
1755 static InterpreterObject
1756 HOMoptionsToInterpreterObject(
const UT_Options &options);
1758 static InterpreterObject
1759 HOMoptionEntryToInterpreterObject(
const UT_OptionEntry &option_entry)
1765 InterpreterObject result = NULL;
1767 switch (option_entry.
getType())
1774 return SWIG_From_bool(
1778 return SWIG_From_double(
1784 return SWIG_From_std_string(
1789 return HOMconvertValueForInterpreter(
1795 return HOMconvertValueForInterpreter(
1801 return HOMconvertValueForInterpreter(
1807 return HOMconvertValueForInterpreter(
1813 return HOMconvertValueForInterpreter(
1819 return HOMconvertValueForInterpreter(
1825 return HOMconvertValueForInterpreter(
1831 return HOMconvertValueForInterpreter(
1837 return HOMconvertValueForInterpreter(
1844 std::vector<int64> int_vector;
1846 static_cast<const UT_OptionInt64Array &>(option_entry)
1848 return swig::from(int_vector);
1853 std::vector<double> double_vector;
1855 static_cast<const UT_OptionFpreal64Array &>(option_entry)
1857 return swig::from(double_vector);
1862 std::vector<std::string> str_vector;
1863 UTarrayToStdVectorOfStrings(
1864 static_cast<const UT_OptionStringArray &>(option_entry)
1866 return swig::from(str_vector);
1873 return HOMoptionsToInterpreterObject(*opt.
options());
1879 InterpreterObject result = PyList_New(0);
1881 for (
auto && opt : optlist)
1883 PyList_Append(result, HOMoptionsToInterpreterObject(*opt.
options()));
1894 return result ? result : SWIG_Py_Void();
1898 static InterpreterObject
1899 HOMoptionsToInterpreterObject(
const UT_Options &options)
1905 InterpreterObject result = PyDict_New();
1911 InterpreterObject value=HOMoptionEntryToInterpreterObject(*it.entry());
1912 PyDict_SetItemString(result, it.name(),
value);
1919 static InterpreterObject
1920 HOMoptionsListToInterpreterObject(
const std::vector<UT_Options>& options)
1922 auto pysize = options.size();
1928 InterpreterObject list = PyList_New(pysize);
1929 for (
int i = 0; i < pysize; ++i)
1931 auto value = HOMoptionsToInterpreterObject(options[i]);
1933 PyList_SET_ITEM(list, i, value);
1944 template<
typename T>
1945 PyObject* HOMgetattr(T* hom_object,
const char *
name)
1953 PyObject *dict = context
1956 ? PyDict_GetItemString(dict, name) : NULL;
1959 if (!attribute && dict)
1962 attribute = name ? PyDict_GetItemString(dict, name) : NULL;
1968 return HOMincRef(attribute);
1974 error_message.
sprintf(
"'module' object has no attribute '%s'", name);
1975 PyErr_SetString(PyExc_AttributeError, error_message.
buffer());
1989 HOM_PyBuffer(InterpreterObject py_object)
1991 #if PY_VERSION_HEX >= 0x03000000
1992 myBytesObj =
nullptr;
1997 PyObject *obj = py_object;
1999 #if PY_VERSION_HEX >= 0x03000000
2001 if (PyUnicode_Check(obj))
2004 PyUnicode_AsEncodedString(obj,
"utf-8",
"surrogateescape");
2010 #if PY_VERSION_HEX >= 0x02060000
2011 myUseNewAPI =
false;
2012 if (PyObject_CheckBuffer(obj))
2014 if (PyObject_GetBuffer(obj, &myPyBuffer, PyBUF_SIMPLE) < 0)
2016 #if PY_VERSION_HEX >= 0x03000000
2017 cleanBytesObject_();
2019 throw HOM_TypeError(
"failed to get readable buffer");
2023 myData = myPyBuffer.buf;
2024 myLength = myPyBuffer.len;
2029 #if PY_VERSION_HEX >= 0x03000000
2030 cleanBytesObject_();
2031 throw HOM_TypeError(
"failed to get readable buffer");
2035 if (!PyObject_CheckReadBuffer(obj))
2036 throw HOM_TypeError(
"expected a readable buffer");
2038 if (PyObject_AsReadBuffer(obj, &myData, &myLength) < 0)
2039 throw HOM_TypeError(
"failed to get readable buffer");
2045 #if PY_VERSION_HEX >= 0x03000000
2046 cleanBytesObject_();
2049 #if PY_VERSION_HEX >= 0x02060000
2051 PyBuffer_Release(&myPyBuffer);
2055 #if PY_VERSION_HEX >= 0x03000000
2056 void cleanBytesObject_()
2061 Py_DECREF(myBytesObj);
2062 myBytesObj =
nullptr;
2066 #if PY_VERSION_HEX >= 0x03000000
2067 PyObject *myBytesObj;
2070 #if PY_VERSION_HEX >= 0x02060000
2072 Py_buffer myPyBuffer;
2075 Py_ssize_t myLength;
2085 template <
typename T,
typename A>
2087 HOMattribValue(T &geo_element,
A &hom_attrib,
2093 InterpreterObject result = NULL;
2094 const bool scalar = (attr_size == 1 && !is_array_type);
2095 switch (array_data_type)
2097 case HOM_attribData::Int_Id:
2099 result = swig::from(
2100 hboost::any_cast<int64>(geo_element.intAttribValue(hom_attrib)));
2102 result = swig::from(
2103 hboost::any_cast<std::vector<int64> >(
2104 geo_element.intListAttribValue(hom_attrib)));
2107 case HOM_attribData::Float_Id:
2109 result = SWIG_From_double(geo_element.floatAttribValue(hom_attrib));
2111 result = swig::from(geo_element.floatListAttribValue(hom_attrib));
2114 case HOM_attribData::String_Id:
2116 result = SWIG_From_std_string(
2117 geo_element.stringAttribValue(hom_attrib));
2119 result = swig::from(geo_element.stringListAttribValue(hom_attrib));
2122 case HOM_attribData::Dict_Id:
2124 result = swig::from(geo_element.dictAttribValue(hom_attrib));
2126 result = swig::from(geo_element.dictListAttribValue(hom_attrib));
2133 template <
typename T>
2135 HOMattribValue(T &geo_element,
HOM_Attrib &hom_attrib)
2137 return HOMattribValue(geo_element,
2144 template <
typename T>
2146 HOMattribValue(T &geo_element,
const char *name)
2149 bool is_array_type =
false;
2150 int attr_data_type = 0;
2151 geo_element._attribInfo(name,attr_data_type,attr_size,is_array_type);
2152 return HOMattribValue(geo_element,name, attr_size, is_array_type,
2161 static InterpreterObject
2166 case HOM_parmData::Int_Id:
2167 return swig::from(hboost::any_cast<int64>(parm.
evalAsInt()));
2168 case HOM_parmData::Float_Id:
2170 case HOM_parmData::String_Id:
2172 case HOM_parmData::Ramp_Id:
2173 return SWIG_NewPointerObj(
2174 (
void*)parm.
evalAsRamp(), SWIGTYPE_p_HOM_Ramp, SWIG_POINTER_OWN);
2175 case HOM_parmData::Data_Id:
2179 return SWIG_NewPointerObj(
2180 (
void*)parm.
evalAsGeometry(), SWIGTYPE_p_HOM_Geometry, SWIG_POINTER_OWN);
2184 return SWIG_Py_Void();
2187 static InterpreterObject
2188 HOMevalParmAtFrame(
HOM_Parm &parm,
double frame)
2192 case HOM_parmData::Int_Id:
2194 case HOM_parmData::Float_Id:
2196 case HOM_parmData::String_Id:
2198 case HOM_parmData::Ramp_Id:
2199 return SWIG_NewPointerObj(
2201 SWIGTYPE_p_HOM_Ramp, SWIG_POINTER_OWN);
2202 case HOM_parmData::Data_Id:
2206 return SWIG_NewPointerObj(
2208 SWIGTYPE_p_HOM_Geometry, SWIG_POINTER_OWN);
2212 return SWIG_Py_Void();
2215 static InterpreterObject
2220 case HOM_parmData::Int_Id:
2222 case HOM_parmData::Float_Id:
2224 case HOM_parmData::String_Id:
2226 case HOM_parmData::Ramp_Id:
2228 case HOM_parmData::Data_Id:
2230 == HOM_dataParmType::KeyValueDictionary_Id)
2239 return SWIG_Py_Void();
2242 static InterpreterObject
2243 HOMevalParmTupleAtFrame(
HOM_ParmTuple &parm_tuple,
double frame)
2247 case HOM_parmData::Int_Id:
2249 case HOM_parmData::Float_Id:
2251 case HOM_parmData::String_Id:
2253 case HOM_parmData::Ramp_Id:
2255 case HOM_parmData::Data_Id:
2257 == HOM_dataParmType::KeyValueDictionary_Id)
2266 return SWIG_Py_Void();
2269 static InterpreterObject
2274 case HOM_parmData::Int_Id:
2275 return swig::from(hboost::any_cast<int64>(visualizer.
evalParmAsInt(parm_name)));
2276 case HOM_parmData::Float_Id:
2278 case HOM_parmData::String_Id:
2280 case HOM_parmData::Ramp_Id:
2281 return SWIG_NewPointerObj(
2282 (
void*)visualizer.
evalParmAsRamp(parm_name), SWIGTYPE_p_HOM_Ramp,
2287 return SWIG_Py_Void();
UT_Matrix4T< double > UT_DMatrix4
virtual std::vector< HOM_ElemPtr< HOM_Geometry > > evalAsGeometries()=0
GLenum GLuint GLenum GLsizei const GLchar * buf
UT_Matrix3T< double > UT_DMatrix3
virtual std::vector< int > evalAsIntsAtFrame(double frame)=0
virtual std::string evalParmAsString(const char *parm_name)=0
virtual bool isArrayType()=0
virtual std::vector< HOM_ElemPtr< HOM_Ramp > > evalAsRampsAtFrame(double frame)=0
hboost::any HOM_UTOptionAny
void * opaqueObject() const noexcept
GLsizei const GLchar *const * string
GLsizei const GLfloat * value
virtual int parmDataTypeEnumId()=0
virtual double evalAsFloat()=0
virtual int opTypeIdAsInt()=0
virtual std::vector< int > evalAsInts()=0
SYS_FORCE_INLINE const char * buffer() const
**But if you need a result
__hostdev__ float getValue(uint32_t i) const
std::optional< T > UT_Optional
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 double evalAsFloatAtFrame(double frame)=0
virtual std::vector< std::map< std::string, std::string > > evalAsJSONMaps()=0
virtual int dataParmTypeEnumId()=0
bool any(const vbool4 &v)
virtual std::map< std::string, std::string > evalAsJSONMapAtFrame(double frame)=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
virtual std::map< std::string, std::string > evalAsJSONMap()=0
virtual int64 evalAsInt()=0
UT_Optional< int > HOM_OptionalInt
GLuint const GLchar * name
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t packed(VULKAN_HPP_NAMESPACE::Format format)
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 std::vector< double > evalAsFloats()=0
A map of string to various well defined value types.
virtual int opTypeIdAsInt()=0
virtual double evalParmAsFloat(const char *parm_name)=0
virtual int parmDataTypeEnumId(const char *parm_name)=0
SYS_FORCE_INLINE const UT_Options * options() const
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
UT_Optional< double > HOM_OptionalDouble
Adaptors between UT and std classes.
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 int64 evalAsIntAtFrame(double frame)=0
virtual HOM_Geometry * evalAsGeometry()=0