Fix #106759: Error on running blender_icons_geom.py with curve

288e7d0af0 added support for legacy curves, these dont have attributes
though, but code was checking for an active color atttribute.

Now, only do this check (and skip that object) if it has no attributes (or
doesnt have vertex or active color atttribute).

Pull Request: https://projects.blender.org/blender/blender/pulls/108647
This commit is contained in:
Philipp Oeser
2023-06-08 10:21:54 +02:00
committed by Philipp Oeser
parent bc5275e204
commit 7ffd73100e

View File

@@ -350,7 +350,7 @@ def main():
if name.rpartition(".")[2].isdigit():
continue
if not ob_eval.data.attributes.active_color:
if (not hasattr(ob_eval.data, 'attributes')) or not ob_eval.data.attributes.active_color:
print("Skipping:", name, "(no vertex colors)")
continue