Merge pull request #4244 from danreb25/BBLPatch_ArchComponentDiffuseColor
Arch: deal with missing DiffuseColor attributes on obj.CloneOf.ViewObject
This commit is contained in:
@@ -1205,7 +1205,7 @@ class ViewProviderComponent:
|
||||
if hasattr(obj,"Material"):
|
||||
if obj.Material:
|
||||
mat = obj.Material
|
||||
if not mat:
|
||||
if (not mat) and hasattr(obj.CloneOf.ViewObject,"DiffuseColor"):
|
||||
if obj.ViewObject.DiffuseColor != obj.CloneOf.ViewObject.DiffuseColor:
|
||||
if len(obj.CloneOf.ViewObject.DiffuseColor) > 1:
|
||||
obj.ViewObject.DiffuseColor = obj.CloneOf.ViewObject.DiffuseColor
|
||||
@@ -1259,7 +1259,7 @@ class ViewProviderComponent:
|
||||
# this would now hide all previous windows... Not the desired behaviour anymore.
|
||||
if prop == "DiffuseColor":
|
||||
if hasattr(vobj.Object,"CloneOf"):
|
||||
if vobj.Object.CloneOf:
|
||||
if vobj.Object.CloneOf and hasattr(vobj.Object.CloneOf,"DiffuseColor"):
|
||||
if len(vobj.Object.CloneOf.ViewObject.DiffuseColor) > 1:
|
||||
if vobj.DiffuseColor != vobj.Object.CloneOf.ViewObject.DiffuseColor:
|
||||
vobj.DiffuseColor = vobj.Object.CloneOf.ViewObject.DiffuseColor
|
||||
|
||||
Reference in New Issue
Block a user