Asset Browser - Material is not applied if it is appended and then linked #95706

Closed
opened 2022-02-11 16:40:58 +01:00 by Johannes Kollmer · 18 comments

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 497.29

Blender Version
Broken: version: 3.0.1, branch: master, commit date: 2022-01-25 17:19, hash: dc2d180181

Short description of error

If you set the asset browser to "Append (Reuse Data)" and drag a material on to an object and then set the asset browser to "link" and drag it onto the object again the linked material is not used. Instead the appended Material is still used.

Exact steps for others to reproduce the error

  1. Set Asset Browser to "Append (Reuse Data)"
  2. Drag a material on to an object
  3. Set Asset Browser to "link"
  4. Drag the same material on to the object
  5. The material on the object is now still the appended material while it should be the linked material.
**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 497.29 **Blender Version** Broken: version: 3.0.1, branch: master, commit date: 2022-01-25 17:19, hash: `dc2d180181` **Short description of error** If you set the asset browser to "Append (Reuse Data)" and drag a material on to an object and then set the asset browser to "link" and drag it onto the object again the linked material is not used. Instead the appended Material is still used. **Exact steps for others to reproduce the error** 1. Set Asset Browser to "Append (Reuse Data)" 2. Drag a material on to an object 3. Set Asset Browser to "link" 4. Drag the same material on to the object 5. The material on the object is now still the appended material while it should be the linked material.

Added subscriber: @Lumpengnom-3

Added subscriber: @Lumpengnom-3

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

I can confirm.
The material is linked, just not applied to the object.

I can confirm. The material is linked, just not applied to the object.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Bug in recent feature --> High prio.
Feel free to lower again if this feels unappropriate...

Bug in recent feature --> High prio. Feel free to lower again if this feels unappropriate...
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Not really a UI thing, so removing it from there.

Not really a UI thing, so removing it from there.

Added subscriber: @mont29

Added subscriber: @mont29
Julian Eisel was assigned by Bastien Montagne 2022-05-23 14:50:36 +02:00

This is a problem in drag'n'drop code, where only the ID name is used as reference (since after append there is a local ID with exact same name, this one is then 'found' first, instead of expected linked data).

Note that this would fail in many other similar cases (IDs from different libraries with exact same name e.g.).

@JulianEisel view3d_id_drop_copy & co. need to be updated to use 'UUID' of IDs I guess?

This is a problem in drag'n'drop code, where only the ID name is used as reference (since after append there is a local ID with exact same name, this one is then 'found' first, instead of expected linked data). Note that this would fail in many other similar cases (IDs from different libraries with exact same name e.g.). @JulianEisel `view3d_id_drop_copy` & co. need to be updated to use 'UUID' of IDs I guess?

This issue was referenced by 8f79fa9c67

This issue was referenced by 8f79fa9c6780dd5526dccce039c49bc7f69f47df
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member

Changed status from 'Resolved' to: 'Confirmed'

Changed status from 'Resolved' to: 'Confirmed'
Member

This is only partially fixed. Reopening.

This issue is quite similar to #97320 and basically the same as what I've noted in my last comment applies here as well.

8f79fa9c67 applied the session UUID fix for materials, but it seems this wasn't enough. I can still recreate the issue here. The ID provided for the operation is not linked, so I think just like for #97320, WM_drag_get_local_ID_or_import_from_asset() returns the wrong ID (in #97320 it's the linked instance even though the non-linked one is expected, here it's the non-linked instance even though a linked one is expected).

This is only partially fixed. Reopening. This issue is quite similar to #97320 and basically the same as what I've noted in my [last comment ](https://developer.blender.org/T97320#1363150) applies here as well. 8f79fa9c67 applied the session UUID fix for materials, but it seems this wasn't enough. I can still recreate the issue here. The ID provided for the operation is not linked, so I think just like for #97320, `WM_drag_get_local_ID_or_import_from_asset()` returns the wrong ID (in #97320 it's the linked instance even though the non-linked one is expected, here it's the non-linked instance even though a linked one is expected).

This issue was referenced by bc3dbf109c

This issue was referenced by bc3dbf109c67fe2bced477774abdef7a53d66081
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member

Note: Appending followed by link is working now, linking followed by append isn't. However that's the same issue as #97320. We basically get the wrong ID from the appending code (the linked one instead of a new, appended instance).

Note: Appending followed by link is working now, linking followed by append isn't. However that's the same issue as #97320. We basically get the wrong ID from the appending code (the linked one instead of a new, appended instance).
Member

Now with a4e7a5aa4f, it works properly both ways: Appending followed by linking (material gets replaced by linked instance) and linking followed by append (linked instance gets replaced by a new appended instance).

There were quite a few issues to resolve, but should be all good now :)

Now with a4e7a5aa4f, it works properly both ways: Appending followed by linking (material gets replaced by linked instance) and linking followed by append (linked instance gets replaced by a new appended instance). There were quite a few issues to resolve, but should be all good now :)
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
6 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#95706
No description provided.