Python functionality for ViewPart and ViewClip

This commit is contained in:
WandererFan
2016-01-23 16:05:34 -05:00
committed by wmayer
parent 5bf42856fd
commit 6d07fec219
8 changed files with 50 additions and 11 deletions

View File

@@ -41,6 +41,8 @@
#include "DrawViewCollection.h"
#include "DrawViewClip.h"
#include "DrawViewPy.h" // generated from DrawViewPy.xml
using namespace TechDraw;
@@ -170,6 +172,15 @@ bool DrawView::isInClip()
return false;
}
PyObject *DrawView::getPyObject(void)
{
if (PythonObject.is(Py::_None())) {
// ref counter is set to 1
PythonObject = Py::Object(new DrawViewPy(this),true);
}
return Py::new_reference_to(PythonObject);
}
// Python Drawing feature ---------------------------------------------------------
namespace App {