Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'uv_texture_atlas.py')
-rw-r--r--uv_texture_atlas.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/uv_texture_atlas.py b/uv_texture_atlas.py
index 3dbf8cb7..a3744a6d 100644
--- a/uv_texture_atlas.py
+++ b/uv_texture_atlas.py
@@ -617,13 +617,11 @@ class MergeObjects(Operator):
# Add material to a tempObject if there are no materialSlots on the object
if len(activeNowObject.material_slots) == 0:
- mat = None
matName = "zz_TextureAtlas_NO_Material"
+ mat = bpy.data.materials.get(matName)
- if bpy.data.materials.get(matName) is None:
+ if mat is None:
mat = bpy.data.materials.new(matName)
- else:
- mat = bpy.data.materials[matName]
activeNowObject.data.materials.append(mat)