[Bf-extensions-cvs] [d961b98] master: Fix T44947: OBJ importer adding dummy empty matslot (in non-split case).

Bastien Montagne noreply at git.blender.org
Fri Jun 5 17:01:16 CEST 2015


Commit: d961b98bbb5c5539c69d96f08caeee97e3333c79
Author: Bastien Montagne
Date:   Fri Jun 5 17:00:32 2015 +0200
Branches: master
https://developer.blender.org/rBAd961b98bbb5c5539c69d96f08caeee97e3333c79

Fix T44947: OBJ importer adding dummy empty matslot (in non-split case).

===================================================================

M	io_scene_obj/import_obj.py

===================================================================

diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index 5054e63..330e069 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -170,8 +170,10 @@ def create_materials(filepath, relpath,
             unique_materials[name] = bpy.data.materials.new(name.decode('utf-8', "replace"))
             unique_material_images[name] = None  # assign None to all material images to start with, add to later.
 
-    unique_materials[None] = None
-    unique_material_images[None] = None
+    # XXX Why was this needed? Cannot find any good reason, and adds stupid empty matslot in case we do not separate
+    #     mesh (see T44947).
+    #~ unique_materials[None] = None
+    #~ unique_material_images[None] = None
 
     for libname in material_libs:
         # print(libname)



More information about the Bf-extensions-cvs mailing list