Automatic WB switching and Active PartDesign body
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <Base/Placement.h>
|
||||
|
||||
#include "Body.h"
|
||||
#include "BodyPy.h"
|
||||
|
||||
|
||||
using namespace PartDesign;
|
||||
@@ -56,4 +57,13 @@ App::DocumentObjectExecReturn *Body::execute(void)
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
PyObject *Body::getPyObject(void)
|
||||
{
|
||||
if (PythonObject.is(Py::_None())){
|
||||
// ref counter is set to 1
|
||||
PythonObject = Py::Object(new BodyPy(this),true);
|
||||
}
|
||||
return Py::new_reference_to(PythonObject);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,10 +44,13 @@ public:
|
||||
App::DocumentObjectExecReturn *execute(void);
|
||||
short mustExecute() const;
|
||||
/// returns the type name of the view provider
|
||||
//const char* getViewProviderName(void) const {
|
||||
// return "PartDesignGui::ViewProviderBody";
|
||||
//}
|
||||
const char* getViewProviderName(void) const {
|
||||
return "PartDesignGui::ViewProviderBody";
|
||||
}
|
||||
//@}
|
||||
|
||||
PyObject *getPyObject(void);
|
||||
|
||||
};
|
||||
|
||||
} //namespace PartDesign
|
||||
|
||||
Reference in New Issue
Block a user