Fix/Refactor NLA Track library override #105272
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#105272
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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 refactoring the NLA create track methods, some questions came up about library overrides.
Mainly:
Currently, every newly created NLA track has the NLATRACK_OVERRIDELIBRARY_LOCAL flag set by default. It's not super clear why this flag is set, or how it indicates a library override.
The second open question, is how a library override impacts the NLA tracks. This comment suggests that the library override tracks need to be grouped together at the front of the list, and anything local should be after that. The codes doesn't seem to enforce this however, as tracks can be inserted before/after each other, regardless of library override status.
Next step
@dr.sybren and I decided that we should open this discussion to the larger community for feedback. We'll be discussing this issue in one of the upcoming Animation & Rigging module meetings.
Maybe #105260 could be tackled at the same time, under the umbrella of "properly working with linked data".
For context, systematically setting
NLATRACK_OVERRIDELIBRARY_LOCAL
is done to avoid as much Editor code as possible to need to be aware that it's working on liboverride data. The idea is that:That way, in liboverrides (which are local data), tracks that come from (are copied from) the linked ID do not have that flag, and tracks that have been added in the override have it.
This behavior is shared between all collections of items that support liboverride insertions (constraints, the various modifiers, and so on).
While it may look confusing, it has the key advantages of being both simple, and extremely robust (in the sense that it is almost impossible for a track to be wrongly tagged as linked or local, while only requiring a very few functions to have control over the flag). I would be most happy if a better system could be worked on though, but that would be a liboverride design topic covering all use-cases, not only NLA tracks.
(Added some precisions about this in the liboverride code doc).
Regarding ordering, all 'liboverride-insertable' collections share the same limitation, which is that linked data is not re-orderable. Local data however should be, so you can e.g. move a local-inserted modifier in-between two 'linked' modifiers, but you cannot change the order of these linked modifiers.
NLA tracks have additional limitations due to the fact that their names are not unique currently, which means that override diffing and applying code cannot use these names as reference. Since using indices for that purpose is extremely unreliable (
insert local track 2 after track 5
, good luck keeping this doing what it is supposed to do if anything changes in the linked data's NLA tracks).To work around that, the additional limitation is that all linked tracks come first, and local-inserted ones are always kept after all linked ones.
Thanks for the clarification @mont29.
This was discussed in last week's module meeting, and decided to be put on hold until it blocks other development.