From 92891ae552f3d0c58a5e4cb9d446be1592ec136d Mon Sep 17 00:00:00 2001 From: Scut Date: Sat, 13 Apr 2024 14:19:31 -0400 Subject: [PATCH] Blender Version 4.1 Fix (#325) * blend 4.1 compat * made change version exclusive --------- Co-authored-by: IssaCardona Co-authored-by: scut --- fast64_internal/f3d/f3d_writer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fast64_internal/f3d/f3d_writer.py b/fast64_internal/f3d/f3d_writer.py index c0c5ffa29..34a11d832 100644 --- a/fast64_internal/f3d/f3d_writer.py +++ b/fast64_internal/f3d/f3d_writer.py @@ -138,7 +138,9 @@ def getInfoDict_impl(obj: bpy.types.Object): # check mesh.loop_triangles (now that we computed them), used below check_face_materials(get_original_name(obj), material_slots, mesh.loop_triangles) - mesh.calc_normals_split() + # in blender version 4.1 func was removed, in 4.1+ normals are always calculated + if bpy.app.version < (4, 1, 0): + mesh.calc_normals_split() infoDict = MeshInfo()