From c5ccc2fa5ccd84c6349de61827c381343b6b945e Mon Sep 17 00:00:00 2001
From: Paul Geraskin <paul_geraskin@mail.ru>
Date: Tue, 30 Jul 2013 10:19:02 +0000
Subject: [PATCH] [TextureAtlas] change to materials check. No need to check
 slots. As slots could be empty.

---
 uv_texture_atlas.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uv_texture_atlas.py b/uv_texture_atlas.py
index a3744a6d8..f82c378de 100644
--- a/uv_texture_atlas.py
+++ b/uv_texture_atlas.py
@@ -616,7 +616,7 @@ class MergeObjects(Operator):
             item.name = object.name
 
             # Add material to a tempObject if there are no materialSlots on the object
-            if len(activeNowObject.material_slots) == 0:
+            if len(activeNowObject.data.materials) == 0:
                 matName = "zz_TextureAtlas_NO_Material"
                 mat = bpy.data.materials.get(matName)
 
-- 
GitLab