Fix #105292: AnimAll: Error in load_post

Following 9d5b1c5d AnimAll would try to update animation data on file
load, but did not check that the animation data existed first.
This commit is contained in:
Damien Picard
2024-04-24 09:46:56 +02:00
parent cc687a0c50
commit 5b18a011d0

View File

@ -664,7 +664,8 @@ def update_attribute_animation(_):
("edges", "crease"): ("crease_edge", "FLOAT", "EDGE"),
}
for mesh in bpy.data.meshes:
print(f"Updating {mesh.name}")
if mesh.animation_data is None:
continue
for fcurve in mesh.animation_data.action.fcurves:
if fcurve.data_path.startswith("vertex_colors"):
# Update pre-3.3 vertex colors