Asset Browser fails to reuse data from the datablock of identical name #120137

Open
opened 2024-04-01 11:31:16 +02:00 by Ludvik Koutny · 3 comments
Contributor

System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.76

Blender Version
Broken: version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash: 40a5e739e270
Worked: (newest version of Blender that worked as expected)

Short description of error

Asset Browser fails to reuse data from the datablock of identical name. When adding GN node group from search, selecting the one from Group category will reuse existing but selecting the one from Asset Library name category will create duplicate, despite the Import Method being set to Append (Reuse Data). The datablock has identical name yet is not reused.

When adding new node groups through click-dragging a node link from an empty socket, user has no choice between the one from Group Category or Asset Library, and it always uses the one from Asset Library, endlessly duplicating the datablocks.

Exact steps for others to reproduce the error
I have no clue how to reproduce it because it is completely opaque to me when the relationship between Asset Browser datablock ID and scene datablock ID breaks. It just happens randomly, sometimes after reopening the file again, sometimes after making changes to library file. It almost always breaks eventually, but I have no idea how to make it break.

**System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.76 **Blender Version** Broken: version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash: `40a5e739e270` Worked: (newest version of Blender that worked as expected) **Short description of error** <video src="/attachments/461687ba-0448-4b0d-b606-18820f0f0000" title="2024-04-01_11-25-35.mp4" controls></video> Asset Browser fails to reuse data from the datablock of identical name. When adding GN node group from search, selecting the one from Group category will reuse existing but selecting the one from Asset Library name category will create duplicate, **despite** the Import Method being set to Append (Reuse Data). The datablock has identical name yet is not reused. When adding new node groups through click-dragging a node link from an empty socket, user has no choice between the one from Group Category or Asset Library, and it always uses the one from Asset Library, endlessly duplicating the datablocks. **Exact steps for others to reproduce the error** I have no clue how to reproduce it because it is completely opaque to me when the relationship between Asset Browser datablock ID and scene datablock ID breaks. It just happens randomly, sometimes after reopening the file again, sometimes after making changes to library file. It almost always breaks eventually, but I have no idea how to make it break.
Ludvik Koutny added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-04-01 11:31:16 +02:00

I've seen a similar issue before.
What happens is that assets have a reference to a directory (id->library_weak_reference->library_filepath), which can be absolute (such as from 'C:') or relative (based on the .blend file directory). This allows reusing the same data on future append, even across editing sessions.

What occurred in the reported incident that I recall is that it changed the assets directory, causing the weak reference to the original assets to be lost, and as a result, they no longer corresponded to those previously imported.

Is this what is happening in your case?
If so, unfortunately this is currently a known issue.

I've seen a similar issue before. What happens is that assets have a reference to a directory (`id->library_weak_reference->library_filepath`), which can be absolute (such as from 'C:') or relative (based on the .blend file directory). This allows reusing the same data on future append, even across editing sessions. What occurred in the reported incident that I recall is that it changed the assets directory, causing the weak reference to the original assets to be lost, and as a result, they no longer corresponded to those previously imported. Is this what is happening in your case? If so, unfortunately this is currently a known issue.
Germano Cavalcante added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-04-02 20:20:08 +02:00
Author
Contributor

I've seen a similar issue before.
What happens is that assets have a reference to a directory (id->library_weak_reference->library_filepath), which can be absolute (such as from 'C:') or relative (based on the .blend file directory). This allows reusing the same data on future append, even across editing sessions.

What occurred in the reported incident that I recall is that it changed the assets directory, causing the weak reference to the original assets to be lost, and as a result, they no longer corresponded to those previously imported.

Is this what is happening in your case?
If so, unfortunately this is currently a known issue.

Not at all. I haven not added any new library, moved library files around or renamed library files.

I use just one Asset Library, my own, in a single blend file, in a same path that hasn't changed since Asset Browser was introduced.

I honestly don't believe Asset Browser can ever work reliably if anything other than plain, user-visible datablock name is used for finding the datablock to reuse.

> I've seen a similar issue before. > What happens is that assets have a reference to a directory (`id->library_weak_reference->library_filepath`), which can be absolute (such as from 'C:') or relative (based on the .blend file directory). This allows reusing the same data on future append, even across editing sessions. > > What occurred in the reported incident that I recall is that it changed the assets directory, causing the weak reference to the original assets to be lost, and as a result, they no longer corresponded to those previously imported. > > Is this what is happening in your case? > If so, unfortunately this is currently a known issue. Not at all. I haven not added any new library, moved library files around or renamed library files. I use just one Asset Library, my own, in a single blend file, in a same path that hasn't changed since Asset Browser was introduced. I honestly don't believe Asset Browser can ever work reliably if anything other than plain, user-visible datablock name is used for finding the datablock to reuse.
Author
Contributor

Ok, I think the part of the problem is editing the datablock in the library file. Sometimes, when I update some of my GN group assets, I have to delete the datablock in the target library and append the new one into it.

When I make new version, it would make absolutely 0 sense to redo all those changes in the library file which I've already done outside of it, when working on the asset update, as it would waste a lot of time and introduce huge room for error. It's much easier and safer to just delete the existing datablock and append the new one under the exact same name.

But if Asset Browser fails to use names for reuse matching then this is indeed a disaster as this can't ever possibly work.

And I think #120134 is the issue with the same source of the problem, just different manifestation. Basically:
A. When I need Asset Browser to reuse existing datablock, it fails to do so.
B. When I need Asset Browser to not reuse existing datablock, it still does so, even if I try to prevent it by changing the datablock name.

Both are most likely caused by the fact some obscure library weak reference, which user can not alter, is being used for data reuse matching. It's just impossible to imagine system like this can ever work in production without eventually destroying someone's work.

The datablock name is what should always be used for matching, with maybe! a one time pop up warning that the datablock name matches but internal tracked ID doesn't.

Ok, I think the part of the problem is editing the datablock in the library file. Sometimes, when I update some of my GN group assets, I have to delete the datablock in the target library and append the new one into it. When I make new version, it would make absolutely 0 sense to redo all those changes in the library file which I've already done outside of it, when working on the asset update, as it would waste a lot of time and introduce huge room for error. It's much easier and safer to just delete the existing datablock and append the new one under the exact same name. But if Asset Browser fails to use names for reuse matching then this is indeed a disaster as this can't ever possibly work. And I think https://projects.blender.org/blender/blender/issues/120134 is the issue with the same source of the problem, just different manifestation. Basically: A. When I need Asset Browser to reuse existing datablock, it fails to do so. B. When I need Asset Browser to not reuse existing datablock, it still does so, even if I try to prevent it by changing the datablock name. Both are most likely caused by the fact some obscure library weak reference, which user can not alter, is being used for data reuse matching. It's just impossible to imagine system like this can ever work in production without eventually destroying someone's work. The datablock name is what should always be used for matching, with **maybe!** a one time pop up warning that the datablock name matches but internal tracked ID doesn't.
Iliya Katushenock added the
Interest
Asset Browser
label 2024-04-06 12:15:41 +02:00
Sign in to join this conversation.
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
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#120137
No description provided.