From d961b98bbb5c5539c69d96f08caeee97e3333c79 Mon Sep 17 00:00:00 2001
From: Bastien Montagne <montagne29@wanadoo.fr>
Date: Fri, 5 Jun 2015 17:00:32 +0200
Subject: [PATCH] Fix T44947: OBJ importer adding dummy empty matslot (in
 non-split case).

---
 io_scene_obj/import_obj.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index 5054e63ad..330e0694a 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)
-- 
GitLab