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:
authorCampbell Barton <ideasman42@gmail.com>2016-06-03 17:54:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-03 17:57:44 +0300
commitc6cc5993118965ae4208d748c54e7a70a3c5c1d3 (patch)
tree1160193df82d4c6ea3c63e5b2331ee818140bed0 /source/blender/editors/space_graph
parent398180439be338dc05fcd07d42974eac77880e22 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c9
1 files changed, 6 insertions, 3 deletions
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;
}