Commit: bbeb31f4cef037be10851365e6d7d9b7becb128b Author: William Reynish Date: Thu Apr 9 14:16:44 2020 +0200 Branches: modifier-panels-ui https://developer.blender.org/rBbbeb31f4cef037be10851365e6d7d9b7becb128b
Trying new checkbox+value configuration for Mirror UVs =================================================================== M source/blender/modifiers/intern/MOD_mirror.c =================================================================== diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 1910ce5db02..cbb094619c5 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -205,7 +205,7 @@ static void symmetry_panel_draw(const bContext *C, Panel *panel) static void uv_panel_draw(const bContext *C, Panel *panel) { - uiLayout *col, *row, *split; + uiLayout *col, *row, *split, *sub, *decorator_layout; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -213,24 +213,21 @@ static void uv_panel_draw(const bContext *C, Panel *panel) uiLayoutSetPropSep(layout, true); - /* Flip U and V booleans aligned with one label. */ - split = uiLayoutSplit(layout, 0.4f, false); - row = uiLayoutRow(split, false); - uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT); - uiItemL(row, IFACE_("Flip"), ICON_NONE); - row = uiLayoutRow(split, true); - uiLayoutSetPropSep(row, false); - uiItemR(row, &ptr, "use_mirror_u", UI_ITEM_R_TOGGLE, IFACE_("U"), ICON_NONE); - uiItemR(row, &ptr, "use_mirror_v", UI_ITEM_R_TOGGLE, IFACE_("V"), ICON_NONE); - uiItemL(row, "", ICON_BLANK1); - - col = uiLayoutColumn(layout, true); + col = uiLayoutColumn(layout, false); row = uiLayoutRow(col, true); - uiLayoutSetActive(row, RNA_boolean_get(&ptr, "use_mirror_u")); - uiItemR(row, &ptr, "mirror_offset_u", UI_ITEM_R_SLIDER, IFACE_("Offset U"), ICON_NONE); + decorator_layout = uiItemL_respect_property_split(row, IFACE_("Mirror U"), ICON_NONE); + uiItemR(row, &ptr, "use_mirror_u", 0, IFACE_(""), ICON_NONE); + sub = uiLayoutRow(row, true); + uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_mirror_u")); + uiItemR(sub, &ptr, "mirror_offset_u", UI_ITEM_R_SLIDER, IFACE_("Offset"), ICON_NONE); + + col = uiLayoutColumn(layout, false); row = uiLayoutRow(col, true); - uiLayoutSetActive(row, RNA_boolean_get(&ptr, "use_mirror_v")); - uiItemR(row, &ptr, "mirror_offset_v", UI_ITEM_R_SLIDER, IFACE_("V"), ICON_NONE); + decorator_layout = uiItemL_respect_property_split(row, IFACE_("V"), ICON_NONE); + uiItemR(row, &ptr, "use_mirror_v", 0, IFACE_(""), ICON_NONE); + sub = uiLayoutRow(row, true); + uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_mirror_v")); + uiItemR(sub, &ptr, "mirror_offset_v", UI_ITEM_R_SLIDER, IFACE_("Offset"), ICON_NONE); modifier_panel_end(layout, &ptr); } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs