Anim: Improve readability of channel colors in channel list #112861
No reviewers
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112861
Loading…
Reference in New Issue
No description provided.
Delete Branch "dr.sybren/blender:pr/69059-anim-channel-bg-color"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Draw anim channel colors as a little rectangle in the channel list, instead of taking over the entire channel background. This keeps the channel names readable, regardless of the channel colors.
Channel colors are typically set via the bone colors, and since those are chosen for visual contrast in the 3D Viewport, they aren't guaranteed to also be a suitable background color for the channel list. Because of this, it's no longer used as such.
This includes changes to both regular FCurve channels & groups, as well as Grease Pencil layers.
Design task: #69059
The changes can be described as:
I have doubts about the last step. A similar flag (
AUTOKEY_FLAG_XYZ2RGB
) doesn't need explicit setting of the default totrue
in RNA, yet a factory startup will start with it enabled, and also "Reset to Default Value" in the GUI will reset it to 'enabled' as well.no complaints from the code side
the text cutoff logic needs to be adjusted though
Also as you can see in my image the padding to the right end of the channel box is different for me. Not sure where that is coming from though.
From a user side it would be good to know if it's ok to lose the colored backgrounds in the keyframes region. I feel like it's more useful there, because it means you don't need to trace the channels from the channel box to know where the keys belong to. As in it provides easy visual grouping without needing to look somewhere else
It's coming from a very strong coupling between
ANIM_channel_draw_widgets()
andANIM_channel_draw()
. Basically the latter has to know exactly what the former is doing. There is a lot to improve in this code.No idea either. I've played around with the preferences, but can't get that to appear here.
This would be good to discuss in the module meeting. In the mean time, I think it's better to land this sooner than later (before bcon3) and treating the adjustment of that particular aspect as polish.
gets my green light
I definitely prefer the version with the background still colored, but if that can be tweaked later I am fine with either version now.
@ -4777,0 +4714,4 @@
/* Little channel color rectangle. */
if (acf_show_channel_colors()) {
const float rect_width = 0.5f * ICON_WIDTH;
const float rect_margin = 2.0f * U.ui_scale;
Should probably use
UI_SCALE_FAC
instead ofU.ui_scale
. The latter doesn't include the screen DPI (e.g. double point/pixel size for macOS).@ -5610,0 +5604,4 @@
/* Little channel color rectangle. */
const bool show_group_colors = acf_show_channel_colors();
if (show_group_colors) {
const float rect_width = 0.5f * ICON_WIDTH;
These are duplicated from above, so tend to get out of sync. Would recommend a function (or macro).
That's true of the entire drawing code in that function... It needs a proper redesign.
Having said that, I'll move a few things into macros so that at least these factors are ensured to be used consistently.
I'll remove @filedescriptor as a reviewer. He already face-to-face agreed that the Grease Pencil channel coloring should use the same as other animation channels when discussing this face-to-face.
I've also discussed with @Hjalti and Rik Schutte and they also agree that this PR is a good change.
Looks good to me on a quick glance.
Just one minor nit (that was actually from previous code, but I think is worth cleaning up). Can take care of that while landing.
@ -228,1 +179,3 @@
}
/* FIXME: what happens when the indentation is 1 greater than what it should be
* (due to grouping)? */
int colOfs = 10 - 10 * indent;
This variable name took me a bit to grok.
colOffset
would be better, I think.