Arch: Fixed buggy import/export of 2D objects to IFC

This commit is contained in:
Yorik van Havre
2018-11-09 16:56:59 -02:00
parent 3d8b815834
commit a8fda8df0b
5 changed files with 156 additions and 79 deletions

View File

@@ -548,7 +548,8 @@ class ViewProviderBuildingPart:
colors = self.getColors(obj)
if colors and hasattr(obj.ViewObject,"DiffuseColor"):
if len(colors) == len(obj.Shape.Faces):
obj.ViewObject.DiffuseColor = colors
if colors != obj.ViewObject.DiffuseColor:
obj.ViewObject.DiffuseColor = colors
def getColors(self,obj):
@@ -576,6 +577,8 @@ class ViewProviderBuildingPart:
def onChanged(self,vobj,prop):
#print(vobj.Object.Label," - ",prop)
if prop == "ShapeColor":
if hasattr(vobj,"ShapeColor"):
l = vobj.ShapeColor