Inserting new keyframe deletes previous ones #61173

Closed
opened 2019-02-04 11:19:26 +01:00 by Marc Rohrer · 10 comments

System Information
Operating system: Lubuntu (Linux)
Graphics card: GTI 1050i

Blender Version
Broken:
blender-2.80-8a51af7d1c98-linux-glibc224-x86_64

Short description of error

Addding a new keyframe sets back the other keyframed values to previous (see below)

Exact steps for others to reproduce the error

First I insert (in the "N"-panel) a keyframe for rotation, one for location and one for scale. Second I move further on in the timeline (dopesheet) and change some or all of these values and want to insert new keyframes for all the changed values. If I now add a keyframe for the first changed value (e.g. rotation) it automatically sets the other values back to the first keyframe values. Any fix planed on this?

**System Information** Operating system: Lubuntu (Linux) Graphics card: GTI 1050i **Blender Version** Broken: blender-2.80-8a51af7d1c98-linux-glibc224-x86_64 **Short description of error** Addding a new keyframe sets back the other keyframed values to previous (see below) **Exact steps for others to reproduce the error** First I insert (in the "N"-panel) a keyframe for rotation, one for location and one for scale. Second I move further on in the timeline (dopesheet) and change some or all of these values and want to insert new keyframes for all the changed values. If I now add a keyframe for the first changed value (e.g. rotation) it automatically sets the other values back to the first keyframe values. Any fix planed on this?
Author

Added subscriber: @CultLess

Added subscriber: @CultLess

#59555 was marked as duplicate of this issue

#59555 was marked as duplicate of this issue
Member

Added subscribers: @brecht, @JacquesLucke

Added subscribers: @brecht, @JacquesLucke
Member

Can confirm this...

@brecht, maybe this is related to blender/blender-staging@83f8f44791?

Can confirm this... @brecht, maybe this is related to blender/blender-staging@83f8f44791?

Added subscriber: @ditos

Added subscriber: @ditos

I think it's the same Bug as here.
https://developer.blender.org/T59555

The whole keyframing in Blender seems to be completely confused at the moment.

I think it's the same Bug as here. https://developer.blender.org/T59555 The whole keyframing in Blender seems to be completely confused at the moment.
Member

Added subscriber: @s.barbieri

Added subscriber: @s.barbieri
Member

Added subscriber: @JoshuaLeung

Added subscriber: @JoshuaLeung
Member

What's probably happening in this case is as follows:

  1. First, only one of the changed properties got the new values keyframed. All the other changed (but unkeyed) values exist on only on the original datablock at this stage (as set directly by the property buttons)
  2. After the first keyframing operation, the depsgraph gets evaluated. Most likely, this is because we tag it to do a copy-on-write flush (i.e. necessary or else the COW-domain data doesn't get refreshed to know that there is now a keyframe on the current frame, causing problems in the UI with the buttons not showing the right colors).
  3. To deal with the problem of not being able to keyframe/frame-changed evaluated state values in various operators (e.g. clear transform operators, and a whole bunch of other ones), we introduced a "copy back" step to the depsgraph evaluation to flush the results of the animation evaluation back to the original SDNA data. This allows normal operators to see the depsgraph-evaluated results when simply querying the SDNA state.
  4. This is where this bug in particular occurs: Normally there's a write-protection check performed (i.e. see https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/anim_sys.c$1619) that would prevent overwriting. However, here old_value (i.e. SDNA value, unkeyed above) != new_value (i.e. result of animation evaluation, from F-Curves that don't know about this new value, as they don't have keyframes in place to enforce that yet). Hence, the values from the F-Curves get flushed back to SDNA, overwriting the unkeyed values.

In 2.5, we avoided this scenario by making it so that animation evaluation only ever happened on frame change. In other words, if the frame doesn't change, animation evaluation doesn't happen to flush away unkeyed values.
AFAIK, right now doing a COW flush pretty much forces the evaluation of everything downstream from it (since we can't really know whether the change which necessitated the flush occurred because some value changed that other things need to rely on - e.g. a property's value changing after user interaction the UI). Thus, COW flushing often means that animation (+ proxy/override stuff) needs to re-run on top of these newly re-synced datablock(s) to get things in sync with the current frame again (just in case a particular COW/graph is looking at a different point in time).

What's probably happening in this case is as follows: 1) First, only one of the changed properties got the new values keyframed. All the other changed (but unkeyed) values exist on only on the original datablock at this stage (as set directly by the property buttons) 2) After the first keyframing operation, the depsgraph gets evaluated. Most likely, this is because we tag it to do a copy-on-write flush (i.e. necessary or else the COW-domain data doesn't get refreshed to know that there is now a keyframe on the current frame, causing problems in the UI with the buttons not showing the right colors). 3) To deal with the problem of not being able to keyframe/frame-changed evaluated state values in various operators (e.g. clear transform operators, and a whole bunch of other ones), we introduced a "copy back" step to the depsgraph evaluation to flush the results of the animation evaluation back to the original SDNA data. This allows normal operators to see the depsgraph-evaluated results when simply querying the SDNA state. 4) This is where this bug in particular occurs: Normally there's a write-protection check performed (i.e. see https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/anim_sys.c$1619) that would prevent overwriting. However, here `old_value` (i.e. SDNA value, unkeyed above) != `new_value` (i.e. result of animation evaluation, from F-Curves that don't know about this new value, as they don't have keyframes in place to enforce that yet). Hence, the values from the F-Curves get flushed back to SDNA, overwriting the unkeyed values. In 2.5, we avoided this scenario by making it so that animation evaluation only ever happened on frame change. In other words, if the frame doesn't change, animation evaluation doesn't happen to flush away unkeyed values. ~~AFAIK, right now doing a COW flush pretty much forces the evaluation of everything downstream from it (since we can't really know whether the change which necessitated the flush occurred because some value changed that other things need to rely on - e.g. a property's value changing after user interaction the UI). Thus, COW flushing often means that animation (+ proxy/override stuff) needs to re-run on top of these newly re-synced datablock(s) to get things in sync with the current frame again (just in case a particular COW/graph is looking at a different point in time).~~
Member

Closed as duplicate of #58721

Closed as duplicate of #58721
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
5 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#61173
No description provided.