diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-09-16 16:56:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-09-16 17:01:38 +0300 |
commit | 9a7891da900262a9fb67cad1b9e2e3605d8bdedd (patch) | |
tree | f80a6041ea12e5ccd14f3aac4554035b25915cb7 /source/blender/editors/animation | |
parent | 19268fbad34211ee0ab9bde024a4649c76ce7a5c (diff) |
Tweak for pinned/always visible curves in Graph Editor
Allow such kind of pin for armature bones.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 7 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index be92b0394a6..e60cb3fbedf 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -851,7 +851,7 @@ static bool acf_group_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale) return (ac->spacetype == SPACE_IPO); case ACHANNEL_SETTING_ALWAYS_VISIBLE: - return false; + return (ac->spacetype == SPACE_IPO); default: /* always supported */ return true; @@ -892,7 +892,10 @@ static int acf_group_setting_flag(bAnimContext *ac, eAnimChannel_Settings settin case ACHANNEL_SETTING_VISIBLE: /* visibility - graph editor */ *neg = 1; return AGRP_NOTVISIBLE; - + + case ACHANNEL_SETTING_ALWAYS_VISIBLE: + return ADT_CURVES_ALWAYS_VISIBLE; + default: /* this shouldn't happen */ return 0; diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 5cee414c690..72c20c00029 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -478,7 +478,7 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) #define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, nlaKeysOk, keysOk) \ { \ if ((id)->adt) { \ - if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE)) { \ + if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE) || 1) { \ if (filter_mode & ANIMFILTER_ANIMDATA) { \ adtOk \ } \ @@ -952,6 +952,9 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne */ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id, int filter_mode) { + if (fcu->grp != NULL && fcu->grp->flag & ADT_CURVES_ALWAYS_VISIBLE) { + return false; + } /* hidden items should be skipped if we only care about visible data, but we aren't interested in hidden stuff */ const bool skip_hidden = (filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN); |