mirror of
https://github.com/DarklightGames/io_scene_psk_psa.git
synced 2024-12-18 09:15:57 +01:00
Now using shade_smooth
to smoothshade imported meshes (same as it did in the pre 4.0 versions)
This commit is contained in:
parent
c8e5b8eb47
commit
9fe5aa0388
@ -222,11 +222,13 @@ def import_psk(psk: Psk, context, options: PskImportOptions) -> PskImportResult:
|
|||||||
|
|
||||||
# VERTEX NORMALS
|
# VERTEX NORMALS
|
||||||
if psk.has_vertex_normals and options.should_import_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 = []
|
normals = []
|
||||||
for vertex_normal in psk.vertex_normals:
|
for vertex_normal in psk.vertex_normals:
|
||||||
normals.append(tuple(vertex_normal))
|
normals.append(tuple(vertex_normal))
|
||||||
mesh_data.normals_split_custom_set_from_vertices(normals)
|
mesh_data.normals_split_custom_set_from_vertices(normals)
|
||||||
|
else:
|
||||||
|
mesh_data.shade_smooth()
|
||||||
|
|
||||||
bm.normal_update()
|
bm.normal_update()
|
||||||
bm.free()
|
bm.free()
|
||||||
|
Loading…
Reference in New Issue
Block a user