[Bf-extensions-cvs] [d10b5e3d] blender2.8: Potential fix for T57280 (OBJ import: typo in material handling code).

Bastien Montagne noreply at git.blender.org
Wed Oct 17 14:00:32 CEST 2018


Commit: d10b5e3d8113db1bf05705847bd553e3707bb4d2
Author: Bastien Montagne
Date:   Wed Oct 17 13:58:58 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBAd10b5e3d8113db1bf05705847bd553e3707bb4d2

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

===================================================================

M	io_scene_obj/__init__.py
M	io_scene_obj/import_obj.py

===================================================================

diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index ab977ca9..e3d3d830 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -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",
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index cb18f911..c1b91e31 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -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)



More information about the Bf-extensions-cvs mailing list