Skip to content

Commit

Permalink
App: expose recompute controlling to Python
Browse files Browse the repository at this point in the history
Add readable-writeable attribute "RecomputesFrozen" to DocumentObject.
  • Loading branch information
DeepSOIC authored and wwmayer committed Mar 26, 2017
1 parent 1e546b3 commit 03f9d81
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/App/DocumentPy.xml
Expand Up @@ -205,6 +205,12 @@ Both parameters are optional.</UserDocu>
</Documentation>
<Parameter Name="Name" Type="String"/>
</Attribute>
<Attribute Name="RecomputesFrozen">
<Documentation>
<UserDocu>Returns or sets if automatic recomputes for this document are disabled.</UserDocu>
</Documentation>
<Parameter Name="RecomputesFrozen" Type="Boolean"/>
</Attribute>
<CustomAttributes />
</PythonExport>
</GenerateModel>
10 changes: 10 additions & 0 deletions src/App/DocumentPyImp.cpp
Expand Up @@ -573,6 +573,16 @@ Py::String DocumentPy::getName(void) const
return Py::String(getDocumentPtr()->getName());
}

Py::Boolean DocumentPy::getRecomputesFrozen(void) const
{
return Py::Boolean(getDocumentPtr()->testStatus(Document::Status::SkipRecompute));
}

void DocumentPy::setRecomputesFrozen(Py::Boolean arg)
{
getDocumentPtr()->setStatus(Document::Status::SkipRecompute, arg.isTrue());
}

PyObject* DocumentPy::getTempFileName(PyObject *args)
{
PyObject *value;
Expand Down

0 comments on commit 03f9d81

Please sign in to comment.