Tweak for pinned/always visible curves in Graph Editor

Allow such kind of pin for armature bones.
This commit is contained in:
Sergey Sharybin
2016-09-16 15:56:09 +02:00
parent 19268fbad3
commit 9a7891da90
2 changed files with 9 additions and 3 deletions

View File

@@ -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;

View File

@@ -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);