Commit 5a4e5e91 authored by Andrey Filippov's avatar Andrey Filippov

minor bug fix, related to previous changes

parent 01577f6c
...@@ -999,8 +999,11 @@ def prepareX3dExport(freecadObjects, fname=""): ...@@ -999,8 +999,11 @@ def prepareX3dExport(freecadObjects, fname=""):
if (not o.ViewObject) or (o.ViewObject.Visibility): if (not o.ViewObject) or (o.ViewObject.Visibility):
if hasattr(o, "Shape"): if hasattr(o, "Shape"):
color_set=set() color_set=set()
if o.ViewObject: try:
for clr in o.ViewObject.DiffuseColor: dc = o.ViewObject.DiffuseColor
except AttributeError:
continue
for clr in dc:
color_set.add(clr) color_set.add(clr)
if (len(color_set)>1): # process multi-color objects if (len(color_set)>1): # process multi-color objects
col_list = list(color_set) col_list = list(color_set)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment