Anim: when inserting a key on a slotted Action, correctly remap via NLA #128700

Merged
Sybren A. Stüvel merged 1 commits from dr.sybren/blender:anim/insert-key-nla-remapping into main 2024-10-07 18:10:00 +02:00

When inserting a key on a slotted Action, apply NLA remapping on both
the key's time and value.

This pushes the fork in the code (between legacy & new Actions) a bit
further down the call stack.

Ref: #120406

When inserting a key on a slotted Action, apply NLA remapping on both the key's time and value. This pushes the fork in the code (between legacy & new Actions) a bit further down the call stack. Ref: #120406
Sybren A. Stüvel added the
Module
Animation & Rigging
label 2024-10-07 16:43:17 +02:00
Sybren A. Stüvel added 1 commit 2024-10-07 16:43:27 +02:00
Anim: when inserting a key on a slotted Action, correctly remap via NLA
All checks were successful
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
79c78b8e7d
When inserting a key on a slotted Action, apply NLA remapping on both
the key's time and value.

This pushes the fork in the code (between legacy & new Actions) a bit
further down the call stack.

Ref: #120406
Sybren A. Stüvel requested review from Nathan Vegdahl 2024-10-07 16:43:43 +02:00
Author
Member

@blender-bot build

@blender-bot build
Nathan Vegdahl approved these changes 2024-10-07 17:34:04 +02:00
Nathan Vegdahl left a comment
Member

The code looks good. If you want to wait for me to also test it, I'll do that on Thursday when we're back in the office. Otherwise feel free to land now if you feel you've tested it thoroughly enough yourself.

The code looks good. If you want to wait for me to also test it, I'll do that on Thursday when we're back in the office. Otherwise feel free to land now if you feel you've tested it thoroughly enough yourself.
@ -898,0 +890,4 @@
static CombinedKeyingResult insert_key_layered_action(
Main *bmain,
Action &action,
Layer &layer,
Member

This more just a note for posterity:

The original intent of this function was that it would eventually become the function that's responsible for doing all of things necessary to figure out where the key goes, including which layer/strip it should go on, and how it's value should be mapped. So moving the decision of what layer to put the key on outside of this function and passing it in as a parameter violates that original intent.

However, none of that actually becomes relevant until we have layered animation anyway. Moreover, we'll be coming back and refactoring the keyframing code after we rip out legacy actions as well. So I think this is fine for now, and we can figure out how to reorganize things later when we're looking at the larger context of things.

This more just a note for posterity: The original intent of this function was that it would eventually become the function that's responsible for doing all of things necessary to figure out where the key goes, including which layer/strip it should go on, and how it's value should be mapped. So moving the decision of what layer to put the key on outside of this function and passing it in as a parameter violates that original intent. However, none of that actually becomes relevant until we have layered animation anyway. Moreover, we'll be coming back and refactoring the keyframing code after we rip out legacy actions as well. So I think this is fine for now, and we can figure out how to reorganize things later when we're looking at the larger context of things.
dr.sybren marked this conversation as resolved
Sybren A. Stüvel merged commit 0a74768a98 into main 2024-10-07 18:10:00 +02:00
Sybren A. Stüvel deleted branch anim/insert-key-nla-remapping 2024-10-07 18:10:03 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
2 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#128700
No description provided.