[Bf-blender-cvs] [fddbcb5757f] master: UI: Click modifier icon to set active modifier
Hans Goudey
noreply at git.blender.org
Mon Dec 14 06:49:22 CET 2020
Commit: fddbcb5757f6349ce1b11242fd760c1fb502a6a1
Author: Hans Goudey
Date: Sun Dec 13 23:49:14 2020 -0600
Branches: master
https://developer.blender.org/rBfddbcb5757f6349ce1b11242fd760c1fb502a6a1
UI: Click modifier icon to set active modifier
This should be a final piece of the changes for the active modifier
interface. Before, it was necessary to click on the blank space of a
modifier panel to set it active (not the header), this commit allows
clicking on the icon also.
The spacing with the spacing with the expand button would ideally
be a bit larger, but the layout system doesn't offer much flexibility
here.
===================================================================
M source/blender/modifiers/intern/MOD_ui_common.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_ui_common.c b/source/blender/modifiers/intern/MOD_ui_common.c
index fa5243c548f..55dbfdf478f 100644
--- a/source/blender/modifiers/intern/MOD_ui_common.c
+++ b/source/blender/modifiers/intern/MOD_ui_common.c
@@ -307,10 +307,16 @@ static void modifier_panel_header(const bContext *C, Panel *panel)
/* Modifier Icon. */
sub = uiLayoutRow(layout, true);
+ uiLayoutSetEmboss(sub, UI_EMBOSS_NONE);
if (mti->isDisabled && mti->isDisabled(scene, md, 0)) {
uiLayoutSetRedAlert(sub, true);
}
- uiItemL(sub, "", RNA_struct_ui_icon(ptr->type));
+ uiItemStringO(sub,
+ "",
+ RNA_struct_ui_icon(ptr->type),
+ "OBJECT_OT_modifier_set_active",
+ "modifier",
+ md->name);
row = uiLayoutRow(layout, true);
More information about the Bf-blender-cvs
mailing list