From 23ead6420a35407e879713614d955a237b8c840c Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Tue, 4 Dec 2012 01:08:18 +0000
Subject: [PATCH] fix for exporting OBJ files without a material - would get
 blank 'newmtl' ID's

---
 io_scene_obj/export_obj.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index 1bb41ebff..a0926cc47 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -393,7 +393,7 @@ def write_file(filepath, objects, scene,
             # avoid bad index errors
             if not materials:
                 materials = [None]
-                material_names = [""]
+                material_names = [name_compat(None)]
 
             # Sort by Material, then images
             # so we dont over context switch in the obj file.
-- 
GitLab