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:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-05-01 19:17:59 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-05-01 19:25:24 +0300
commitfc040335b7a5eeaa3c57bd176656f86f9d56dc48 (patch)
treef012909ee8659ac5d79f45fabb035fe45aede5c1 /source/blender/editors
parenta9e546f57d42f64b975dcb09b24884e4714e3700 (diff)
Fix T63980: only copy selected curves in Copy Keyframes from Graph Editor.
Otherwise things can become confusing due to copying unwanted curves, especially if "Only Selected Curve Keyframes" is enabled, and thus selected keyframes from other curves may not be visible. Now Copy Keyframes behaves exactly like Paste Keyframes.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 573e3cb5899..0954538e430 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -932,9 +932,15 @@ static short copy_graph_keys(bAnimContext *ac)
/* clear buffer first */
ANIM_fcurves_copybuf_free();
- /* filter data */
+ /* filter data
+ * - First time we try to filter more strictly, allowing only selected channels
+ * to allow copying animation between channels
+ */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
- ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+
+ if (ANIM_animdata_filter(ac, &anim_data, filter | ANIMFILTER_SEL, ac->data, ac->datatype) == 0) {
+ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+ }
/* copy keyframes */
ok = copy_animedit_keys(ac, &anim_data);