How to handle 'fake user' in linked data. #99262
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#99262
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?
Currently, linked data keep their 'fake user' flag as defined in the source library. This is not editable by the user.
The problem is that this creates linked data that are never automatically/manually purged once unused, user needs to manually delete those IDs.
There are several potential ways to address that issue:
1 Clear Fake User flag on linked data
2 Ignore fake user flag on linked data in purge-like operations
(actual purge operator and/or 'clear on file write' current behavior).
** One of the questions here is whether 'removal on file write' type of cleanup should also behave that way, or only the actual Purge operator.
3 Allow local definition/storage of 'fake user' flag for linked data
** Implies that indirectly linked IDs would become directly linked if user set a fake user for them (which makes sense anyway I believe).
** May raise unforeseen issues, and/or have unexpected consequences.
Original report:
Linking data from other blend files leaves the target file with link references which have to be removed manually
System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.59
Blender Version
Broken: version: 3.2.2, branch: SelectThrough, commit date: 2022-06-08 07:44, hash:
a9ace42a16
Worked: probably never
Short description of error
When linking objects or data from other .blend files, the target blend file is infected with references to the linked file, as well as any files the linked file was linking. These references remain in the target file even after all objects are removed an all the various clean up operators are ran. This is probably due to incorrect handling of linked data blocks if they are fake-usered.
2022-06-29 10-15-50.mp4
Exact steps for others to reproduce the error
Result: The references to the linked files are still present in the target blend file
Expected: The references to the linked files are gone if they are not used
Added subscriber: @Rawalanche
Added subscriber: @PratikPB2123
I'm seeing that data block is marked as fake user in
outliner->orphaned data
tab. That's why those cleanup operations are not removing unused data block.I think Bastien knows if this is working as expected or not
Added subscribers: @mont29, @mano-wii
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Okay, if I understand correctly, the problem is that if you link a data-block with fake-user, it will also have fake-user in the new scene and so it won't be removed in any recursive purge operation.
I'm not sure if this should be considered a bug.
Why does the data-block have a fake-user to begin with?
But I agree this behavior is a bit strange. Should the fake-user be removed/ignored in the link?
Needs Information from Developers... (@mont29?)
How is that a question? Because I don't want Blender to blatantly delete my data when working with the source file I linked. Isn't that obvious?
Or is your question specifically why does it have a fake user in the file it was linked to? In that case, the answer would be it's a bug. It does not make sense to consider fake user state of a linked datablock, because the target file can not affect/write to the linked file, and therefore delete that data somehow.
Added subscribers: @SimonThommes, @eyecandy, @dfelinto
Thanks for the report, however this is not a bug, in the sense that the code is working as intended.
This requires design first, since deciding which behavior would be the best option in that case is not trivial. Will edit the task as such.
Also, CC @dfelinto @eyecandy @SimonThommes
Linking data from other blend files leaves the target file with link references which have to be removed manuallyto How to handle 'fake user' in linked data.Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Solution 2. sounds the best. Solution 1 is also acceptable. Solution 3 sounds like a hell. There's already more than enough error prone data management wrangling Blender blatantly offloads onto user's mind. It would be really bad to add even more to it.
Forgot about that report... Solution 1 has been committed as
b3c7f3c8a9
andf052b18a65
a couple of weeks ago.