From 728fdfb06ac18af6f4315151eea04f99a5be9f53 Mon Sep 17 00:00:00 2001 From: danreb25 Date: Sat, 7 Mar 2020 08:08:27 +0100 Subject: [PATCH] getColors BUG correction correction proposed as explained in the forum topic https://forum.freecadweb.org/viewtopic.php?f=3&t=42191 --- src/Mod/Arch/ArchBuildingPart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchBuildingPart.py b/src/Mod/Arch/ArchBuildingPart.py index 71f5b7fec9..5f4d5497e1 100644 --- a/src/Mod/Arch/ArchBuildingPart.py +++ b/src/Mod/Arch/ArchBuildingPart.py @@ -645,8 +645,8 @@ class ViewProviderBuildingPart: colors = [] for child in Draft.getGroupContents(obj): - if hasattr(child,'Shape'): - if len(child.ViewObject.DiffuseColor) == len(child.Shape.Faces): + if hasattr(child,'Shape') and (hasattr(child.ViewObject,"DiffuseColor") or hasattr(child.ViewObject,"ShapeColor")): + if hasattr(child.ViewObject,"DiffuseColor") and len(child.ViewObject.DiffuseColor) == len(child.Shape.Faces): colors.extend(child.ViewObject.DiffuseColor) else: c = child.ViewObject.ShapeColor[:3]+(child.ViewObject.Transparency/100.0,)