[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4569] contrib/py/scripts/addons/ uv_texture_atlas.py: [TextureAtlas] Removed UV_Editing screen.
paul geraskin
paul_geraskin at mail.ru
Wed Jun 12 22:29:35 CEST 2013
Revision: 4569
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4569
Author: mifth
Date: 2013-06-12 20:29:35 +0000 (Wed, 12 Jun 2013)
Log Message:
-----------
[TextureAtlas] Removed UV_Editing screen. Added 8k, 16k textures by request.
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-12 14:21:37 UTC (rev 4568)
+++ contrib/py/scripts/addons/uv_texture_atlas.py 2013-06-12 20:29:35 UTC (rev 4569)
@@ -243,6 +243,8 @@
('1024', '1024', ''),
('2048', '2048', ''),
('4096', '4096', ''),
+ ('8192', '8192', ''),
+ ('16384', '16384', '')
),
)
template_list_controls = StringProperty(
@@ -399,7 +401,7 @@
bl_label = "add Lightmap"
bl_description = "Adds a new Lightmap Group"
- name = StringProperty(name="Group Name",default='lightmap')
+ name = StringProperty(name="Group Name",default='TextureAtlas')
def execute(self, context):
scene = context.scene
@@ -497,10 +499,14 @@
if self.group_name not in bpy.data.images:
bpy.ops.image.new(name=self.group_name,width=self.resolution,height=self.resolution)
bpy.ops.object.mode_set(mode = 'EDIT')
- bpy.data.screens['UV Editing'].areas[1].spaces[0].image = bpy.data.images[self.group_name]
+ context.area.type = 'IMAGE_EDITOR'
+ bpy.data.screens[bpy.context.screen.name].areas[1].spaces[0].image = bpy.data.images[self.group_name]
+ context.area.type = 'VIEW_3D'
else:
bpy.ops.object.mode_set(mode = 'EDIT')
- bpy.data.screens['UV Editing'].areas[1].spaces[0].image = bpy.data.images[self.group_name]
+ context.area.type = 'IMAGE_EDITOR'
+ bpy.data.screens[bpy.context.screen.name].areas[1].spaces[0].image = bpy.data.images[self.group_name]
+ context.area.type = 'VIEW_3D'
bpy.data.images[self.group_name].generated_type = 'COLOR_GRID'
bpy.data.images[self.group_name].generated_width = self.resolution
bpy.data.images[self.group_name].generated_height = self.resolution
More information about the Bf-extensions-cvs
mailing list