Add Python functionality for DrawHatch
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
|
||||
#include "DrawHatch.h"
|
||||
|
||||
#include "DrawHatchPy.h" // generated from DrawHatchPy.xml
|
||||
|
||||
using namespace TechDraw;
|
||||
using namespace std;
|
||||
|
||||
@@ -97,6 +99,15 @@ App::DocumentObjectExecReturn *DrawHatch::execute(void)
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
PyObject *DrawHatch::getPyObject(void)
|
||||
{
|
||||
if (PythonObject.is(Py::_None())) {
|
||||
// ref counter is set to 1
|
||||
PythonObject = Py::Object(new DrawHatchPy(this),true);
|
||||
}
|
||||
return Py::new_reference_to(PythonObject);
|
||||
}
|
||||
|
||||
// Python Drawing feature ---------------------------------------------------------
|
||||
|
||||
namespace App {
|
||||
|
||||
Reference in New Issue
Block a user