Animation: Slotted Actions (multi-datablock animation) Planning #120406

Open
opened 2024-04-08 17:25:19 +02:00 by Sybren A. Stüvel · 0 comments

43d7558e5b00: Anim: Remove 'Slotted Actions' experimental flag references this tracking task, but it should have pointed to its PR as well: #128889


This is a copy of the Slotted Actions Planning on HackMD. The document on HackMD is the ground truth, this is just for tracking within the Blender infrastructure (but multi-people editing of a task description isn't the most reliable on Gitea at the moment).


Slotted Actions Planning

For more context, see:

Goals: ability to animate with the new multi-slot Action, and having different data-blocks animated by the same Action.

Non-goals: layers, strips on layers, animation-level constraints, bone pickers.

Each phase after 3 should have some time to iterate on the new functionality with animators.

1: Existing code for the data model → main

#118677: Implement the Data Model

2: Data Model access via existing UI

#119875: add layered Action to anim filtering code

Goal: minimal working state for animators to animate anything.

  • Hooking up to the existing animation filtering code
    • Research existing code
    • Add layered Action support
    • Dope Sheet
    • Graph Editor
  • Adding Slots to animation filtering code
    • Action editor (#122672)
    • Dope Sheet (decided to not show slots here)
    • Graph Editor (decided to not show slots here)
  • Key Insertion:
    • From 3D Viewport (#119669)
    • From context menu on properties
    • From Graph Editor
    • From Dope Sheet Editor (all modes except Action/GP)
    • From Action Editor (worked, but not longer after slots are shown there)
    • From Grease Pencil dope sheet mode
    • 'Follow Path' constraint, which sets up animation stuff by itself.
    • Finding all other use sites of keyframe-insertion code. (Discussed in a meeting with Sergey, and he suggested just getting the knowns working, and let the unknowns get discovered through testing rather than scouring the code base.)
  • Key insertion (also via Python): XYZ-to-RGB
  • Icon design for slots → discuss with Pablo Vazquez. (moved to a later phase to not delay marking this one as finished)

End-of-subphase goal: Animators can animate with a file that has been set up for animation by the devs. Update: practical animation will likely be too hindered by not having F-Curve groups (which also causes things like 'only for selected bones' to not work).

3: Creating & Assigning Actions

  • Action assigning UI
    • Selecting the slot in the Action editor (#125416)
    • Action + Slot selector in Properties panel (#125666), also for non-Object datablocks. WEEK 1 Sybren
  • Action creation UI/UX
    • Creating new Action + slot through inserting the first key
    • Ensuring (Object + Object Data) and (ID + embedded ID) by default use the same Action (#126655, WEEK 1 Christoph)
  • Slot creation via key insertion.
  • Slot creation via operators on the selector. (#126943) WEEK 0 Sybren
  • Slot unassignment operators. (#126943) WEEK 0 Sybren
  • Deleting Slots. (#127112, WEEK 1 Sybren)

End-of-subphase goal: Animators can animate a file from scratch.

4: Organisation of animation channels

This phase focuses on getting feature parity with the legacy Action F-Curve groups.

  • Key selection via group rows in action/dopesheet editor. (There's a bug currently that makes this not work properly.) WEEK 1 Nathan + Sybren
  • Flags (enable/disable, protected, etc).
  • Automatic creation of new groups, when new F-Curves are created.
  • Automatically add new F-Curves to existing groups, when they already exist.
  • Manual grouping & un-grouping of FCurves, and moving FCurves and groups up/down in the channel list. WEEK 1 Nathan
  • Python API for groups on channel bags.
  • Backwards-compatibility Python API on action.groups. WEEK 1 Sybren
  • Fixing indentation of animation channels. WEEK 1 Nathan
  • Channel list in Action editor: dim the contents of a slot when that slot is unassigned. WEEK 1 Nathan

End-of-subphase goal: Animators don't get lost in their long lists of channels.

5: Data Model Polishing

  • Change how strips store their data. Instead of storing the data inside the strip itself, the strip data should be stored in a flat array on the Action. Strips should reference this array, to make instancing trivial. WEEK 2 + 3 Nathan
    • Implement the new data model (#126559)
    • Type refinement of RNA structs for the Strip (#127859)
    • Deleting unused strip data array entries (#127837)

6: Feature Par with Actions

  • Autokeying
  • Selection syncing (objects/bones/otherthings vs. their animation channels) if feasible to do with the current code base for this.
  • Cycle-aware keying? At least to the point how it works now.
  • Dopesheet & Graph Editor filters.
  • Cleanup pass on C++ API moving some F-Curve related functions from KeyframeStrip to ChannelBag.
  • Icon design for slots (#123372).

End-of-subphase goal: Animators can work with the multi-slot Actions as comfortably as with legacy Actions.

7: Ensuring all the other code can work with layered Actions

There will be much code that doesn't go through the animation filtering or key insertion systems, but directly accesses action->curves. This code needs to be updated to handle layered Actions.

8: Tooling

  • Conversion operator from Legacy to Layered Action.
    • Converting groups properly in legacy → layered action conversion operator. WEEK 1 Christoph
  • Conversion from single-slot Action to legacy Action? somewhat automatic given backward-compatible API + forward compatibility.
  • Tools for joining & splitting Actions (#126937) WEEK 3 Christoph
    • Join all Actions of the selected objects into the Action of the active Object. (#127414)
      • Join action of object data (+ embedded IDs) into the Action of the active Object.
    • Split 1 multi-slot Action → N single-slot Actions.
    • In Action editor: right-click on slot → Move to New Action (#128171)
  • Action menu in Action editor, to hold these operations. (#128171)WEEK 3 Christoph
  • Library Override / non-editability of non-overridden linked data. Even when nothing should be overridable, there should be time to think about this and make clear decisions (+ document those). WEEK 4 Sybren (#128708, if there's more we can fix those when we find them)

9: Proven Explanations & Documentation

  • We need to be able to explain multi-slot Actions.
  • The explanation needs to be written down in the technical documentation.

10: NLA and Pose Library support

  • Investigate what is necessary for NLA support of single-layer, multi-slot Actions.
  • NLA support for single-layer Actions. WEEK 2 Sybren
    • NLA Strips: add Slot selector
    • Make animation evaluation work properly (without F-Curve/strip modifiers)
    • Support Tweak Mode
    • Support F-Curve/strip modifiers
  • Pose Library should produce & work with multi-slot Actions. (#128594 and #128686) WEEK 5 Nathan
  • Push Down (WEEK 5 Sybren, #128444)
  • Stash (#128696)
  • Key insertion: allow in NLA tweak mode (WEEK 5 Sybren, #128446)
  • Key insertion: NLA time remapping (WEEK 5 Sybren, #128700)
  • Check other places where NLA time remapping is done (is fine, BKE_nla_tweakedit_remap() does not directly use the Action itself)
  • (not NLA/Poselib, but also to do:) Test motion tracker. (is fine, doesn't create an Action itself, just inserts keys)

11: Going out of Experimental

  • Versioning to convert legacy Actions to layered ones (behind experimental flag). (WEEK 3 Christoph #127842)
  • Make the Python API for legacy Actions work with single-slot, single-layer Actions as well.
  • Forward compatibility: write F-Curves of the first slot, first strip, first layer as legacy F-Curves as well.
  • Do not return MutableSpan<> any more (for slots/layers/etc.) but always use Span<>. WEEK 5 Sybren
  • Add copying of tmpact slot and handle in rna_AnimaData_override_apply
  • Remove the experimental flag
    • Make PR WEEK 6 Sybren (#128889)
    • Land in main for Blender 4.4 (WEEK 6+ Sybren)
  • Updating the User Manual
    • Make PR WEEK 5+ Nathan
    • Land in main for Blender 4.4 (WEEK 5+ Nathan)

12: A Few Hours Lateur (well, weeks or months)

  • Remove code that deals with the legacy Action data WEEK (NOW+2)+

This is mostly to remove then-dead code. It is deferred until we're confident that the new code is doing the right thing, and we don't need the old code as reference any more for regressions.

Other things, which will likely have to wait until later phases:

  • Per-FCurve-group modifiers. But maybe those become 'modifier strips', and scoping of those is done on a per-layer level.
  • Animation Filtering code replacement. Becomes a little more important when looking at FCurve groups. Those will likely be reimplemented from scratch to get rid of weird ListBase dependent stuff.
  • Fine-grained dependency graph nodes. Currently the Action can only be tagged for update as a whole, causing a full re-evaluation of all animated data-blocks. This should be more granular.
  • Enriching F-Curve grouping functionality:
    • Automatic creation of "manual" groups
    • Automatic (implicit) grouping of FCurves?
    • Automatic sorting of FCurves:
      • First location, then rotation, then scale, then the rest
      • Keeping array elements sequential & in array order
    • Manual reordering of Bindings within an Animation
[43d7558e5b00: Anim: Remove 'Slotted Actions' experimental flag](https://projects.blender.org/blender/blender/commit/43d7558e5b00a14b39e473aec345e5080a5e76d2) references this tracking task, but it should have pointed to its PR as well: #128889 ----------- This is a copy of the [Slotted Actions Planning on HackMD](https://hackmd.io/@anim-rigging/r1FBrCe2T). The document on HackMD is the ground truth, this is just for tracking within the Blender infrastructure (but multi-people editing of a task description isn't the most reliable on Gitea at the moment). ------------- # Slotted Actions Planning For more context, see: - [2024: Animation 2025: Progress & Planning][blogpost-baklava] - [2023: Layered Animation workshop][workshop-2023] - [2022: Character Animation workshop][workshop-2022] [blogpost-baklava]: https://code.blender.org/2024/02/animation-2025-progress-planning/ [workshop-2023]: https://code.blender.org/2023/07/animation-workshop-june-2023/ [workshop-2022]: https://developer.blender.org/docs/features/animation/module/character_animation_workshop_2022/ Goals: ability to animate with the new multi-slot Action, and having different data-blocks animated by the same Action. Non-goals: layers, strips on layers, animation-level constraints, bone pickers. **Each phase after 3 should have some time to iterate on the new functionality with animators.** ## 1: ✅ ~~Existing code for the data model → `main`~~ ~~#118677: Implement the Data Model~~ ## 2: ✅ ~~Data Model access via existing UI~~ #119875: add layered Action to anim filtering code Goal: minimal working state for animators to animate *anything*. - [x] Hooking up to the existing animation filtering code - [x] Research existing code - [x] Add layered Action support - [x] Dope Sheet - [x] Graph Editor - [x] Adding Slots to animation filtering code - [x] Action editor ([#122672](https://projects.blender.org/blender/blender/pulls/122672)) - [x] ~~Dope Sheet~~ (decided to not show slots here) - [x] ~~Graph Editor~~ (decided to not show slots here) - [x] Key Insertion: - [x] From 3D Viewport ([#119669](https://projects.blender.org/blender/blender/pulls/119669)) - [x] From context menu on properties - [x] From Graph Editor - [x] From Dope Sheet Editor (all modes except Action/GP) - [x] From Action Editor (worked, but not longer after slots are shown there) - [x] From Grease Pencil dope sheet mode - [x] 'Follow Path' constraint, which sets up animation stuff by itself. - [ ] ~~Finding all other use sites of keyframe-insertion code.~~ (Discussed in a meeting with Sergey, and he suggested just getting the knowns working, and let the unknowns get discovered through testing rather than scouring the code base.) - [x] Key insertion (also via Python): XYZ-to-RGB - [ ] ~~Icon design for slots → discuss with Pablo Vazquez.~~ (moved to a later phase to not delay marking this one as finished) **End-of-subphase goal:** Animators can animate with a file that has been set up for animation by the devs. **Update:** practical animation will likely be too hindered by not having F-Curve groups (which also causes things like 'only for selected bones' to not work). ## ✅ ~~3: Creating & Assigning Actions~~ - [x] Action assigning UI - [x] Selecting the slot in the Action editor (#125416) - [x] Action + Slot selector in Properties panel (#125666), also for non-Object datablocks. `WEEK 1 Sybren` - [x] Action creation UI/UX - [x] Creating new Action + slot through inserting the first key - [x] Ensuring (Object + Object Data) and (ID + embedded ID) by default use the same Action (#126655, `WEEK 1 Christoph`) - [x] Slot creation via key insertion. - [x] Slot creation via operators on the selector. (#126943) `WEEK 0 Sybren` - [x] Slot unassignment operators. (#126943) `WEEK 0 Sybren` - [x] Deleting Slots. (#127112, `WEEK 1 Sybren`) **End-of-subphase goal:** Animators can animate a file from scratch. ## ✅ ~~4: Organisation of animation channels~~ This phase focuses on getting feature parity with the legacy Action F-Curve groups. - [x] Key selection via group rows in action/dopesheet editor. (There's a bug currently that makes this not work properly.) `WEEK 1 Nathan + Sybren` - [x] Flags (enable/disable, protected, etc). - [x] Automatic creation of new groups, when new F-Curves are created. - [x] Automatically add new F-Curves to existing groups, when they already exist. - [x] Manual grouping & un-grouping of FCurves, and moving FCurves and groups up/down in the channel list. `WEEK 1 Nathan` - [x] Python API for groups on channel bags. - [x] Backwards-compatibility Python API on `action.groups`. `WEEK 1 Sybren` - [x] Fixing indentation of animation channels. `WEEK 1 Nathan` - [x] Channel list in Action editor: dim the contents of a slot when that slot is unassigned. `WEEK 1 Nathan` **End-of-subphase goal:** Animators don't get lost in their long lists of channels. ## ✅ ~~5: Data Model Polishing~~ - [x] Change how strips store their data. Instead of storing the data inside the strip itself, the strip data should be stored in a flat array on the Action. Strips should reference this array, to make instancing trivial. `WEEK 2 + 3 Nathan` - [x] Implement the new data model ([#126559](https://projects.blender.org/blender/blender/pulls/126559)) - [x] Type refinement of RNA structs for the Strip ([#127859](https://projects.blender.org/blender/blender/pulls/127859)) - [x] Deleting unused strip data array entries ([#127837](https://projects.blender.org/blender/blender/pulls/127837)) ## ✅ ~~6: Feature Par with Actions~~ - [x] Autokeying - [x] Selection syncing (objects/bones/otherthings vs. their animation channels) if feasible to do with the current code base for this. - [x] Cycle-aware keying? At least to the point how it works now. - [x] Dopesheet & Graph Editor filters. - [x] Cleanup pass on C++ API moving some F-Curve related functions from `KeyframeStrip` to `ChannelBag`. - [x] Icon design for slots (#123372). **End-of-subphase goal:** Animators can work with the multi-slot Actions as comfortably as with legacy Actions. ## ✅ ~~7: Ensuring all the other code can work with layered Actions~~ There will be much code that doesn't go through the animation filtering or key insertion systems, but directly accesses `action->curves`. This code needs to be updated to handle layered Actions. - [x] Make existing code deal with layered/slotted Actions ([#123424: Anim: make existing code deal with layered Actions](https://projects.blender.org/blender/blender/issues/123424)) `WEEK 4 Sybren & WEEK 4+5 Nathan` - [x] Action Constraints (`WEEK 3 Sybren`, [#127749](https://projects.blender.org/blender/blender/pulls/127749)) - [x] Action+Slot Swapping (`WEEK 3 Sybren`, [#127871](https://projects.blender.org/blender/blender/pulls/127871)) ## 8: ✅ ~~Tooling~~ - [x] Conversion operator from Legacy to Layered Action. - [x] Converting groups properly in legacy → layered action conversion operator. `WEEK 1 Christoph` - [x] ~~Conversion from single-slot Action to legacy Action?~~ somewhat automatic given backward-compatible API + forward compatibility. - [x] Tools for joining & splitting Actions (#126937) `WEEK 3 Christoph` - [x] Join all Actions of the selected objects into the Action of the active Object. (#127414) - [x] Join action of object data (+ embedded IDs) into the Action of the active Object. - [x] Split `1` multi-slot Action → `N` single-slot Actions. - [x] In Action editor: right-click on slot → Move to New Action (#128171) - [x] Action menu in Action editor, to hold these operations. (#128171)`WEEK 3 Christoph` - [x] Library Override / non-editability of non-overridden linked data. Even when nothing should be overridable, there should be time to think about this and make clear decisions (+ document those). `WEEK 4 Sybren` ([#128708](https://projects.blender.org/blender/blender/pulls/128708), if there's more we can fix those when we find them) ## 9: ✅ ~~Proven Explanations & Documentation~~ - [x] We need to be able to explain multi-slot Actions. - [x] The explanation needs to be written down in the [technical documentation](https://developer.blender.org/docs/features/animation/animation_system/baklava/#phase-1-multi-data-block-animation). ## 10: ✅ ~~NLA and Pose Library support~~ - [x] Investigate what is necessary for NLA support of single-layer, multi-slot Actions. - [x] NLA support for single-layer Actions. `WEEK 2 Sybren` - [x] NLA Strips: add Slot selector - [x] Make animation evaluation work properly (without F-Curve/strip modifiers) - [x] Support Tweak Mode - [x] Support F-Curve/strip modifiers - [x] Pose Library should produce & work with multi-slot Actions. ([#128594](https://projects.blender.org/blender/blender/pulls/128594) and [#128686](https://projects.blender.org/blender/blender/pulls/128686)) `WEEK 5 Nathan` - [x] Push Down (`WEEK 5 Sybren`, [#128444](https://projects.blender.org/blender/blender/pulls/128444)) - [x] Stash ([#128696](https://projects.blender.org/blender/blender/pulls/128696)) - [x] Key insertion: allow in NLA tweak mode (`WEEK 5 Sybren`, [#128446](https://projects.blender.org/blender/blender/pulls/128446)) - [x] Key insertion: NLA time remapping (`WEEK 5 Sybren`, [#128700](https://projects.blender.org/blender/blender/pulls/128700)) - [x] Check other places where NLA time remapping is done (is fine, `BKE_nla_tweakedit_remap()` does not directly use the Action itself) - [x] (not NLA/Poselib, but also to do:) Test motion tracker. (is fine, doesn't create an Action itself, just inserts keys) ## 11: Going out of Experimental - [x] Versioning to convert legacy Actions to layered ones (behind experimental flag). (`WEEK 3 Christoph` [#127842](https://projects.blender.org/blender/blender/pulls/127842)) - [x] Make the Python API for legacy Actions work with single-slot, single-layer Actions as well. - [x] Forward compatibility: write F-Curves of the first slot, first strip, first layer as legacy F-Curves as well. - [x] Do not return `MutableSpan<>` any more (for slots/layers/etc.) but always use `Span<>`. `WEEK 5 Sybren` - [x] Add copying of tmpact slot and handle in `rna_AnimaData_override_apply` - [x] Remove the experimental flag - [x] Make PR `WEEK 6 Sybren` ([#128889](https://projects.blender.org/blender/blender/pulls/128889)) - [x] Land in `main` for Blender 4.4 (`WEEK 6+ Sybren`) - [ ] Updating the User Manual - [ ] Make PR `WEEK 5+ Nathan` - [ ] Land in `main` for Blender 4.4 (`WEEK 5+ Nathan`) ## 12: A Few Hours Lateur (well, weeks or months) - [ ] Remove code that deals with the legacy Action data `WEEK (NOW+2)+` This is mostly to remove then-dead code. It is deferred until we're confident that the new code is doing the right thing, and we don't need the old code as reference any more for regressions. ## Unplanned but related Other things, which **will likely have to wait** until later phases: - [ ] Per-FCurve-group modifiers. But maybe those become 'modifier strips', and scoping of those is done on a per-layer level. - [ ] Animation Filtering code replacement. Becomes a little more important when looking at FCurve groups. Those will likely be reimplemented from scratch to get rid of weird `ListBase` dependent stuff. - [ ] Fine-grained dependency graph nodes. Currently the Action can only be tagged for update as a whole, causing a full re-evaluation of all animated data-blocks. This should be more granular. - [ ] Enriching F-Curve grouping functionality: - [ ] Automatic creation of "manual" groups - [ ] Automatic (implicit) grouping of FCurves? - [ ] Automatic sorting of FCurves: - [ ] First location, then rotation, then scale, then the rest - [ ] Keeping array elements sequential & in array order - [ ] Manual reordering of Bindings within an Animation
Sybren A. Stüvel added the
Type
Design
label 2024-04-08 17:25:19 +02:00
Sybren A. Stüvel changed title from Animation: Project Baklava phase 1: multi-ID animation to Animation: Project Baklava phase 1: multi-data-block animation 2024-04-08 17:28:13 +02:00
Sybren A. Stüvel added the
Module
Animation & Rigging
label 2024-04-08 17:32:40 +02:00
Sybren A. Stüvel added this to the Animation & Rigging project 2024-07-18 18:15:30 +02:00
Sybren A. Stüvel changed title from Animation: Project Baklava phase 1: multi-data-block animation to Animation: Slotted Actions (multi-datablock animation) Planning 2024-07-26 11:23:15 +02:00
Sybren A. Stüvel added this to the 4.3 milestone 2024-08-29 15:38:08 +02:00
Sybren A. Stüvel modified the milestone from 4.3 to 4.4 2024-09-06 15:11:02 +02:00
Sign in to join this conversation.
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
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
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
Core
Module
Development Management
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
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 Assignees
1 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#120406
No description provided.