MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / mustExecute

Method mustExecute

src/App/FeaturePython.cpp:107–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107bool FeaturePythonImp::mustExecute() const
108{
109 FC_PY_CALL_CHECK(mustExecute)
110 Base::PyGILStateLocker lock;
111 try {
112 if (has__object__) {
113 Py::Object res(Base::pyCall(py_mustExecute.ptr()));
114 return res.isTrue();
115 }
116 else {
117 Py::Tuple args(1);
118 args.setItem(0, Py::Object(object->getPyObject(), true));
119 Py::Object res(Base::pyCall(py_mustExecute.ptr(), args.ptr()));
120 return res.isTrue();
121 }
122 }
123 catch (Py::Exception&) {
124 Base::PyException e; // extract the Python error text
125 e.reportException();
126 }
127 return false;
128}
129
130
131void FeaturePythonImp::onBeforeChange(const Property* prop)

Callers

nothing calls this directly

Calls 5

pyCallFunction · 0.85
ObjectClass · 0.70
ptrMethod · 0.45
getPyObjectMethod · 0.45
reportExceptionMethod · 0.45

Tested by

no test coverage detected