+ make FEM beam section and shell thickness ready for drag and drop

This commit is contained in:
wmayer
2015-10-19 14:48:07 +02:00
parent b6a1e15aee
commit 19aa17cd27
6 changed files with 28 additions and 3 deletions

View File

@@ -28,6 +28,7 @@
#include "FemAnalysis.h"
#include <App/DocumentObjectPy.h>
#include <App/FeaturePythonPyImp.h>
#include <Base/Placement.h>
#include <Base/Uuid.h>
@@ -88,4 +89,24 @@ template<> const char* Fem::FemAnalysisPython::getViewProviderName(void) const {
// explicit template instantiation
template class AppFemExport FeaturePythonT<Fem::FemAnalysis>;
}
}
// ---------------------------------------------------------
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Fem::FeaturePython, App::DocumentObject)
template<> const char* Fem::FeaturePython::getViewProviderName(void) const {
return "Gui::ViewProviderPythonFeature";
}
template<> PyObject* Fem::FeaturePython::getPyObject(void) {
if (PythonObject.is(Py::_None())) {
// ref counter is set to 1
PythonObject = Py::Object(new App::FeaturePythonPyT<App::DocumentObjectPy>(this),true);
}
return Py::new_reference_to(PythonObject);
}
// explicit template instantiation
template class AppFemExport FeaturePythonT<App::DocumentObject>;
/// @endcond
}