[Bf-blender-cvs] [4879ffb8852] master: UI: Display panel tweaks

William Reynish noreply at git.blender.org
Fri May 3 10:26:25 CEST 2019


Commit: 4879ffb8852b15251c64b16ce3264eb938448471
Author: William Reynish
Date:   Fri May 3 10:26:24 2019 +0200
Branches: master
https://developer.blender.org/rB4879ffb8852b15251c64b16ce3264eb938448471

UI: Display panel tweaks

  - Use Display As rather than Draw Type, following naming conventions
  - Rename Advanced subpanel to Stretching, since that more accurately describes what it's for

===================================================================

M	release/scripts/startup/bl_ui/space_image.py
M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index b27895fa04b..af357a8cc12 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -866,9 +866,8 @@ class IMAGE_PT_view_display_uv_edit_overlays(Panel):
 
         col = layout.column()
 
+        col.prop(uvedit, "edge_display_type", text="Display As")
         col.prop(uvedit, "show_edges", text="Edges")
-        col.prop(uvedit, "edge_display_type", text="Draw Type")
-
         col.prop(uvedit, "show_faces", text="Faces")
 
         col = layout.column()
@@ -876,10 +875,10 @@ class IMAGE_PT_view_display_uv_edit_overlays(Panel):
         col.prop(uvedit, "show_modified_edges", text="Modified")
 
 
-class IMAGE_PT_view_display_uv_edit_overlays_advanced(Panel):
+class IMAGE_PT_view_display_uv_edit_overlays_stretch(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'UI'
-    bl_label = "Advanced"
+    bl_label = "Stretching"
     bl_parent_id = 'IMAGE_PT_view_display_uv_edit_overlays'
     bl_category = "View"
     bl_options = {'DEFAULT_CLOSED'}
@@ -889,6 +888,11 @@ class IMAGE_PT_view_display_uv_edit_overlays_advanced(Panel):
         sima = context.space_data
         return (sima and (sima.show_uvedit))
 
+    def draw_header(self, context):
+        sima = context.space_data
+        uvedit = sima.uv_editor
+        self.layout.prop(uvedit, "show_stretch", text="")
+
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True
@@ -896,12 +900,8 @@ class IMAGE_PT_view_display_uv_edit_overlays_advanced(Panel):
         sima = context.space_data
         uvedit = sima.uv_editor
 
-        col = layout.column()
-        col.prop(uvedit, "show_stretch", text="Stretch")
-
-        sub = col.column()
-        sub.active = uvedit.show_stretch
-        sub.prop(uvedit, "display_stretch_type", text="Type")
+        layout.active = uvedit.show_stretch
+        layout.prop(uvedit, "display_stretch_type", text="Type")
 
 
 class IMAGE_UL_render_slots(UIList):
@@ -1636,7 +1636,7 @@ classes = (
     IMAGE_PT_render_slots,
     IMAGE_PT_view_display,
     IMAGE_PT_view_display_uv_edit_overlays,
-    IMAGE_PT_view_display_uv_edit_overlays_advanced,
+    IMAGE_PT_view_display_uv_edit_overlays_stretch,
     IMAGE_PT_paint,
     IMAGE_PT_paint_color,
     IMAGE_PT_paint_swatches,
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 633164238e0..1e14fd06b4f 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2608,7 +2608,7 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
   prop = RNA_def_property(srna, "edge_display_type", PROP_ENUM, PROP_NONE);
   RNA_def_property_enum_sdna(prop, NULL, "dt_uv");
   RNA_def_property_enum_items(prop, dt_uv_items);
-  RNA_def_property_ui_text(prop, "Edge Display Type", "Display type for drawing UV edges");
+  RNA_def_property_ui_text(prop, "Display As", "Display style for UV edges");
   RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
 
   prop = RNA_def_property(srna, "show_smooth_edges", PROP_BOOLEAN, PROP_NONE);



More information about the Bf-blender-cvs mailing list