[Bf-blender-cvs] [ebc9479] gooseberry: Make icon use a dim version instead for modifier muting
Antony Riakiotakis
noreply at git.blender.org
Wed Apr 15 16:31:57 CEST 2015
Commit: ebc94798de48fffca9420462609058db65ea8fec
Author: Antony Riakiotakis
Date: Wed Apr 15 16:31:46 2015 +0200
Branches: gooseberry
https://developer.blender.org/rBebc94798de48fffca9420462609058db65ea8fec
Make icon use a dim version instead for modifier muting
===================================================================
M source/blender/editors/animation/anim_channels_defines.c
===================================================================
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index f27430c..10af5b8 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -867,6 +867,7 @@ static int acf_group_setting_flag(bAnimContext *ac, eAnimChannel_Settings settin
return AGRP_MUTED;
case ACHANNEL_SETTING_MOD_OFF: /* muted */
+ *neg = 1;
return AGRP_MODIFIERS_OFF;
case ACHANNEL_SETTING_PROTECT: /* protected */
@@ -987,6 +988,7 @@ static int acf_fcurve_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
return FCURVE_VISIBLE;
case ACHANNEL_SETTING_MOD_OFF:
+ *neg = 1;
return FCURVE_MOD_OFF;
default: /* unsupported */
@@ -3983,6 +3985,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
{
short ptrsize, butType;
bool negflag;
+ bool usetoggle = true;
int flag, icon;
void *ptr;
const char *tooltip;
@@ -4007,7 +4010,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
case ACHANNEL_SETTING_MOD_OFF: /* modifiers disabled */
icon = ICON_MODIFIER;
-
+ usetoggle = false;
tooltip = TIP_("F-Curve modifiers are disabled");
break;
@@ -4071,11 +4074,18 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
}
/* type of button */
- if (negflag)
- butType = UI_BTYPE_ICON_TOGGLE_N;
- else
- butType = UI_BTYPE_ICON_TOGGLE;
-
+ if (usetoggle) {
+ if (negflag)
+ butType = UI_BTYPE_ICON_TOGGLE_N;
+ else
+ butType = UI_BTYPE_ICON_TOGGLE;
+ }
+ else {
+ if (negflag)
+ butType = UI_BTYPE_TOGGLE_N;
+ else
+ butType = UI_BTYPE_TOGGLE;
+ }
/* draw button for setting */
if (ptr && flag) {
switch (ptrsize) {
More information about the Bf-blender-cvs
mailing list