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
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (3, 6, 25),
"version": (3, 6, 27),
'blender': (3, 5, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -641,7 +641,8 @@ def set_poly_smoothing(gltf, pymesh, mesh, vert_normals, loop_vidxs):
num_polys = len(mesh.polygons)
if gltf.import_settings['import_shading'] == "FLAT":
# Polys are flat by default; don't have to do anything
# Polys are smooth by default, setting to flat
mesh.shade_flat()
return
if gltf.import_settings['import_shading'] == "SMOOTH":