Skip to content

Commit

Permalink
Fix model importing on Blender 4.1
Browse files Browse the repository at this point in the history
Fixes #184.
  • Loading branch information
lasa01 committed Jun 18, 2024
1 parent 55ca6d9 commit 805522a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plumber/asset/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def import_mesh(
mesh_data.polygons.foreach_set("use_smooth", [True] * polygons_len)
mesh_data.update(calc_edges=True)

mesh_data.use_auto_smooth = True
if bpy.app.version < (4, 1, 0):
mesh_data.use_auto_smooth = True

mesh_data.normals_split_custom_set_from_vertices(mesh.normals())

uv_layer = mesh_data.uv_layers.new()
Expand Down

0 comments on commit 805522a

Please sign in to comment.