Skip to content
Snippets Groups Projects
Commit 40340832 authored by Philipp Oeser's avatar Philipp Oeser
Browse files

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
parent edc34891
No related branches found
No related tags found
No related merge requests found
...@@ -219,6 +219,9 @@ def create_materials(filepath, relpath, ...@@ -219,6 +219,9 @@ def create_materials(filepath, relpath,
if do_reflection: if do_reflection:
if "metallic" not in context_material_vars: if "metallic" not in context_material_vars:
context_mat_wrap.metallic = 1.0 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 do_transparency:
if "ior" not in context_material_vars: if "ior" not in context_material_vars:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment