diff options
author | Hans Goudey <h.goudey@me.com> | 2020-07-02 17:47:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-07-02 17:47:02 +0300 |
commit | 06de1bddae65dca06ec44b996372ce6a6e8d70e8 (patch) | |
tree | b2d7eaf45251c6f5b07a6fc3e2e78e757acec273 /source/blender/modifiers/intern/MOD_array.c | |
parent | fb0f0f4d79a7cc89f31787615d25a98ca263bef5 (diff) |
UI: Small Tweaks to Modifier Layouts for Consistency
These changes are smaller, made based on feedback and a pass on all
the layouts for clarity and consistency. The Multires modifier UI will
be addressed in a separate patch. Here is an overview of the changes:
Renaming Options:
- Build: "Start" -> "Start Frame"
- Curve: "From Radius" -> "Size from Radius"
- Screw: "Calc Order" -> "Calculate Order"
- Displace, Warp, Wave: "Texture Coordinates Object" -> "Object"
Move Mode Toggle to Top & Expand:
- Bevel, Boolean, Normal Edit, Subdivision
Use Columns for Tighter Spacing:
- Displace, Explode, Ocean, Particle Instance, Remesh, Shrinkwrap,
Solidify, Warp, Weighted Normal, Wave
Misc:
- Bevel: Set inactive properties for vertex bevel
- Mesh Sequence Cache: Remove box for cache file
- Skin: Don't align "Mark Loose" and "Clear Loose"
- Array: Expand relative offset subpanel by default
- Array: Move start cap, end cap to a new subpanel
- Bevel: Move width type above width
Differential Revision: https://developer.blender.org/D8115
Diffstat (limited to 'source/blender/modifiers/intern/MOD_array.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index e1f271e83c3..48d69f8e02c 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -76,6 +76,9 @@ static void initData(ModifierData *md) amd->fit_type = MOD_ARR_FIXEDCOUNT; amd->offset_type = MOD_ARR_OFF_RELATIVE; amd->flags = 0; + + /* Open the first subpanel by default, it corresspnds to Relative offset which is enabled too. */ + md->ui_expand_flag = (1 << 0) | (1 << 1); } static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) @@ -835,7 +838,6 @@ static bool isDisabled(const struct Scene *UNUSED(scene), static void panel_draw(const bContext *C, Panel *panel) { - uiLayout *col; uiLayout *layout = panel->layout; PointerRNA ptr; @@ -857,12 +859,6 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, &ptr, "curve", 0, NULL, ICON_NONE); } - uiItemS(layout); - - col = uiLayoutColumn(layout, false); - uiItemR(col, &ptr, "start_cap", 0, IFACE_("Cap Start"), ICON_NONE); - uiItemR(col, &ptr, "end_cap", 0, IFACE_("End"), ICON_NONE); - modifier_panel_end(layout, &ptr); } @@ -984,6 +980,21 @@ static void uv_panel_draw(const bContext *C, Panel *panel) uiItemR(col, &ptr, "offset_v", UI_ITEM_R_EXPAND, IFACE_("V"), ICON_NONE); } +static void caps_panel_draw(const bContext *C, Panel *panel) +{ + uiLayout *col; + uiLayout *layout = panel->layout; + + PointerRNA ptr; + modifier_panel_get_property_pointers(C, panel, NULL, &ptr); + + uiLayoutSetPropSep(layout, true); + + col = uiLayoutColumn(layout, false); + uiItemR(col, &ptr, "start_cap", 0, IFACE_("Cap Start"), ICON_NONE); + uiItemR(col, &ptr, "end_cap", 0, IFACE_("End"), ICON_NONE); +} + static void panelRegister(ARegionType *region_type) { PanelType *panel_type = modifier_panel_register(region_type, eModifierType_Array, panel_draw); @@ -1004,6 +1015,7 @@ static void panelRegister(ARegionType *region_type) modifier_subpanel_register( region_type, "merge", "", symmetry_panel_header_draw, symmetry_panel_draw, panel_type); modifier_subpanel_register(region_type, "uv", "UVs", NULL, uv_panel_draw, panel_type); + modifier_subpanel_register(region_type, "caps", "Caps", NULL, caps_panel_draw, panel_type); } ModifierTypeInfo modifierType_Array = { |