Automatic WB switching and Active PartDesign body

This commit is contained in:
jriegel
2012-05-05 17:10:52 +02:00
committed by Stefan Tröger
parent 5b23d06cfe
commit ee712eecf8
7 changed files with 28 additions and 9 deletions

View File

@@ -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);
}
}

View File

@@ -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