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
This commit is contained in:
Philipp Oeser 2019-01-04 14:57:45 +01:00
parent edc3489136
commit 40340832e3
Notes: blender-bot 2023-02-14 04:12:31 +01:00
Referenced by issue blender/blender#60150, export obj with material metallic will from 0 to 1
1 changed files with 3 additions and 0 deletions

View File

@ -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: