diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-01-04 16:57:45 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-01-04 17:02:36 +0300 |
commit | 40340832e3992f46034b470aef1af6f7a3a4410f (patch) | |
tree | eae45f2831f0e1bfe490c576479a71d9313a07b4 /io_scene_obj | |
parent | edc34891367c03450f2bc36eac90b7e1b60d917c (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.py | 3 |
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: |