Add python object for the FemMesh ViewProvider for later postprecessing capabilities

This commit is contained in:
jriegel
2013-08-04 20:39:08 +02:00
parent 88d558b984
commit a5262f9cb7
5 changed files with 108 additions and 0 deletions

View File

@@ -51,6 +51,7 @@
#endif
#include "ViewProviderFemMesh.h"
#include "ViewProviderFemMeshPy.h"
#include <Mod/Fem/App/FemMeshObject.h>
#include <Mod/Fem/App/FemMesh.h>
@@ -477,6 +478,14 @@ void ViewProviderFemMesh::resetHighlightNodes(void)
pcAnoCoords->point.setNum(0);
}
PyObject * ViewProviderFemMesh::getPyObject()
{
if (PythonObject.is(Py::_None())){
// ref counter is set to 1
PythonObject = Py::Object(new ViewProviderFemMeshPy(this),true);
}
return Py::new_reference_to(PythonObject);
}
// ----------------------------------------------------------------------------