Arch: Fixed buggy import/export of 2D objects to IFC
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user