Add Python wrapper for pipeline object

This commit is contained in:
wmayer
2017-05-18 18:40:25 +02:00
parent 831ceae546
commit 583574dfcc
5 changed files with 153 additions and 1 deletions

View File

@@ -35,6 +35,7 @@
#include <App/Document.h>
#include <SMESH_Mesh.hxx>
#include <App/DocumentObjectPy.h>
#include <Mod/Fem/App/FemPostPipelinePy.h>
#include <vtkDataSetReader.h>
#include <vtkGeometryFilter.h>
@@ -267,3 +268,12 @@ void FemPostPipeline::load(FemResultObject* res) {
Data.setValue(grid);
}
PyObject* FemPostPipeline::getPyObject(void)
{
if (PythonObject.is(Py::_None())) {
// ref counter is set to 1
PythonObject = Py::Object(new FemPostPipelinePy(this),true);
}
return Py::new_reference_to(PythonObject);
}