From 6fb871e106031b0fcc240e5147ae5c42752eed3b Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Fri, 18 Mar 2011 04:09:34 +0000
Subject: [PATCH] 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.
---
 io_scene_obj/import_obj.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index 124654539..5d385e0a6 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -501,10 +501,15 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
                         if do_fresnel:
                             context_material.raytrace_mirror.raytrace_mirror.fresnel = 1.0  # could be any value for 'ON'
 
+                        """
                         if do_raytrace:
                             context_material.use_raytrace = True
                         else:
                             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'):
                         img_filepath = line_value(line.split())
-- 
GitLab