File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 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):
204204
205205 # set as split normal per vertex
206206 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.
208208 # It has been removed and normals will be used automatically if they are set.
209209 # https://developer.blender.org/docs/release_notes/4.1/python_api/#mesh
210210 if bpy .app .version < (4 , 1 , 0 ):
@@ -217,8 +217,9 @@ def update_mesh(meshio_mesh, mesh):
217217
218218 # set split normal per loop per vertex
219219 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
222223 indices = [item for sublist in meshio_mesh .cell_data ["obj:vn_face_idx" ][0 ] for item in sublist ]
223224 mesh .normals_split_custom_set ([meshio_mesh .field_data ["obj:vn" ][i - 1 ] for i in indices ])
224225
You can’t perform that action at this time.
0 commit comments