Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2019-01-04 16:57:45 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-01-04 17:02:36 +0300
commit40340832e3992f46034b470aef1af6f7a3a4410f (patch)
treeeae45f2831f0e1bfe490c576479a71d9313a07b4 /io_scene_obj
parentedc34891367c03450f2bc36eac90b7e1b60d917c (diff)
OBJ Import: better handling for metallic
retrival of metallic (ab)uses OBJ material ambient term. this can be non-zero, but in case of no reflections (OBJ 'illum' < 3) metallic should be zero. Fixes T60150
Diffstat (limited to 'io_scene_obj')
-rw-r--r--io_scene_obj/import_obj.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index a8e08872..a065f7e1 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -219,6 +219,9 @@ def create_materials(filepath, relpath,
if do_reflection:
if "metallic" not in context_material_vars:
context_mat_wrap.metallic = 1.0
+ else:
+ # since we are (ab)using ambient term for metallic (which can be non-zero)
+ context_mat_wrap.metallic = 0.0
if do_transparency:
if "ior" not in context_material_vars: