Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2016-02-08 16:08:55 +0300
committerJoshua Leung <aligorith@gmail.com>2016-02-08 16:45:34 +0300
commit770319bbd2be1cc79f3f67f98e6f125d013beddc (patch)
treecd3ae53d6b0446d64c81a003b0297c2dca63a8ce /source/blender/editors/animation/anim_channels_defines.c
parent2e914d556a588500e3b2958d41f67436fcc06e67 (diff)
Fix: "Speaker" Icon for "Muting" in GPencil Dopesheet mode was confusing and used incorrectly
In the other Dopesheet modes, the "Speaker" icon was used to refer to "animation playback muting", while for GP layers, this was being incorrectly abused for "layer visibility in viewport". This commit fixes that by making the following changes: * A new "eye" icon toggle is added for controlling GP Layer visibility * The "speaker" icon toggle now controls "Lock Frame to Current" functionality, which functions more like the "animation playback muting" that is generally expected.
Diffstat (limited to 'source/blender/editors/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index c6a47b96fea..05e9b893e65 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -2812,7 +2812,6 @@ static bool acf_gpl_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUSE
switch (setting) {
/* unsupported */
case ACHANNEL_SETTING_EXPAND: /* gpencil layers are more like F-Curves than groups */
- case ACHANNEL_SETTING_VISIBLE: /* graph editor only */
case ACHANNEL_SETTING_SOLO: /* nla editor only */
return false;
@@ -2832,7 +2831,11 @@ static int acf_gpl_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings
case ACHANNEL_SETTING_SELECT: /* selected */
return GP_LAYER_SELECT;
- case ACHANNEL_SETTING_MUTE: /* muted */
+ case ACHANNEL_SETTING_MUTE: /* animation muting - similar to frame lock... */
+ return GP_LAYER_FRAMELOCK;
+
+ case ACHANNEL_SETTING_VISIBLE: /* visiblity of the layers (NOT muting) */
+ *neg = true;
return GP_LAYER_HIDE;
case ACHANNEL_SETTING_PROTECT: /* protected */
@@ -3757,9 +3760,13 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
/* protect... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT))
offset += ICON_WIDTH;
+
/* mute... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE))
offset += ICON_WIDTH;
+ if (ale->type == ANIMTYPE_GPLAYER)
+ offset += ICON_WIDTH;
+
/* pinned... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PINNED))
offset += ICON_WIDTH;
@@ -4006,6 +4013,8 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE))
tooltip = TIP_("F-Curve is visible in Graph Editor for editing");
+ else if (ale->type == ANIMTYPE_GPLAYER)
+ tooltip = TIP_("Grease Pencil layer is visible in the viewport");
else
tooltip = TIP_("Channels are visible in Graph Editor for editing");
break;
@@ -4051,6 +4060,9 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
else if ((ac) && (ac->spacetype == SPACE_NLA) && (ale->type != ANIMTYPE_NLATRACK)) {
tooltip = TIP_("Temporarily disable NLA stack evaluation (i.e. only the active action is evaluated)");
}
+ else if (ale->type == ANIMTYPE_GPLAYER) {
+ tooltip = TIP_("Lock current frame displayed by layer (i.e. disable animation playback)");
+ }
else {
tooltip = TIP_("Do channels contribute to result (toggle channel muting)");
}
@@ -4287,6 +4299,11 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
offset += ICON_WIDTH;
draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax - offset, ymid, ACHANNEL_SETTING_MUTE);
}
+ if (ale->type == ANIMTYPE_GPLAYER) {
+ /* Not technically "mute" (in terms of anim channels, but this sets layer visibility instead) */
+ offset += ICON_WIDTH;
+ draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax - offset, ymid, ACHANNEL_SETTING_VISIBLE);
+ }
/* modifiers disable */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MOD_OFF)) {