Page MenuHome

Insert and modify keyframes on evaluation time for path animation with linear interpolation impossible
Closed, ResolvedPublic


System Information
Operating system: Win 10 Home
Graphics card: NVIDIA GTX 1050

Blender Version
Broken: 2.80, 9a8b6d51c12, blender2.8, 2018-12-11

Short description of error
Insert / modify keyframe values in evaluation time for path animation on bezier curve with linear interpolation impossible. Value resets to first value for first set keyframe.

Exact steps for others to reproduce the error

  • Use the start up file
  • Delete all scene elements
  • Set one window to curve modifier
  • Add a Bezier curve to the scene
  • In the object data window set two keyframes with random values
  • Set the key interpolation to linear in graph editor
  • In the object data window, try to modify one of the inserted keyframes, and / or insert a new keyframe with any random value

Event Timeline

Sebastian Parborg (zeddb) triaged this task as Needs Information from User priority.

I can not reproduce this. However, I think this might be related to an other issue perhaps.

Could you give me a minimal .blend file with this issue? That way I can see if I can reproduce this on a blend file you created.

Hi Sebastian.

Please find two files attached. Once you opened the .blend file, just click into the Time Evaluation field and try to change it.

Sebastian Parborg (zeddb) raised the priority of this task from Needs Information from User to Confirmed, Medium.

I can reproduce the issue on the .blend file you gave me!

@Sergey Sharybin (sergey) I'm guessing it's the same root cause as in issue T58739

It reads somehow similar. In my case the bug is just present once I change the interpolation from bezier to linear. It's when it breaks the function.
I got so far a plenty of plugins installed - it might be related. I didn't check though.

This is caused by various areas of Blender doing drivers animation explicitly. This is something what should be left to dependency graph nowadays. Without this the old system which is based on checking RECALC flags on animation data fails dramatically (there is no reliable way we can set that flag within context of copy-on-write).

Here is a patch for this specific issue, but it might potentially introduce another ones, so need some more testing first:

1diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
2index a159e713d01..5b0a722a131 100644
3--- a/source/blender/blenkernel/intern/object_update.c
4+++ b/source/blender/blenkernel/intern/object_update.c
5@@ -159,27 +159,10 @@ void BKE_object_handle_data_update(
6 Scene *scene,
7 Object *ob)
8 {
9- ID *data_id = (ID *)ob->data;
10- AnimData *adt = BKE_animdata_from_id(data_id);
11- Key *key;
12 float ctime = BKE_scene_frame_get(scene);
14 DEG_debug_print_eval(depsgraph, __func__, ob->, ob);
16- /* TODO(sergey): Only used by legacy depsgraph. */
17- if (adt) {
18- /* evaluate drivers - datalevel */
19- /* XXX: for mesh types, should we push this to evaluated mesh instead? */
20- BKE_animsys_evaluate_animdata(depsgraph, scene, data_id, adt, ctime, ADT_RECALC_DRIVERS);
21- }
23- /* TODO(sergey): Only used by legacy depsgraph. */
24- key = BKE_key_from_object(ob);
25- if (key && key->block.first) {
26- if (!(ob->shapeflag & OB_SHAPE_LOCK))
27- BKE_animsys_evaluate_animdata(depsgraph, scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS);
28- }
30 /* includes all keys and modifiers */
31 switch (ob->type) {
32 case OB_MESH:

@Sergey Sharybin (sergey) IIRC the problem here is that there is a magic recalc flag that makes that call to evaluate drivers also update keyed animation, and that flag is never cleared once set - so presumably the solution is to get rid of adt->recalc?

@Alexander Gavrilov (angavrilov) , yes. But that's part of the issue. Other part is that animation shouldn't be evaluated from object/object data/particles update.