-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.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
|
||||
narrowui = 180
|
||||
|
||||
class IMAGE_MT_view(bpy.types.Menu):
|
||||
bl_label = "View"
|
||||
@@ -328,6 +329,7 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
|
||||
|
||||
sima = context.space_data
|
||||
ima = sima.image
|
||||
col2 = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@@ -348,7 +350,8 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
|
||||
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 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
|
||||
ima = sima.image
|
||||
show_uvedit = sima.show_uvedit
|
||||
uvedit = sima.uv_editor
|
||||
col2 = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@@ -379,7 +383,8 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
|
||||
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,22 +398,24 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
|
||||
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_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")
|
||||
|
||||
|
||||
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)
|
||||
|
||||
class IMAGE_PT_paint(bpy.types.Panel):
|
||||
bl_space_type = 'IMAGE_EDITOR'
|
||||
@@ -424,6 +431,7 @@ class IMAGE_PT_paint(bpy.types.Panel):
|
||||
|
||||
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 @@ class IMAGE_PT_paint(bpy.types.Panel):
|
||||
|
||||
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()
|
||||
|
||||
@@ -125,9 +125,9 @@ class VIEW3D_PT_tools_meshedit(View3DPanel):
|
||||
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:")
|
||||
|
||||
Reference in New Issue
Block a user