Expose method to Python to get property name of main geometry
fix inheritance of MeshFeaturePy fix inheritance of PartFeaturePy remove useless test() method implement getPyObject in GeoFeature in case a sub-class doesn't implement it
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#endif
|
||||
|
||||
#include "GeoFeature.h"
|
||||
#include <App/GeoFeaturePy.h>
|
||||
|
||||
using namespace App;
|
||||
|
||||
@@ -58,3 +59,12 @@ const PropertyComplexGeoData* GeoFeature::getPropertyOfGeometry() const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PyObject* GeoFeature::getPyObject(void)
|
||||
{
|
||||
if (PythonObject.is(Py::_None())) {
|
||||
// ref counter is set to 1
|
||||
PythonObject = Py::Object(new GeoFeaturePy(this),true);
|
||||
}
|
||||
return Py::new_reference_to(PythonObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user