From 9fe5aa03889094b7faa963a1b32a1e0def33e741 Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Tue, 14 Nov 2023 00:50:20 -0800 Subject: [PATCH] Now using `shade_smooth` to smoothshade imported meshes (same as it did in the pre 4.0 versions) --- io_scene_psk_psa/psk/importer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io_scene_psk_psa/psk/importer.py b/io_scene_psk_psa/psk/importer.py index 3d40c6e..c701db9 100644 --- a/io_scene_psk_psa/psk/importer.py +++ b/io_scene_psk_psa/psk/importer.py @@ -222,11 +222,13 @@ def import_psk(psk: Psk, context, options: PskImportOptions) -> PskImportResult: # VERTEX NORMALS if psk.has_vertex_normals and options.should_import_vertex_normals: - mesh_data.polygons.foreach_set("use_smooth", [True] * len(mesh_data.polygons)) + mesh_data.polygons.foreach_set('use_smooth', [True] * len(mesh_data.polygons)) normals = [] for vertex_normal in psk.vertex_normals: normals.append(tuple(vertex_normal)) mesh_data.normals_split_custom_set_from_vertices(normals) + else: + mesh_data.shade_smooth() bm.normal_update() bm.free()