From 1780ea4760923edfa7a7b14d89729c2075bc854b Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:18:23 +0200 Subject: [PATCH] BIM: Fix move BuildingPart error (#14539) Fixes #14524. --- src/Mod/BIM/ArchBuildingPart.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Mod/BIM/ArchBuildingPart.py b/src/Mod/BIM/ArchBuildingPart.py index 90eec6eb44..1ed2fdd242 100644 --- a/src/Mod/BIM/ArchBuildingPart.py +++ b/src/Mod/BIM/ArchBuildingPart.py @@ -299,7 +299,8 @@ class BuildingPart(ArchIFC.IfcProduct): def execute(self,obj): - # gather all the child shapes into a compound + "gather all the child shapes into a compound" + pl = obj.Placement shapes,materialstable = self.getShapes(obj) if shapes: @@ -322,12 +323,13 @@ class BuildingPart(ArchIFC.IfcProduct): obj.ViewObject.Proxy.onChanged(obj.ViewObject,"AutoGroupBox") def getMovableChildren(self, obj): + "recursively get movable children" result = [] for child in obj.Group: - if isinstance(child, "App::DocumentObjectGroup"): - result.extend(getMovableChildren(child)) + if child.isDerivedFrom("App::DocumentObjectGroup"): + result.extend(self.getMovableChildren(child)) if not hasattr(child,"MoveWithHost") or child.MoveWithHost: if hasattr(child,"Placement"): result.append(child)