| 105 | } |
| 106 | |
| 107 | bool 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 | |
| 131 | void FeaturePythonImp::onBeforeChange(const Property* prop) |
nothing calls this directly
no test coverage detected