Regression: Blender doesn't allow to animate any Colormanagement setting (e.g. Exposure) #97003

Closed
opened 2022-04-03 19:18:56 +02:00 by Denis · 20 comments

System Information
Operating system: Manjaro
Graphics card: RTX 3060

Blender Version
Broken: 3.1.2, 3.2.0
Worked: 3.0.1, 2.93.7

Caused by 35aedd87e7

I can't animate the Exposure parameter. If it has at least one keyframe, Blender will reset it every time when I try to change the value.
The issue was not noticed in 2.93.7.

2022-04-03 19-59-42.mp4

Reason: when Colormanagement settings change, the scene is tagged DEG_id_tag_update(id, 0); which then triggers deg_graph->tag_time_source(); since 35aedd87e7

**System Information** Operating system: Manjaro Graphics card: RTX 3060 **Blender Version** Broken: 3.1.2, 3.2.0 Worked: 3.0.1, 2.93.7 Caused by 35aedd87e7 I can't animate the Exposure parameter. If it has at least one keyframe, Blender will reset it every time when I try to change the value. The issue was not noticed in 2.93.7. [2022-04-03 19-59-42.mp4](https://archive.blender.org/developer/F12966899/2022-04-03_19-59-42.mp4) Reason: when Colormanagement settings change, the scene is tagged `DEG_id_tag_update(id, 0);` which then triggers `deg_graph->tag_time_source();` since 35aedd87e7
Author

Added subscriber: @Mapper720-4

Added subscriber: @Mapper720-4
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm, will check

Can confirm, will check
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

Caused by 35aedd87e7

CC @ideasman42

Caused by 35aedd87e7 CC @ideasman42
Philipp Oeser changed title from Blender doesn't allow to animate the Exposure parameter to Regression: Blender doesn't allow to animate the Exposure parameter 2022-04-04 14:10:08 +02:00
Philipp Oeser changed title from Regression: Blender doesn't allow to animate the Exposure parameter to Regression: Blender doesn't allow to animate any Colormanagement setting (e.g. Exposure) 2022-04-04 14:44:32 +02:00
Member

Added subscriber: @Sergey

Added subscriber: @Sergey
Member

As said in the description: main problem is tagging a scene so generally with DEG_id_tag_update(id, 0)
@ideasman42 suggested DEG_id_tag_update(id, ALL & ~ID_RECALC_FRAME_CHANGE), or figuring out what colormanagement settings really need to be updating (maybe add a new flag).
There is also many more occasions of this tagging the scene.

@Sergey: opinions?

As said in the description: main problem is tagging a scene so generally with `DEG_id_tag_update(id, 0)` @ideasman42 suggested `DEG_id_tag_update(id, ALL & ~ID_RECALC_FRAME_CHANGE)`, or figuring out what colormanagement settings really need to be updating (maybe add a new flag). There is also many more occasions of this tagging the scene. @Sergey: opinions?

In the very middle of something else now..
Does the P2882: (An Untitled Masterwork)

diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index f945e9b6fbc..3b87f63ef23 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -445,8 +445,8 @@ const char *update_source_as_string(eUpdateSource source)

 int deg_recalc_flags_for_legacy_zero()
 {
-  return ID_RECALC_ALL &
-         ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION | ID_RECALC_SOURCE | ID_RECALC_EDITORS);
+  return ID_RECALC_ALL & ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION | ID_RECALC_SOURCE |
+                           ID_RECALC_EDITORS | ID_RECALC_FRAME_CHANGE);
 }

 int deg_recalc_flags_effective(Depsgraph *graph, int flags)

fix the problem?

In the very middle of something else now.. Does the [P2882: (An Untitled Masterwork)](https://archive.blender.org/developer/P2882.txt) ``` diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index f945e9b6fbc..3b87f63ef23 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -445,8 +445,8 @@ const char *update_source_as_string(eUpdateSource source) int deg_recalc_flags_for_legacy_zero() { - return ID_RECALC_ALL & - ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION | ID_RECALC_SOURCE | ID_RECALC_EDITORS); + return ID_RECALC_ALL & ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION | ID_RECALC_SOURCE | + ID_RECALC_EDITORS | ID_RECALC_FRAME_CHANGE); } int deg_recalc_flags_effective(Depsgraph *graph, int flags) ``` fix the problem?
Member

In #97003#1334937, @Sergey wrote:
In the very middle of something else now..
Does the P2882 fix the problem?

Yes, and that would also take care of #97028 (Audio scrubbing plays current frame when changing any color management setting.) it seems

> In #97003#1334937, @Sergey wrote: > In the very middle of something else now.. > Does the [P2882](https://archive.blender.org/developer/P2882.txt) fix the problem? Yes, and that would also take care of #97028 (Audio scrubbing plays current frame when changing any color management setting.) it seems

@lichtwerk You fine having an honors of typing commit message and pushing it? :)

Form the legacy-zero perspective FRAME_CHANGE is not different from ANIMATION: is not supposed to be tagging for anything which involves animation re-evaluation.

@lichtwerk You fine having an honors of typing commit message and pushing it? :) Form the legacy-zero perspective FRAME_CHANGE is not different from ANIMATION: is not supposed to be tagging for anything which involves animation re-evaluation.
Member

Could do, but prefer to carefully go over the occurrances of scene being tagged legacyzero that possibly rely on this (even if falsely so).
Meaning: check if the formerly ID_RECALC_AUDIO_SEEK (now ID_RECALC_FRAME_CHANGE) was not expected to be "included" in legacyzero

Could do, but prefer to carefully go over the occurrances of scene being tagged legacyzero that possibly rely on this (even if falsely so). Meaning: check if the formerly `ID_RECALC_AUDIO_SEEK` (now `ID_RECALC_FRAME_CHANGE`) was not expected to be "included" in legacyzero

Regarding changes to deg_recalc_flags_for_legacy_zero (I was testing this before noticing the updates to this task).

As far as I can see none of the callers to DEG_id_tag_update(&scene->id, 0) should be relying on audio-seeking (ID_RECALC_FRAME_CHANGE) being set. Mostly this relates to changes to view layers as well as scene quality settings & freestyle modifiers.


Further, we could consider having the define for legacy flags along side other defines P2884 while there is a benefit in keeping them private/localized, it means it's easy to accidentally overlook the fact new flags are implicitly included for all callers that pass in zero to DEG_id_tag_update. OTOH, these flags kinds of flags are not added regularly, so this could be noted in the comments, e.g. P2885.

Regarding changes to `deg_recalc_flags_for_legacy_zero` (I was testing this before noticing the updates to this task). As far as I can see none of the callers to `DEG_id_tag_update(&scene->id, 0)` should be relying on audio-seeking (ID_RECALC_FRAME_CHANGE) being set. Mostly this relates to changes to view layers as well as scene quality settings & freestyle modifiers. --- Further, we could consider having the define for legacy flags along side other defines [P2884](https://archive.blender.org/developer/P2884.txt) while there is a benefit in keeping them private/localized, it means it's easy to accidentally overlook the fact new flags are implicitly included for all callers that pass in zero to `DEG_id_tag_update`. OTOH, these flags kinds of flags are not added regularly, so this could be noted in the comments, e.g. [P2885](https://archive.blender.org/developer/P2885.txt).
Member

Thx checking, @ideasman42 .
Seems this is in good hands, please go ahead with committing etc.

Thx checking, @ideasman42 . Seems this is in good hands, please go ahead with committing etc.

@ideasman42, Going away from using 0 as a tag is a nice goal, but the proposed in P2884 way is wrong. The deg_recalc_flags_for_legacy_zero is an internal function which is used by a branch of DEG_id_tag_update which handles 0 flag given to it.
It is also bad idea to tag for everything. The DEG_id_tag_update should be given flag corresponding to what was actually changed.

@ideasman42, Going away from using 0 as a tag is a nice goal, but the proposed in [P2884](https://archive.blender.org/developer/P2884.txt) way is wrong. The `deg_recalc_flags_for_legacy_zero ` is an internal function which is used by a branch of `DEG_id_tag_update ` which handles 0 flag given to it. It is also bad idea to tag for everything. The `DEG_id_tag_update ` should be given flag corresponding to what was actually changed.

@Sergey it makes sense that it's hidden & not used publicly, the outcome of this is that it's easy to accidentally introduce bugs by not including a flag in deg_recalc_flags_for_legacy_zero. That's why I'm suggesting some way to make this less likely for this to happen in the future - even if it's to note in a comment that the function should be checked when adding new flags.

@Sergey it makes sense that it's hidden & not used publicly, the outcome of this is that it's easy to accidentally introduce bugs by not including a flag in `deg_recalc_flags_for_legacy_zero`. That's why I'm suggesting some way to make this less likely for this to happen in the future - even if it's to note in a comment that the function should be checked when adding new flags.

That's why I'm suggesting some way to make this less likely for this to happen in the future - even if it's to note in a comment that the function should be checked when adding new flags.

The proper way to do so is to stop using flag 0.

> That's why I'm suggesting some way to make this less likely for this to happen in the future - even if it's to note in a comment that the function should be checked when adding new flags. The proper way to do so is to stop using flag 0.

@Sergey that's fine as a goal, currently there are over 200 instances of this - unless there are near-term plans to remove them (by the next release for e.g) we should document the current state of the code.

Part of the issue is there isn't much incentive to spend time removing these but further discussion about this could happen over chat.

@Sergey that's fine as a goal, currently there are over 200 instances of this - unless there are near-term plans to remove them (by the next release for e.g) we should document the current state of the code. Part of the issue is there isn't much incentive to spend time removing these but further discussion about this could happen over chat.

This issue was referenced by 328dfab423

This issue was referenced by 328dfab4236ac56a36969335df795e80cba08188

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2022-04-05 13:07:39 +02:00
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#97003
No description provided.