File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ def update_mesh(meshio_mesh, mesh):
204
204
205
205
# set as split normal per vertex
206
206
if mesh .BSEQ .split_norm_att_name and mesh .BSEQ .split_norm_att_name == k :
207
- # If blender version is less than 4.1.0, then dont set auto smooth.
207
+ # If blender version is greater than 4.1.0, then don't set auto smooth.
208
208
# It has been removed and normals will be used automatically if they are set.
209
209
# https://developer.blender.org/docs/release_notes/4.1/python_api/#mesh
210
210
if bpy .app .version < (4 , 1 , 0 ):
@@ -217,8 +217,9 @@ def update_mesh(meshio_mesh, mesh):
217
217
218
218
# set split normal per loop per vertex
219
219
if mesh .BSEQ .split_norm_att_name and mesh .BSEQ .split_norm_att_name == k :
220
- # Currently hard-coded for .obj files
221
- mesh .use_auto_smooth = True
220
+ if bpy .app .version < (4 , 1 , 0 ):
221
+ mesh .use_auto_smooth = True
222
+ # currently hard-coded for .obj files
222
223
indices = [item for sublist in meshio_mesh .cell_data ["obj:vn_face_idx" ][0 ] for item in sublist ]
223
224
mesh .normals_split_custom_set ([meshio_mesh .field_data ["obj:vn" ][i - 1 ] for i in indices ])
224
225
You can’t perform that action at this time.
0 commit comments