Insert and modify keyframes on evaluation time for path animation with linear interpolation impossible #59178

Closed
opened 2018-12-11 11:36:09 +01:00 by Marcel Aulenbacher · 14 comments

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

Blender Version
Broken: 2.80, 9a8b6d51c1, 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
**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

Added subscriber: @comvico

Added subscriber: @comvico

Added subscriber: @ZedDB

Added subscriber: @ZedDB

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.

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.

window.PNG

bug-evaluation-time-lin-interpol.blend

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. ![window.PNG](https://archive.blender.org/developer/F5932944/window.PNG) [bug-evaluation-time-lin-interpol.blend](https://archive.blender.org/developer/F5932943/bug-evaluation-time-lin-interpol.blend)
Sergey Sharybin was assigned by Sebastian Parborg 2018-12-12 17:04:20 +01:00

Added subscriber: @Sergey

Added subscriber: @Sergey

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

@Sergey I'm guessing it's the same root cause as in issue #58739

I can reproduce the issue on the .blend file you gave me! @Sergey I'm guessing it's the same root cause as in issue #58739

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.

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.

Added subscriber: @camomiles

Added subscriber: @camomiles

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:

P898: Fix for #59178

diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
index a159e713d01..5b0a722a131 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -159,27 +159,10 @@ void BKE_object_handle_data_update(
         Scene *scene,
         Object *ob)
 {
-	ID *data_id = (ID *)ob->data;
-	AnimData *adt = BKE_animdata_from_id(data_id);
-	Key *key;
 	float ctime = BKE_scene_frame_get(scene);
 
 	DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
 
-	/* TODO(sergey): Only used by legacy depsgraph. */
-	if (adt) {
-		/* evaluate drivers - datalevel */
-		/* XXX: for mesh types, should we push this to evaluated mesh instead? */
-		BKE_animsys_evaluate_animdata(depsgraph, scene, data_id, adt, ctime, ADT_RECALC_DRIVERS);
-	}
-
-	/* TODO(sergey): Only used by legacy depsgraph. */
-	key = BKE_key_from_object(ob);
-	if (key && key->block.first) {
-		if (!(ob->shapeflag & OB_SHAPE_LOCK))
-			BKE_animsys_evaluate_animdata(depsgraph, scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS);
-	}
-
 	/* includes all keys and modifiers */
 	switch (ob->type) {
 		case OB_MESH:

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: [P898: Fix for #59178](https://archive.blender.org/developer/P898.txt) ``` diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c index a159e713d01..5b0a722a131 100644 --- a/source/blender/blenkernel/intern/object_update.c +++ b/source/blender/blenkernel/intern/object_update.c @@ -159,27 +159,10 @@ void BKE_object_handle_data_update( Scene *scene, Object *ob) { - ID *data_id = (ID *)ob->data; - AnimData *adt = BKE_animdata_from_id(data_id); - Key *key; float ctime = BKE_scene_frame_get(scene); DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob); - /* TODO(sergey): Only used by legacy depsgraph. */ - if (adt) { - /* evaluate drivers - datalevel */ - /* XXX: for mesh types, should we push this to evaluated mesh instead? */ - BKE_animsys_evaluate_animdata(depsgraph, scene, data_id, adt, ctime, ADT_RECALC_DRIVERS); - } - - /* TODO(sergey): Only used by legacy depsgraph. */ - key = BKE_key_from_object(ob); - if (key && key->block.first) { - if (!(ob->shapeflag & OB_SHAPE_LOCK)) - BKE_animsys_evaluate_animdata(depsgraph, scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS); - } - /* includes all keys and modifiers */ switch (ob->type) { case OB_MESH: ```

Added subscriber: @angavrilov

Added subscriber: @angavrilov

@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?

@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?

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

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

This issue was referenced by 83f8f44791

This issue was referenced by 83f8f44791374dd051728e44d89fbdeee15c60aa

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#59178
No description provided.