Skip to content

Commit

Permalink
getColors BUG correction
Browse files Browse the repository at this point in the history
correction proposed as explained in the forum topic https://forum.freecadweb.org/viewtopic.php?f=3&t=42191
  • Loading branch information
danreb25 authored and yorikvanhavre committed Mar 12, 2020
1 parent e41915e commit 728fdfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Arch/ArchBuildingPart.py
Expand Up @@ -645,8 +645,8 @@ def getColors(self,obj):

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,)
Expand Down

0 comments on commit 728fdfb

Please sign in to comment.