[Bf-blender-cvs] [49ad91b5ab7] master: Animation: Enable Pin Icon in the Dope Sheet

Christoph Lendenfeld noreply at git.blender.org
Thu Feb 2 13:58:21 CET 2023


Commit: 49ad91b5ab7b7ac8d8c3fcfdb89ca07d0e4f194a
Author: Christoph Lendenfeld
Date:   Thu Feb 2 13:58:13 2023 +0100
Branches: master
https://developer.blender.org/rB49ad91b5ab7b7ac8d8c3fcfdb89ca07d0e4f194a

Animation: Enable Pin Icon in the Dope Sheet

Even though the dope sheet respects the pinned channels, it did not show the icon to interact with the pinned state.

This adds the icon to the dope sheet as well.

{F14178715}

Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D17061
Ref: D17061

===================================================================

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 7d95a3f949a..343fa34b3a5 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -929,7 +929,7 @@ static bool acf_group_setting_valid(bAnimContext *ac,
       return (ac->spacetype == SPACE_GRAPH);
 
     case ACHANNEL_SETTING_ALWAYS_VISIBLE:
-      return (ac->spacetype == SPACE_GRAPH);
+      return ELEM(ac->spacetype, SPACE_ACTION, SPACE_GRAPH);
 
     default: /* always supported */
       return true;
@@ -4434,7 +4434,7 @@ void ANIM_channel_draw(
    * - in Grease Pencil mode, color swatches for layer color
    */
   if (ac->sl) {
-    if ((ac->spacetype == SPACE_GRAPH) &&
+    if (ELEM(ac->spacetype, SPACE_ACTION, SPACE_GRAPH) &&
         (acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE) ||
          acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE))) {
       /* for F-Curves, draw color-preview of curve left to the visibility icon */
@@ -5177,7 +5177,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
    * - in Grease Pencil mode, color swatches for layer color
    */
   if (ac->sl) {
-    if ((ac->spacetype == SPACE_GRAPH) &&
+    if (ELEM(ac->spacetype, SPACE_ACTION, SPACE_GRAPH) &&
         (acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE) ||
          acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE))) {
       /* Pin toggle. */



More information about the Bf-blender-cvs mailing list