[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4564] contrib/py/scripts/addons/ uv_texture_atlas.py: [TextureAtlas] fixes2.
paul geraskin
paul_geraskin at mail.ru
Tue Jun 11 09:24:37 CEST 2013
Revision: 4564
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4564
Author: mifth
Date: 2013-06-11 07:24:36 +0000 (Tue, 11 Jun 2013)
Log Message:
-----------
[TextureAtlas] fixes2.
Modified Paths:
--------------
contrib/py/scripts/addons/uv_texture_atlas.py
Modified: contrib/py/scripts/addons/uv_texture_atlas.py
===================================================================
--- contrib/py/scripts/addons/uv_texture_atlas.py 2013-06-10 15:32:30 UTC (rev 4563)
+++ contrib/py/scripts/addons/uv_texture_atlas.py 2013-06-11 07:24:36 UTC (rev 4564)
@@ -401,24 +401,25 @@
def execute(self, context):
- idx = context.scene.ms_lightmap_groups_index
- group_name = context.scene.ms_lightmap_groups[idx].name
+ if len(context.scene.ms_lightmap_groups) > 0:
+ idx = context.scene.ms_lightmap_groups_index
+ group_name = context.scene.ms_lightmap_groups[idx].name
- # Remove Group
- for groupObj in bpy.data.groups:
- if groupObj.name == group_name:
+ # Remove Group
+ for groupObj in bpy.data.groups:
+ if groupObj.name == group_name:
- # Unhide Objects if they are hidden
- for obj in bpy.data.groups[group_name].objects:
- obj.hide_render = False
+ # Unhide Objects if they are hidden
+ for obj in bpy.data.groups[group_name].objects:
+ obj.hide_render = False
- bpy.data.groups.remove(bpy.data.groups[context.scene.ms_lightmap_groups[idx].name])
+ bpy.data.groups.remove(bpy.data.groups[context.scene.ms_lightmap_groups[idx].name])
- # Remove Lightmap Group
- context.scene.ms_lightmap_groups.remove(context.scene.ms_lightmap_groups_index)
- context.scene.ms_lightmap_groups_index -= 1
- if context.scene.ms_lightmap_groups_index < 0:
- context.scene.ms_lightmap_groups_index = 0
+ # Remove Lightmap Group
+ context.scene.ms_lightmap_groups.remove(context.scene.ms_lightmap_groups_index)
+ context.scene.ms_lightmap_groups_index -= 1
+ if context.scene.ms_lightmap_groups_index < 0:
+ context.scene.ms_lightmap_groups_index = 0
return {'FINISHED'}
More information about the Bf-extensions-cvs
mailing list