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

Method isElementVisible

src/App/FeaturePython.cpp:460–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460int FeaturePythonImp::isElementVisible(const char* element) const
461{
462 _FC_PY_CALL_CHECK(isElementVisible, return (-2));
463 Base::PyGILStateLocker lock;
464 try {
465 Py::Tuple args(2);
466 args.setItem(0, Py::Object(object->getPyObject(), true));
467 args.setItem(1, Py::String(element ? element : ""));
468 return Py::Long(Base::pyCall(py_isElementVisible.ptr(), args.ptr()));
469 }
470 catch (Py::Exception&) {
471 if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) {
472 PyErr_Clear();
473 return -2;
474 }
475 Base::PyException e; // extract the Python error text
476 e.reportException();
477 return -1;
478 }
479}
480
481int FeaturePythonImp::setElementVisible(const char* element, bool visible)
482{

Callers 4

_getTopoShapeFunction · 0.45
expandSubObjectNamesFunction · 0.45
exportObjectMethod · 0.45

Calls 6

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

Tested by

no test coverage detected