Fix #120574: Broken animation when saving file with NLA tweak mode entered #120830
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#120830
Loading…
Reference in New Issue
No description provided.
Delete Branch "dr.sybren/blender:pr/fix-nla-linking-tweak-mode-exit"
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?
Fix linking & library-overriding with NLA Tweak Mode enabled. This is a
two-pronged approach:
in NLA Tweak Mode, it is forced out of tweak mode. This ensures that
the correct Action is loaded, and that all the NLA flags are set
correctly to display the NLA animation (instead of only the tweaked
strip).
all 'apply' functions have been run. This is necessary to ensure that
all the flags and pointers that NLA Tweak Mode depends on are actually
set correctly and consistently.
This also adds one utility function
BKE_nla_debug_print_flags()
thatis by now unused. It was very useful in debugging this, though, and I
think it'll be useful in the future as well.
Design task: #120573
@blender-bot package
Package build started. Download here when ready.
Generally looks good, some minor notes below.
@ -5046,6 +5046,8 @@ void BKE_lib_override_library_update(Main *bmain, ID *local)
}
}
BKE_animdata_liboverride_post_process(local);
Wouldn't mind a comment explaining why this is needed, and (roughly) what it is doing ;)
Which information do you feel is missing, that's not already described in the actual documentation of that function?
Documentation of the function is not directly available in code calling it, and since this is addressing a non-standard 'should not happen' case in liboverride handling, would like to have a quick summary of why this has to be called here.
You need a better IDE ;-)
I've added a comment to explain.
@ -2447,0 +2589,4 @@
}
/* In tweak mode, with tracks, so ensure that the active track/strip pointers are correct. */
if (!adt->act_track || !adt->actstrip) {
I would not condition this to nullptr check, but always run it. The reason being, this data may be set from the reference linked data, to some other track or strip... Better be safe here and always reset them to the expected values imho.
Gave the PR a quick test and it seems to solve the issue well.
The animation does not break and in the lighting file tweak mode is not restored for the linked data-block when loading the file.
It is still possible to enter tweak mode on the linked data though, that seems to me like it could be a problem, but I'm too unfamiliar what tweak mode even is tbh. Just noticed this as a potential issue.
🥳
Thanks.