diff --git a/src/Mod/PartDesign/App/AppPartDesign.cpp b/src/Mod/PartDesign/App/AppPartDesign.cpp index f130609fc0..125de7caad 100644 --- a/src/Mod/PartDesign/App/AppPartDesign.cpp +++ b/src/Mod/PartDesign/App/AppPartDesign.cpp @@ -123,6 +123,7 @@ PyMOD_INIT_FUNC(_PartDesign) PartDesign::SubtractiveHelix ::init(); PartDesign::ShapeBinder ::init(); PartDesign::SubShapeBinder ::init(); + PartDesign::SubShapeBinderPython ::init(); PartDesign::Plane ::init(); PartDesign::Line ::init(); PartDesign::Point ::init(); diff --git a/src/Mod/PartDesign/App/ShapeBinder.cpp b/src/Mod/PartDesign/App/ShapeBinder.cpp index ab6d4cf866..ac042522c2 100644 --- a/src/Mod/PartDesign/App/ShapeBinder.cpp +++ b/src/Mod/PartDesign/App/ShapeBinder.cpp @@ -907,3 +907,13 @@ void SubShapeBinder::handleChangedPropertyType( } } +//////////////////////////////////////////////////////////////////////////////////////// + +namespace App { +PROPERTY_SOURCE_TEMPLATE(PartDesign::SubShapeBinderPython, PartDesign::SubShapeBinder) +template<> const char* PartDesign::SubShapeBinderPython::getViewProviderName(void) const { + return "PartDesignGui::ViewProviderSubShapeBinderPython"; +} +template class PartDesignExport FeaturePythonT; +} + diff --git a/src/Mod/PartDesign/App/ShapeBinder.h b/src/Mod/PartDesign/App/ShapeBinder.h index 5cac63bc6b..84570806ba 100644 --- a/src/Mod/PartDesign/App/ShapeBinder.h +++ b/src/Mod/PartDesign/App/ShapeBinder.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -146,6 +147,8 @@ protected: std::vector _CopiedObjs; }; +typedef App::FeaturePythonT SubShapeBinderPython; + } //namespace PartDesign diff --git a/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp b/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp index 32fcab7467..54b08fe1d5 100644 --- a/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp +++ b/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp @@ -152,6 +152,7 @@ PyMOD_INIT_FUNC(PartDesignGui) PartDesignGui::ViewProviderDatumCoordinateSystem::init(); PartDesignGui::ViewProviderShapeBinder ::init(); PartDesignGui::ViewProviderSubShapeBinder::init(); + PartDesignGui::ViewProviderSubShapeBinderPython::init(); PartDesignGui::ViewProviderBoolean ::init(); PartDesignGui::ViewProviderAddSub ::init(); PartDesignGui::ViewProviderPrimitive ::init(); diff --git a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp index 07df8ed040..6501cd337f 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp @@ -416,3 +416,10 @@ std::vector ViewProviderSubShapeBinder::claimChildren(void return ret; } +//////////////////////////////////////////////////////////////////////////////////////// + +namespace Gui { +PROPERTY_SOURCE_TEMPLATE(PartDesignGui::ViewProviderSubShapeBinderPython, + PartDesignGui::ViewProviderSubShapeBinder) +template class PartDesignGuiExport ViewProviderPythonFeatureT; +} diff --git a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.h b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.h index 4165f8e39d..ca340858a6 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.h +++ b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.h @@ -24,6 +24,7 @@ #ifndef PARTGUI_ViewProviderShapeBinder_H #define PARTGUI_ViewProviderShapeBinder_H +#include #include #include @@ -84,6 +85,8 @@ private: void updatePlacement(bool transaction); }; +typedef Gui::ViewProviderPythonFeatureT ViewProviderSubShapeBinderPython; + } // namespace PartDesignGui