Advertisement
Pratik_Borhade

diff-alternate-reset-flag

Feb 18th, 2023
855
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.63 KB | Source Code | 0 0
  1. diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
  2. index 995ad861ec8..d98f99ae838 100644
  3. --- a/source/blender/editors/animation/anim_channels_edit.c
  4. +++ b/source/blender/editors/animation/anim_channels_edit.c
  5. @@ -380,7 +380,7 @@ static void anim_channels_select_set(bAnimContext *ac,
  6.          FCurve *fcu = (FCurve *)ale->data;
  7.  
  8.          ACHANNEL_SET_FLAG(fcu, sel, FCURVE_SELECTED);
  9. -        if ((fcu->flag & FCURVE_SELECTED) == 0) {
  10. +        if (((fcu->flag & FCURVE_SELECTED) == 0) && (sel != ACHANNEL_SETFLAG_EXTEND_RANGE)) {
  11.            /* Only erase the ACTIVE flag when deselecting. This ensures that "select all curves"
  12.             * retains the currently active curve. */
  13.            fcu->flag &= ~FCURVE_ACTIVE;
  14. @@ -3251,7 +3251,7 @@ static int click_select_channel_fcurve(bAnimContext *ac,
  15.      fcu->flag ^= FCURVE_SELECTED;
  16.    }
  17.    else if (selectmode == SELECT_EXTEND_RANGE) {
  18. -    animchannel_clear_selection(ac);
  19. +    ANIM_anim_channels_select_set(ac, ACHANNEL_SETFLAG_EXTEND_RANGE);
  20.      animchannel_select_range(ac, fcu);
  21.    }
  22.    else {
  23. diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
  24. index a436fa43989..09b85d0f4ef 100644
  25. --- a/source/blender/editors/include/ED_anim_api.h
  26. +++ b/source/blender/editors/include/ED_anim_api.h
  27. @@ -530,6 +530,7 @@ typedef enum eAnimChannels_SetFlag {
  28.    ACHANNEL_SETFLAG_INVERT = 2,
  29.    /** some on -> all off / all on */
  30.    ACHANNEL_SETFLAG_TOGGLE = 3,
  31. +  ACHANNEL_SETFLAG_EXTEND_RANGE = 4,
  32.  } eAnimChannels_SetFlag;
  33.  
  34.  /* types of settings for AnimChannels */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement