Merge pull request #9594 from wwmayer/issue_9549_new

Part: fixes #9549: Part Fuse not working inside Part container
This commit is contained in:
sliptonic
2023-07-24 10:16:51 -05:00
committed by GitHub
10 changed files with 262 additions and 129 deletions

View File

@@ -182,6 +182,15 @@ Return -1 if element visibility is not supported or element not found, 0 if invi
in a single group, hence only a single return value.</UserDocu>
</Documentation>
</Methode>
<Methode Name="getParent">
<Documentation>
<UserDocu>Returns the group the object is in or None if it is not part of a group.
Note that an object can only be in a single group, hence only a single return
value.
The parent can be a simple group as with getParentGroup() or a
GeoFeature group as with getParentGeoFeatureGroup().</UserDocu>
</Documentation>
</Methode>
<Methode Name="getPathsByOutList">
<Documentation>
<UserDocu>Get all paths from this object to another object following the OutList.</UserDocu>

View File

@@ -673,6 +673,24 @@ PyObject* DocumentObjectPy::getParentGeoFeatureGroup(PyObject *args)
}
}
PyObject* DocumentObjectPy::getParent(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return nullptr;
try {
auto grp = getDocumentObjectPtr()->getFirstParent();
if(!grp) {
Py_INCREF(Py_None);
return Py_None;
}
return grp->getPyObject();
}
catch (const Base::Exception& e) {
throw Py::RuntimeError(e.what());
}
}
Py::Boolean DocumentObjectPy::getMustExecute() const
{
try {