Potential fix for T57280 (OBJ import: typo in material handling code).

This commit is contained in:
Bastien Montagne 2018-10-17 13:58:58 +02:00
parent a24896c2db
commit d10b5e3d81
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@
bl_info = {
"name": "Wavefront OBJ format",
"author": "Campbell Barton, Bastien Montagne",
"version": (3, 4, 2),
"version": (3, 4, 3),
"blender": (2, 80, 0),
"location": "File > Import-Export",
"description": "Import-Export OBJ, Import OBJ mesh, UV's, materials and textures",

View File

@ -227,7 +227,7 @@ def create_materials(filepath, relpath,
# TODO: Find a way to guesstimate best value from diffuse color...
# IDEA: Use standard deviation of both spec and diff colors (i.e. how far away they are
# from some grey), and apply the the proportion between those two as tint factor?
# ~ spec = sum(spec_color) / 3.0
spec = sum(spec_color) / 3.0
# ~ spec_var = math.sqrt(sum((c - spec) ** 2 for c in spec_color) / 3.0)
# ~ diff = sum(context_mat_wrap.base_color) / 3.0
# ~ diff_var = math.sqrt(sum((c - diff) ** 2 for c in context_mat_wrap.base_color) / 3.0)