Fix: glTF importer shading flat/smooth #104717

Merged
Julien Duroure merged 2 commits from fix_gltf_shading into blender-v3.6-release 2023-06-26 19:20:01 +02:00
Showing only changes of commit fe264350bd - Show all commits

View File

@ -642,8 +642,7 @@ def set_poly_smoothing(gltf, pymesh, mesh, vert_normals, loop_vidxs):
if gltf.import_settings['import_shading'] == "FLAT": if gltf.import_settings['import_shading'] == "FLAT":
# Polys are smooth by default, setting to flat # Polys are smooth by default, setting to flat
poly_smooths = np.full(num_polys, False) mesh.shade_flat()
mesh.polygons.foreach_set('use_smooth', poly_smooths)
return return
if gltf.import_settings['import_shading'] == "SMOOTH": if gltf.import_settings['import_shading'] == "SMOOTH":