Fix #119534: Action Editor empty channels region without active action #119621

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:119534 into blender-v4.1-release 2024-03-19 14:05:54 +01:00
Member

Caused by a96f1208cc

For SPACE_ACTION (SACTCONT_ACTION), actedit_get_context will
return true, but ANIM_animdata_context_getdata also checks the
bAnimContext data [which in this case is the action], so will not
return true.

As a result we are skipping drawing the background and the search, which
is now done again.

Caused by a96f1208cc72 For `SPACE_ACTION` (`SACTCONT_ACTION`), `actedit_get_context` will return true, but `ANIM_animdata_context_getdata` also checks the `bAnimContext` data [which in this case is the action], so will **not** return true. As a result we are skipping drawing the background and the search, which is now done again.
Philipp Oeser added 1 commit 2024-03-18 12:12:01 +01:00
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
cacf82a477
Fix #119534: Action Editor empty channels region without active action
Caused by a96f1208cc

For `SPACE_ACTION` (`SACTCONT_ACTION`), `actedit_get_context` will
return true, but `ANIM_animdata_context_getdata` also checks the
`bAnimContext` data [which in this case is the action], so will **not**
return true.

As a result we are skipping drawing the background and the search, which
is now done again.
Philipp Oeser added this to the Animation & Rigging project 2024-03-18 12:12:16 +01:00
Philipp Oeser requested review from Christoph Lendenfeld 2024-03-18 12:12:23 +01:00
Philipp Oeser requested review from Sybren A. Stüvel 2024-03-18 12:12:28 +01:00
Christoph Lendenfeld approved these changes 2024-03-18 22:34:27 +01:00
Christoph Lendenfeld left a comment
Member

thanks for the fix. I will approve this since the fact that the bAnimContext is usable even though false is returned shouldn't stand in the way of this fix. Do wait for sybren to have eyes on this though

thanks for the fix. I will approve this since the fact that the `bAnimContext` is usable even though false is returned shouldn't stand in the way of this fix. Do wait for sybren to have eyes on this though
@ -287,0 +289,4 @@
UI_ThemeClearColor(TH_BACK);
/* channel filter next to scrubbing area */
ED_time_scrub_channel_search_draw(C, region, ac.ads);

The fact that has_valid_animcontext is false, but you can still use ac.ads is very confusing.

Now that I think about it, it is probably better to move that to below the if(!has_valid_animcontext).
While I don't see a way how ac.ads could be a nullptr it would be a crash if it is.

The only difference is that you wouldn't get the search bar which is fine IMO because there is nothing to search for.

Edit: Since this has always worked like that (had a look at my commit that broke this) I am fine landing it like that. It hasn't crashed so far so it's probably fine. Also means no visual changes between 4.0 and 4.1

The fact that `has_valid_animcontext` is false, but you can still use `ac.ads` is very confusing. ~~Now that I think about it, it is probably better to move that to below the `if(!has_valid_animcontext)`. While I don't see a way how `ac.ads` could be a `nullptr` it would be a crash if it is.~~ ~~The only difference is that you wouldn't get the search bar which is fine IMO because there is nothing to search for.~~ Edit: Since this has always worked like that (had a look at my commit that broke this) I am fine landing it like that. It hasn't crashed so far so it's probably fine. Also means no visual changes between 4.0 and 4.1
Sybren A. Stüvel approved these changes 2024-03-19 10:18:29 +01:00
Sybren A. Stüvel left a comment
Member

@ChrisLend wrote:
The fact that has_valid_animcontext is false, but you can still use ac.ads is very confusing.

Ooooooh my, yeah that's bad. Nothing to do with this PR, indeed, so for that just a big thanks @lichtwerk !

> @ChrisLend wrote: > The fact that `has_valid_animcontext` is false, but you can still use `ac.ads` is very confusing. Ooooooh my, yeah that's bad. Nothing to do with this PR, indeed, so for that just a big thanks @lichtwerk !
Author
Member

@ThomasDinges : fine for you for 4.1 still?

@ThomasDinges : fine for you for 4.1 still?

Fine with me

Fine with me
Sybren A. Stüvel added this to the 4.1 milestone 2024-03-19 13:04:06 +01:00
Sybren A. Stüvel added the
Module
Animation & Rigging
label 2024-03-19 13:04:12 +01:00

@blender-bot build

@blender-bot build
Philipp Oeser merged commit 4a7c5d3d3d into blender-v4.1-release 2024-03-19 14:05:54 +01:00
Philipp Oeser deleted branch 119534 2024-03-19 14:06:00 +01: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 Assignees
4 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#119621
No description provided.