Animation: Keep icons aligned when curves are baked #108518
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
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#108518
Loading…
Reference in New Issue
No description provided.
Delete Branch "ChrisLend/blender:channel_draw_lock_on_baked"
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?
When curves were baked, the lock icon wasn't drawn, which resulted in a misalignment of the other icons.

With this patch, the icons are kept in alignment.

Also removes the comments that are no longer valid.
@ -5185,6 +5177,12 @@ static void draw_setting_widget(bAnimContext *ac,
UI_but_disable(but, TIP_("Can't edit this property from a linked data-block"));
}
}
if (ale->datatype == ALE_FCURVE && setting == ACHANNEL_SETTING_PROTECT) {
Thanks for the inspiration, I used it as inspiration for something similar in #106214 :)
That PR has a little different structure though, so that it's a little easier to extend for other settings. It would duplicate some of the code (the
if (is fcurve)
and the cast), but IMO that's a fair trade-off for keeping the per-settings-switch
structure of the rest of the code.We could use the 'inactive' state here, like I did in #106214 ?
@dr.sybren I used the inactive state but then found out that the lock state does make a difference, even on baked curves
it's about the modifiers. If the curve is locked you can't add any
So I chose to keep the lock icon active
The only downside is that there is no immediate way to tell in the channel box if a curve is baked. But I am wondering how important that is
Some general comments. I might be misunderstanding here
You are trying to fix this alignment problem by showing the lock icon even when it isn't strictly needed. It looks like you tried setting it inactive and disabling and those had bad effects. Have you tried just filling the space? Ie, adding blank space, padding, or ICON_NONE to the place where the lock would be. I would just try making it always valid in
acf_fcurve_setting_valid
but then where it is shown inANIM_channel_draw_widgets
(protect... section) don't do the drawing (but allow the change in offset) under whatever conditions fit (like !(FCurve)ale.data->bezt).Note that in
acf_fcurve_setting_valid
the default return is true. So you can just remove the entire ACHANNEL_SETTING_PROTECT section rather than always return true in it.Animation: Draw lock icon on baked curvesto Animation: Keep icons aligned when curves are bakedThanks for the suggestion @Harley
We discussed it in yesterdays A&R module meeting and decided to go along with that.
So I updated the code and the PR description
Looks great.
@ChrisLend - Sorry for my delay in looking at this again. I did get a notification of your update on July 28 but somehow let it fall off my plate.
To make matters worse this really should be merged before Wednesday (Aug 23), so hopefully you can get a final "looks good!" from
Sybren fairly soon. Just blame me for any rush.
Um... my comment about urgency was based on my incorrect understanding about the release schedule. So ignore that.
I think sybren is on holiday now, so will only be approved after. This should be good to land in BCon2, it's not strictly speaking a new feature
For sure. I was just confused. As usual. LOL.