[Bf-blender-cvs] [d9787141da1] modifier-panels-ui: Update Smooth modifier layout

William Reynish noreply at git.blender.org
Sun Apr 5 19:22:10 CEST 2020


Commit: d9787141da1862fb450a13b02cf2fe1971f91114
Author: William Reynish
Date:   Sun Apr 5 19:21:23 2020 +0200
Branches: modifier-panels-ui
https://developer.blender.org/rBd9787141da1862fb450a13b02cf2fe1971f91114

Update Smooth modifier layout

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

M	source/blender/modifiers/intern/MOD_smooth.c

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

diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c
index 7d0d1bf9b8b..29f8bd4818f 100644
--- a/source/blender/modifiers/intern/MOD_smooth.c
+++ b/source/blender/modifiers/intern/MOD_smooth.c
@@ -246,22 +246,30 @@ static void panel_draw(const bContext *C, Panel *panel)
 
   bool has_vertex_group = RNA_string_length(&ptr, "vertex_group") != 0;
 
-  split = uiLayoutSplit(layout, 0.25f, false);
-  col = uiLayoutColumn(split, false);
-  uiItemL(col, IFACE_("Axis:"), ICON_NONE);
-  uiItemR(col, &ptr, "use_x", 0, NULL, ICON_NONE);
-  uiItemR(col, &ptr, "use_y", 0, NULL, ICON_NONE);
-  uiItemR(col, &ptr, "use_z", 0, NULL, ICON_NONE);
-
-  col = uiLayoutColumn(split, false);
+  uiLayoutSetPropSep(layout, true);
+
+  /* Aligned axis booleans with a single label and no decorators. */
+  split = uiLayoutSplit(layout, 0.5f, false);
+  row = uiLayoutRow(split, false);
+  uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT);
+  uiItemL(row, IFACE_("Axis"), ICON_NONE);
+  row = uiLayoutRow(split, true);
+  uiLayoutSetPropSep(row, false);
+  PropertyRNA *prop = RNA_struct_find_property(&ptr, "use_axis");
+  uiItemR(row, &ptr, "use_x", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
+  uiItemR(row, &ptr, "use_y", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
+  uiItemR(row, &ptr, "use_z", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
+  uiItemL(row, "", ICON_BLANK1);
+
+  col = uiLayoutColumn(layout, false);
   uiItemR(col, &ptr, "factor", 0, NULL, ICON_NONE);
   uiItemR(col, &ptr, "iterations", 0, NULL, ICON_NONE);
-  uiItemL(col, IFACE_("Vertex Group:"), ICON_NONE);
-  row = uiLayoutRow(col, true);
-  uiItemPointerR(row, &ptr, "vertex_group", &ob_ptr, "vertex_groups", "", ICON_NONE);
+
+  row = uiLayoutRow(layout, true);
+  uiItemPointerR(row, &ptr, "vertex_group", &ob_ptr, "vertex_groups", NULL, ICON_NONE);
   sub = uiLayoutRow(row, true);
   uiLayoutSetActive(sub, has_vertex_group);
-  uiLayoutSetPropSep(sub, false);
+  uiLayoutSetPropDecorate(sub, false);
   uiItemR(sub, &ptr, "invert_vertex_group", 0, "", ICON_ARROW_LEFTRIGHT);
 
   modifier_panel_end(layout, &ptr);



More information about the Bf-blender-cvs mailing list