Core: Add getRootObjectsIgnoreLinks and fix bugs in tree.cpp and AssemblyObject.cpp, CommandInsertLink.py, UtilsAssembly.py

This commit is contained in:
PaddleStroke
2024-05-10 11:26:33 +02:00
committed by Yorik van Havre
parent 7096125038
commit 5f4dd814ea
8 changed files with 51 additions and 5 deletions

View File

@@ -297,7 +297,7 @@ def getGlobalPlacement(targetObj, container=None):
return App.Placement()
inContainerBranch = container is None
for rootObj in App.activeDocument().RootObjects:
for rootObj in App.activeDocument().RootObjectsIgnoreLinks:
foundPlacement = getTargetPlacementRelativeTo(
targetObj, rootObj, container, inContainerBranch
)
@@ -308,7 +308,7 @@ def getGlobalPlacement(targetObj, container=None):
def isThereOneRootAssembly():
for part in App.activeDocument().RootObjects:
for part in App.activeDocument().RootObjectsIgnoreLinks:
if part.TypeId == "Assembly::AssemblyObject":
return True
return False