[Bf-blender-cvs] [4904eadc0f3] blender2.8: Fix T55525: "Only Keyframes from Selected Channels" option in Timeline was being ignored

Joshua Leung noreply at git.blender.org
Thu Jun 21 15:26:43 CEST 2018


Commit: 4904eadc0f382dc31299197145945d86856228fc
Author: Joshua Leung
Date:   Fri Jun 22 01:25:48 2018 +1200
Branches: blender2.8
https://developer.blender.org/rB4904eadc0f382dc31299197145945d86856228fc

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.

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

M	source/blender/editors/animation/anim_filter.c

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

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;



More information about the Bf-blender-cvs mailing list