Asset preview lost after edit & reload #92477

Closed
opened 2021-10-25 15:00:47 +02:00 by Sybren A. Stüvel · 7 comments

Broken version: master branch @ cdcca917cf

Short Description:

Editing an asset's metadata and then reloading the asset browser can loose the asset's preview icon.

Steps to reproduce:

worlds.blend

  1. Open the attached file.
  2. Select the Mreznica world asset.
  3. Type a name in the Author field and press Enter to assign it.
  4. Press {key R} to reload the asset browser.
  5. See that the preview icon changes from the rendered preview to a "missing preview" icon.

Before:
image.png

After:
image.png

Broken version: master branch @ cdcca917cf **Short Description:** Editing an asset's metadata and then reloading the asset browser can loose the asset's preview icon. **Steps to reproduce:** [worlds.blend](https://archive.blender.org/developer/F11491100/worlds.blend) 1. Open the attached file. 2. Select the Mreznica world asset. 3. Type a name in the Author field and press Enter to assign it. 4. Press {key R} to reload the asset browser. 5. See that the preview icon changes from the rendered preview to a "missing preview" icon. Before: ![image.png](https://archive.blender.org/developer/F11491087/image.png) After: ![image.png](https://archive.blender.org/developer/F11491092/image.png)
Author
Member

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

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

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Sybren A. Stüvel self-assigned this 2021-11-01 12:25:37 +01:00
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Tested and this is fixed by D9974: UI: Sanitize threaded preview creation with undo. From a quick look, the issue seems to be this code: https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/icons.cc;9de4f64197b8$664-674. Apparently the world was changed since the preview was generated, so the preview gets tagged with PRV_CHANGED. When reading the file, we tag the preview as unfinished because of that (which from this perspective, is wrong of course, but solved other issues: 7dc8db7cd1). The file browser doesn't display unfinished previews anymore.

D9974: UI: Sanitize threaded preview creation with undo reworks the preview flagging/tagging a bit, so things are less error prone.

Tested and this is fixed by [D9974: UI: Sanitize threaded preview creation with undo](https://archive.blender.org/developer/D9974). From a quick look, the issue seems to be this code: https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/icons.cc;9de4f64197b8$664-674. Apparently the world was changed since the preview was generated, so the preview gets tagged with `PRV_CHANGED`. When reading the file, we tag the preview as unfinished because of that (which from this perspective, is wrong of course, but solved other issues: 7dc8db7cd1). The file browser doesn't display unfinished previews anymore. [D9974: UI: Sanitize threaded preview creation with undo](https://archive.blender.org/developer/D9974) reworks the preview flagging/tagging a bit, so things are less error prone.
Author
Member

I can confirm D9974 fixes this issue.

I can confirm [D9974](https://archive.blender.org/developer/D9974) fixes this issue.
Author
Member

Changed status from 'Confirmed' to: 'Resolved'

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

Resolved in cd818fd081

Resolved in cd818fd081
Thomas Dinges added this to the 3.0 milestone 2023-02-08 15:58:49 +01: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#92477
No description provided.