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

Method getParent

src/App/DocumentObjectPyImp.cpp:868–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866}
867
868PyObject* DocumentObjectPy::getParent(PyObject* args)
869{
870 if (!PyArg_ParseTuple(args, "")) {
871 return nullptr;
872 }
873
874 try {
875 auto grp = getDocumentObjectPtr()->getFirstParent();
876 if (!grp) {
877 Py_INCREF(Py_None);
878 return Py_None;
879 }
880 return grp->getPyObject();
881 }
882 catch (const Base::Exception& e) {
883 throw Py::RuntimeError(e.what());
884 }
885}
886
887Py::Boolean DocumentObjectPy::getMustExecute() const
888{

Callers

nothing calls this directly

Calls 3

getFirstParentMethod · 0.80
getPyObjectMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected