ColorBalanceNode doesn't use Autokey correctly #42567

Closed
opened 2014-11-11 11:51:47 +01:00 by Sebastian Koenig · 13 comments

System Information
OSX 10.9.4, GTX660ti

Blender Version
Broken: 5c6e333, 2.72
Worked: i doubt this ever worked

Short description of error
When changing the brightness and color values in the ColorBalanceNode the autokeying only sets a key for the first value (red). That makes animating color changes with autokeying useless.

Exact steps for others to reproduce the error
Open attached file, go to any frame, change the brightness or color of Gamma Values in the CB-Node, see how it draws a yellow border around the color field (=key), change the frame again and notice how the color switches to something else, because only the red channel got keyed.color_balance_autokey.blend

**System Information** OSX 10.9.4, GTX660ti **Blender Version** Broken: 5c6e333, 2.72 Worked: i doubt this ever worked **Short description of error** When changing the brightness and color values in the ColorBalanceNode the autokeying only sets a key for the first value (red). That makes animating color changes with autokeying useless. **Exact steps for others to reproduce the error** Open attached file, go to any frame, change the brightness or color of Gamma Values in the CB-Node, see how it draws a yellow border around the color field (=key), change the frame again and notice how the color switches to something else, because only the red channel got keyed.[color_balance_autokey.blend](https://archive.blender.org/developer/F123244/color_balance_autokey.blend)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Jeroen Bakker was assigned by Sebastian Koenig 2014-11-11 11:51:47 +01:00
Author
Member

Added subscriber: @sebastian_k

Added subscriber: @sebastian_k
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Added subscriber: @Ton

Added subscriber: @Ton
Member

Julian: I think you can do better than this. Triaging means that you verify and analyze the issue, share your analysis with the rest of us, and that you verified (in code, via commit logs) who is responsible for it.

In this case you could have written out that:

  • you confirmed that the issue is not working
  • that it did not work ever, so it's not a bug really but more of a limitation of code
  • but then you check in which similar (RGB or XYZ) cases it works
  • maybe it is only an issue for node properties/buttons?
  • if so, then why is that only a node problem and not for other buttons/panels

Then you have pinned down the precise issue, and you can find who was responsible for the feature, and assign to him, with the message:

  • Please check if you can fix this, or mark it as a known limitation in our UI section of wiki todo.

That's what you got involved for - help others do their work :)

Julian: I think you can do better than this. Triaging means that you verify and analyze the issue, share your analysis with the rest of us, and that you verified (in code, via commit logs) who is responsible for it. In this case you could have written out that: - you confirmed that the issue is not working - that it did not work ever, so it's not a bug really but more of a limitation of code - but then you check in which similar (RGB or XYZ) cases it works - maybe it is only an issue for node properties/buttons? - if so, then why is that only a node problem and not for other buttons/panels Then you have pinned down the precise issue, and you can find who was responsible for the feature, and assign to him, with the message: - Please check if you can fix this, or mark it as a known limitation in our UI section of wiki todo. That's what you got involved for - help others do their work :)
Jeroen Bakker was unassigned by Julian Eisel 2014-11-14 17:35:13 +01:00
Julian Eisel self-assigned this 2014-11-14 17:35:13 +01:00
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

Hey @Ton,
Indeed, this isn't really helpful. I should've spend much more time on this. I just had a quick look on it while working on something different (same with #42475).
Next time I'll try to investigate more time into the points you've thrown in.
Instead of writing moar excuses I just looked into this bug and found a possible fix (D898) - needs approval before commiting). I hope that's sort of a compensation ;)

Hey @Ton, Indeed, this isn't really helpful. I should've spend much more time on this. I just had a quick look on it while working on something different (same with #42475). Next time I'll try to investigate more time into the points you've thrown in. Instead of writing moar excuses I just looked into this bug and found a possible fix ([D898](https://archive.blender.org/developer/D898)) - needs approval before commiting). I hope that's sort of a compensation ;)

Added subscribers: @JoshuaLeung, @ideasman42, @mont29

Added subscribers: @JoshuaLeung, @ideasman42, @mont29

@JulianEisel No, this will not work. 0 is a valid index in RNA arrays, you should absolutely not use it as 'everything' marker (else, modifying e.g. only X coord would key whole XYZ, same for R/RGBA, etc.).

Also, there is nothing specific to nodes here, same issue exists for any 'whole RNA array' button (all color wheels mostly). Issue is, we only always key one FCurve in this case (the one returned by ui_but_get_fcurve()), since we give this FCurve's array_index to insert_keyframe() call in ui_but_anim_autokey().

This patch rather uses button's rna_index value here, which will be set to expected -1 value for color wheels & co. Would like to get blessing from Joshua and/or Campbell here, though...

P165: #42567

diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 43899f9..735c73d 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -219,7 +219,11 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra)
 			short flag = ANIM_get_keyframing_flags(scene, 1);
 
 			fcu->flag &= ~FCURVE_SELECTED;
-			insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
+			/* Note: We use but->rnaindex instead of fcu->array_index,
+			 *       because a button may control all items of an array at once.
+			 *       E.g., color wheels (see #42567). */
+			insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)),
+			                fcu->rna_path, but->rnaindex, cfra, flag);
 			WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
 		}
 	}

@JulianEisel No, this will not work. 0 is a valid index in RNA arrays, you should absolutely not use it as 'everything' marker (else, modifying e.g. only X coord would key whole XYZ, same for R/RGBA, etc.). Also, there is nothing specific to nodes here, same issue exists for any 'whole RNA array' button (all color wheels mostly). Issue is, we only always key **one** FCurve in this case (the one returned by `ui_but_get_fcurve()`), since we give this FCurve's `array_index` to `insert_keyframe()` call in `ui_but_anim_autokey()`. This patch rather uses button's `rna_index` value here, which will be set to expected `-1` value for color wheels & co. Would like to get blessing from Joshua and/or Campbell here, though... [P165: #42567](https://archive.blender.org/developer/P165.txt) ``` diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 43899f9..735c73d 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -219,7 +219,11 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) short flag = ANIM_get_keyframing_flags(scene, 1); fcu->flag &= ~FCURVE_SELECTED; - insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag); + /* Note: We use but->rnaindex instead of fcu->array_index, + * because a button may control all items of an array at once. + * E.g., color wheels (see #42567). */ + insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)), + fcu->rna_path, but->rnaindex, cfra, flag); WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); } } ```

@mont29. looks good
would assert that rna-index == fcu-index (when its not -1), just to catch any errors.

@mont29. looks good would assert that rna-index == fcu-index (when its not -1), just to catch any errors.

This issue was referenced by 141064d7ae

This issue was referenced by 141064d7ae3f2e9277ba272d582c0a72c1500e1c

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 141064d7ae.

Closed by commit 141064d7ae.
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
6 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#42567
No description provided.