expose recompute() of document object to Python

This commit is contained in:
wmayer
2016-11-19 16:24:11 +01:00
parent a16b143664
commit 2a145a12e1
5 changed files with 43 additions and 19 deletions

View File

@@ -256,6 +256,19 @@ PyObject* DocumentObjectPy::setExpression(PyObject * args)
Py_Return;
}
PyObject* DocumentObjectPy::recompute(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
try {
bool ok = getDocumentObjectPtr()->recomputeFeature();
return Py_BuildValue("O", (ok ? Py_True : Py_False));
}
catch (const Base::Exception& e) {
throw Py::RuntimeError(e.what());
}
}
PyObject *DocumentObjectPy::getCustomAttributes(const char* attr) const
{