Solving the 'missing libraries' issue #45351
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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 project
No Assignees
12 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#45351
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
This task aims at solving the issue caused by 'missing libraries'.
Note: This is a sub-task of #46049.
Currently, when a library file is missing for some reason (removed, rename, network filesystem outline, etc.), when you open a .blend file using some of its data, you get a warning about missing data and… must absolutely not save your .blend, otherwise you'll definitively lose track of those missing datablocks.
In relation with asset project, I’ve been working on this issue, and came with this proposal, with two main steps:
I. Do not lose track of missing IDs
Now in Master
The idea here is to add a “place holder” ID when we cannot load a real one from a library. That place holder has the same type as missing one, and is a 'lib' ID, but contains no data.
Thus, you can use it as a regular library datablock in Blender - will just contain default data (no geometry, 'Empty' type for objects, default settings, etc. etc.).
And you can save and reload your file as you want - once library becomes available again, its data will be read at load time again.
D1394 implements that (only partially, as a proof of concept), it seems to work pretty well, but would need agreement this direction is valid before going further.
II. Reload the missing datablocks
First experimental builds available, see this post
Main part here is to be able to replace some ID by another without having to save/reload… WIP code is in id-remap branch.
Changed status to: 'Open'
Added subscribers: @mont29, @ideasman42, @Sergey, @fsiddi
This can of course be really useful and its great you work on this.
Note that I think reloading missing datablocks (even on a very basic level - though Python API for example),
is important to have working - in order that this feature be very useful.
Said different - if the feature is added and reload ends up being an unsolvable can of worms, Then probably its better to rethink entire patch.
Some notes...
A detail from reading the patch... you split init from add, that makes sense, but introduce possible problems where existing data-block has all sorts of data (brush mtex... scene keying sets... all sorts of inter-linking pointers).
Suggest to be strict here and add an assert if any data is non-zero after the
ID
struct. Otherwise we could end up in quite crappy situations with initialize data overwriting.100% agree. Just wanted first advice on the idea of placeholder IDs. ;)
Missing data survives multiple .blend save & load. Further more, if:
Think this is a bit an orthogonal topic (as in, could be useful even outside the 'missing lib' case), but definitively worth it, yes.
Sure, that would be part of Outliner's handling of those imho.
Good point, will do. :)
Thanks for starting to work on this. This will be a major improvement and time saver when dealing with file shuffling and refactoring.
Do you plan to introduce a "Replace/Relocate" functionality to point an existing (and currently linked) library to a different endpoint? It would be extremely useful for live changes while the blendfile is open and also for a programmatic approach, where we remap some paths on startup or via a script. I guess given your design proposal this will be possible, but I just wanted to mention this.
Again, thanks for looking into this area, it will have great impact.
Yes, that kind of feature is definitively part of step II. :)
Just a note that work is now in a public branch, missing-libs.
Added subscriber: @DuarteRamos
Added subscriber: @Harvester
Added subscriber: @hewi
Ok, so pushed publicly another branch, tackling the other main part of this project - being able to replace ID datablocks by another 'on the fly'.
id-remap branch contains code allowing to replace all usages of a given ID by another ID (of same type of course).
Only contains quite rough, unfinished and most likely broken code, but it does survive some very very basic tests.
Together with ID placeholder, this should give us solid foundations for a much more powerful and flexible datablocks (and libraries) handling.
Added subscriber: @Blendify
Added subscriber: @sdilmob-3
Added subscriber: @CharlesWardlaw
Added subscriber: @gandalf3
Added subscriber: @Lapineige
Added subscriber: @forestkatsch
First experimental builds available, see this post
Changed status from 'Open' to: 'Resolved'
Recent commits (
897e97f078
and7547c6a250
) merged last part of this work into master, time to close this task. :)