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>2018-06-21 16:25:48 +0300
committerJoshua Leung <aligorith@gmail.com>2018-06-21 16:26:06 +0300
commit4904eadc0f382dc31299197145945d86856228fc (patch)
tree0d69e86bf3925dc4c1c8968ddb7348f370aedbd9 /source/blender/editors/animation/anim_filter.c
parent526392ab1637c1c11ebea44c7409bd2bd12e8a5c (diff)
Fix T55525: "Only Keyframes from Selected Channels" option in Timeline was being ignored
I was originally going to just expose the filtering options fo the timeline too (via popover), to provide full access to the filtering options here too. However, investigating further, that would've caused problems when trying to use the Next/Prev Keyframe operators in other editors (see comment in code). For now, the simpler solution is to just sync the scene-level flag (used for this option) back to the dopesheet settings (used for generating the summary channel used for displaying keyframes), to buy some time to investigate more carefully.
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r--source/blender/editors/animation/anim_filter.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 8892fed025a..8fb32e5b82e 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -245,6 +245,18 @@ static bool actedit_get_context(bAnimContext *ac, SpaceAction *saction)
/* update scene-pointer (no need to check for pinning yet, as not implemented) */
saction->ads.source = (ID *)ac->scene;
+ /* sync scene's "selected keys only" flag with our "only selected" flag
+ * XXX: This is a workaround for T55525. We shouldn't really be syncing the flags like this,
+ * but it's a simpler fix for now than also figuring out how the next/prev keyframe tools
+ * should work in the 3D View if we allowed full access to the timeline's dopesheet filters
+ * (i.e. we'd have to figure out where to host those settings, to be on a scene level like
+ * this flag currently is, along with several other unknowns)
+ */
+ if (ac->scene->flag & SCE_KEYS_NO_SELONLY)
+ saction->ads.filterflag &= ~ADS_FILTER_ONLYSEL;
+ else
+ saction->ads.filterflag |= ADS_FILTER_ONLYSEL;
+
ac->datatype = ANIMCONT_TIMELINE;
ac->data = &saction->ads;