[Bf-blender-cvs] [4d5a9b77556] modifier-panels-ui: Tweak apply button, fix its location for a few modifiers
Hans Goudey
noreply at git.blender.org
Fri Apr 3 23:47:19 CEST 2020
Commit: 4d5a9b7755625f2510cefb835877407aa131bd0c
Author: Hans Goudey
Date: Fri Apr 3 16:46:04 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rB4d5a9b7755625f2510cefb835877407aa131bd0c
Tweak apply button, fix its location for a few modifiers
===================================================================
M source/blender/modifiers/intern/MOD_boolean.c
M source/blender/modifiers/intern/MOD_cloth.c
M source/blender/modifiers/intern/MOD_dynamicpaint.c
M source/blender/modifiers/intern/MOD_fluid.c
M source/blender/modifiers/intern/MOD_meshcache.c
M source/blender/modifiers/intern/MOD_ui_common.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index feb7aaec702..0c81818c57f 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -359,14 +359,16 @@ static void requiredDataMask(Object *UNUSED(ob),
static void panel_draw(const bContext *C, Panel *panel)
{
+ uiLayout *layout = panel->layout;
+
PointerRNA ptr;
modifier_panel_get_property_pointers(C, panel, NULL, &ptr);
- uiLayout *layout = panel->layout;
+ modifier_panel_buttons(C, panel);
uiLayoutSetPropSep(layout, true);
- uiItemR(layout, &ptr, "operation", 0, "", ICON_NONE);
- uiItemR(layout, &ptr, "object", 0, "", ICON_NONE);
+ uiItemR(layout, &ptr, "operation", 0, NULL, ICON_NONE);
+ uiItemR(layout, &ptr, "object", 0, NULL, ICON_NONE);
uiItemR(layout, &ptr, "double_threshold", 0, NULL, ICON_NONE);
if (G.debug) {
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c
index 088cffd5393..2d87a9e6616 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -270,6 +270,7 @@ static void panel_draw(const bContext *C, Panel *panel)
PointerRNA ptr;
modifier_panel_get_property_pointers(C, panel, NULL, &ptr);
+ modifier_panel_buttons(C, panel);
uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c
index c1927c4b8af..ee5c18747cb 100644
--- a/source/blender/modifiers/intern/MOD_dynamicpaint.c
+++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c
@@ -189,6 +189,7 @@ static void panel_draw(const bContext *C, Panel *panel)
PointerRNA ptr;
modifier_panel_get_property_pointers(C, panel, NULL, &ptr);
+ modifier_panel_buttons(C, panel);
uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
diff --git a/source/blender/modifiers/intern/MOD_fluid.c b/source/blender/modifiers/intern/MOD_fluid.c
index 2107e80d02e..246b939456b 100644
--- a/source/blender/modifiers/intern/MOD_fluid.c
+++ b/source/blender/modifiers/intern/MOD_fluid.c
@@ -211,6 +211,7 @@ static void panel_draw(const bContext *C, Panel *panel)
PointerRNA ptr;
modifier_panel_get_property_pointers(C, panel, NULL, &ptr);
+ modifier_panel_buttons(C, panel);
uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
diff --git a/source/blender/modifiers/intern/MOD_meshcache.c b/source/blender/modifiers/intern/MOD_meshcache.c
index 4e6e9945477..1871683d279 100644
--- a/source/blender/modifiers/intern/MOD_meshcache.c
+++ b/source/blender/modifiers/intern/MOD_meshcache.c
@@ -303,6 +303,7 @@ static void panel_draw(const bContext *C, Panel *panel)
PointerRNA ptr;
modifier_panel_get_property_pointers(C, panel, NULL, &ptr);
+ modifier_panel_buttons(C, panel);
uiItemR(layout, &ptr, "cache_format", 0, NULL, ICON_NONE);
uiItemR(layout, &ptr, "filepath", 0, NULL, ICON_NONE);
@@ -349,7 +350,6 @@ static void axis_mapping_panel_draw(const bContext *C, Panel *panel)
PointerRNA ptr;
modifier_panel_get_property_pointers(C, panel, NULL, &ptr);
- modifier_panel_buttons(C, panel);
split = uiLayoutSplit(layout, 0.5f, false);
uiItemL(split, IFACE_("Forward/Up Axis:"), ICON_NONE);
diff --git a/source/blender/modifiers/intern/MOD_ui_common.c b/source/blender/modifiers/intern/MOD_ui_common.c
index 2248c4a9690..016f055114f 100644
--- a/source/blender/modifiers/intern/MOD_ui_common.c
+++ b/source/blender/modifiers/intern/MOD_ui_common.c
@@ -159,17 +159,15 @@ void modifier_panel_get_property_pointers(const bContext *C,
#define ERROR_LIBDATA_MESSAGE TIP_("Can't edit external library data")
void modifier_panel_buttons(const bContext *C, Panel *panel)
{
-
- uiLayout *row, *box;
+ uiLayout *row;
uiLayout *layout = panel->layout;
- box = uiLayoutBox(layout);
- row = uiLayoutRow(box, false);
+ row = uiLayoutRow(layout, false);
Object *ob = CTX_data_active_object(C);
ModifierData *md = BLI_findlink(&ob->modifiers, panel->runtime.list_index);
- uiBlock *block = uiLayoutGetBlock(box);
+ uiBlock *block = uiLayoutGetBlock(row);
UI_block_lock_set(
block, BKE_object_obdata_is_libdata(ob) || ID_IS_LINKED(ob), ERROR_LIBDATA_MESSAGE);
More information about the Bf-blender-cvs
mailing list