[Draft]Trap missing ViewObject attribute

- sometimes VO does not have DiffuseColor
  attribute
This commit is contained in:
wandererfan
2020-05-17 19:25:04 -04:00
committed by WandererFan
parent a697c838fc
commit 770e6c57c2

View File

@@ -106,8 +106,9 @@ def make_path_array(baseobject,pathobject,count,xlate=None,align=False,pathobjsu
else:
ViewProviderDraftArray(obj.ViewObject)
gui_utils.formatObject(obj,obj.Base)
if len(obj.Base.ViewObject.DiffuseColor) > 1:
obj.ViewObject.Proxy.resetColors(obj.ViewObject)
if hasattr(obj.Base.ViewObject, "DiffuseColor"):
if len(obj.Base.ViewObject.DiffuseColor) > 1:
obj.ViewObject.Proxy.resetColors(obj.ViewObject)
baseobject.ViewObject.hide()
gui_utils.select(obj)
return obj