diff options
Diffstat (limited to 'source/blender/editors/space_graph/graph_edit.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index e610aee4810..00418d6482a 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -54,6 +54,7 @@ #include "BLT_translation.h" +#include "BKE_animsys.h" #include "BKE_context.h" #include "BKE_fcurve.h" #include "BKE_global.h" @@ -521,6 +522,7 @@ static const EnumPropertyItem prop_graphkeys_insertkey_types[] = { static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode) { ListBase anim_data = {NULL, NULL}; + ListBase nla_cache = {NULL, NULL}; bAnimListElem *ale; int filter; size_t num_items; @@ -602,7 +604,7 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode) */ if (ale->id && !ale->owner && !fcu->driver) { insert_keyframe(ac->bmain, depsgraph, reports, ale->id, NULL, ((fcu->grp) ? (fcu->grp->name) : (NULL)), - fcu->rna_path, fcu->array_index, cfra, ts->keyframe_type, flag); + fcu->rna_path, fcu->array_index, cfra, ts->keyframe_type, &nla_cache, flag); } else { AnimData *adt = ANIM_nla_mapping_get(ac, ale); @@ -621,6 +623,8 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode) } } + BKE_animsys_free_nla_keyframing_context_cache(&nla_cache); + ANIM_animdata_update(ac, &anim_data); ANIM_animdata_freelist(&anim_data); } |