[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24620] trunk/blender/release/scripts/ui: -Single column UI for image editor.
William Reynish
william at reynish.com
Tue Nov 17 19:53:53 CET 2009
Revision: 24620
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24620
Author: billrey
Date: 2009-11-17 19:53:53 +0100 (Tue, 17 Nov 2009)
Log Message:
-----------
-Single column UI for image editor.
-Added buttons for Mark and Clear Seam in toolbar, replacing the less useful Rotate UVs and Mirror UVs commands.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/space_image.py
trunk/blender/release/scripts/ui/space_view3d_toolbar.py
Modified: trunk/blender/release/scripts/ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/ui/space_image.py 2009-11-17 17:09:54 UTC (rev 24619)
+++ trunk/blender/release/scripts/ui/space_image.py 2009-11-17 18:53:53 UTC (rev 24620)
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
+narrowui = 180
class IMAGE_MT_view(bpy.types.Menu):
bl_label = "View"
@@ -328,6 +329,7 @@
sima = context.space_data
ima = sima.image
+ col2 = context.region.width > narrowui
split = layout.split()
@@ -348,7 +350,8 @@
sub.itemR(ima, "tiles_x", text="X")
sub.itemR(ima, "tiles_y", text="Y")
- col = split.column()
+ if col2:
+ col = split.column()
col.itemL(text="Clamp:")
col.itemR(ima, "clamp_x", text="X")
col.itemR(ima, "clamp_y", text="Y")
@@ -372,6 +375,7 @@
ima = sima.image
show_uvedit = sima.show_uvedit
uvedit = sima.uv_editor
+ col2 = context.region.width > narrowui
split = layout.split()
@@ -379,7 +383,8 @@
if ima:
col.itemR(ima, "display_aspect", text="Aspect Ratio")
- col = split.column()
+ if col2:
+ col = split.column()
col.itemL(text="Coordinates:")
col.itemR(sima, "draw_repeated", text="Repeat")
if show_uvedit:
@@ -393,23 +398,25 @@
col = layout.column()
col.itemL(text="UVs:")
row = col.row()
- row.itemR(uvedit, "edge_draw_type", expand=True)
+ if col2:
+ row.itemR(uvedit, "edge_draw_type", expand=True)
+ else:
+ row.itemR(uvedit, "edge_draw_type", text="")
split = layout.split()
-
col = split.column()
+ col.itemR(uvedit, "draw_smooth_edges", text="Smooth")
+ col.itemR(uvedit, "draw_modified_edges", text="Modified")
+ #col.itemR(uvedit, "draw_edges")
+ #col.itemR(uvedit, "draw_faces")
+
+ if col2:
+ col = split.column()
col.itemR(uvedit, "draw_stretch", text="Stretch")
sub = col.column()
sub.active = uvedit.draw_stretch
sub.row().itemR(uvedit, "draw_stretch_type", expand=True)
- col = split.column()
- col.itemR(uvedit, "draw_smooth_edges", text="Smooth")
- col.itemR(uvedit, "draw_modified_edges", text="Modified")
- #col.itemR(uvedit, "draw_edges")
- #col.itemR(uvedit, "draw_faces")
-
-
class IMAGE_PT_paint(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
@@ -424,6 +431,7 @@
settings = context.tool_settings.image_paint
brush = settings.brush
+ col2 = context.region.width > narrowui
col = layout.split().column()
row = col.row()
@@ -431,11 +439,14 @@
col.template_ID(settings, "brush", new="brush.add")
- row = layout.row(align=True)
- row.item_enumR(settings, "tool", 'DRAW')
- row.item_enumR(settings, "tool", 'SOFTEN')
- row.item_enumR(settings, "tool", 'CLONE')
- row.item_enumR(settings, "tool", 'SMEAR')
+ if col2:
+ sub = layout.row(align=True)
+ else:
+ sub = layout.column(align=True)
+ sub.item_enumR(settings, "tool", 'DRAW')
+ sub.item_enumR(settings, "tool", 'SOFTEN')
+ sub.item_enumR(settings, "tool", 'CLONE')
+ sub.item_enumR(settings, "tool", 'SMEAR')
if brush:
col = layout.column()
Modified: trunk/blender/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d_toolbar.py 2009-11-17 17:09:54 UTC (rev 24619)
+++ trunk/blender/release/scripts/ui/space_view3d_toolbar.py 2009-11-17 18:53:53 UTC (rev 24620)
@@ -125,10 +125,10 @@
col = layout.column(align=True)
col.itemL(text="UV Mapping:")
col.item_stringO("wm.call_menu", "name", "VIEW3D_MT_uv_map", text="Unwrap")
-
- col.itemO("mesh.uvs_rotate")
- col.itemO("mesh.uvs_mirror")
+ col.itemO("mesh.mark_seam")
+ col.item_booleanO("mesh.mark_seam", "clear", True, text="Clear Seam")
+
col = layout.column(align=True)
col.itemL(text="Shading:")
row = col.row()
More information about the Bf-blender-cvs
mailing list