Skip to content
Snippets Groups Projects
Commit 6fb871e1 authored by Campbell Barton's avatar Campbell Barton
Browse files

address [#26527] Export-import OBJ, materials "tracaeble" unchecked

Enable raytracing on OBJ materials always, not conforming to OBJ spec but this is annoying for newer software where raytracing is default.
parent 6cbbe90e
No related branches found
No related tags found
No related merge requests found
...@@ -501,10 +501,15 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_ ...@@ -501,10 +501,15 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
if do_fresnel: if do_fresnel:
context_material.raytrace_mirror.raytrace_mirror.fresnel = 1.0 # could be any value for 'ON' context_material.raytrace_mirror.raytrace_mirror.fresnel = 1.0 # could be any value for 'ON'
"""
if do_raytrace: if do_raytrace:
context_material.use_raytrace = True context_material.use_raytrace = True
else: else:
context_material.use_raytrace = False context_material.use_raytrace = False
"""
# XXX, this is not following the OBJ spec, but this was
# written when raytracing wasnt default, annoying to disable for blender users.
context_material.use_raytrace = True
elif line_lower.startswith(b'map_ka'): elif line_lower.startswith(b'map_ka'):
img_filepath = line_value(line.split()) img_filepath = line_value(line.split())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment