From c6cc5993118965ae4208d748c54e7a70a3c5c1d3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 4 Jun 2016 00:54:28 +1000 Subject: Fix T48234: Glitch w/ action constraints sharing an action FCurve evaluation depended on FCurve.curval, which isn't threadsafe. Now only use this value for debug display, and pass the value instead of storing in the FCurve for all but debug-display. --- source/blender/editors/space_graph/graph_edit.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index f1063996ca3..f38d36853d7 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -606,10 +606,13 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode) * - fcu->driver != NULL: If this is set, then it's a driver. If we don't check for this, we'd end * up adding the keyframes on a new F-Curve in the action data instead. */ - if (ale->id && !ale->owner && !fcu->driver) + if (ale->id && !ale->owner && !fcu->driver) { insert_keyframe(reports, ale->id, NULL, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, ts->keyframe_type, flag); - else - insert_vert_fcurve(fcu, cfra, fcu->curval, ts->keyframe_type, 0); + } + else { + const float curval = evaluate_fcurve(fcu, cfra); + insert_vert_fcurve(fcu, cfra, curval, ts->keyframe_type, 0); + } ale->update |= ANIM_UPDATE_DEFAULT; } -- cgit v1.2.3