Asset Browser doesnt refresh shading materials preview after change #90205

Closed
opened 2021-07-26 20:27:53 +02:00 by Mateusz · 27 comments

Description
In asset browser I created new asset material. Then I wanted to change it by right clicking on it and opening new blender instance. Changed the color, saved and quit, After updating the material, its thumbnail is not updated.

Thumbnail must be updated in Blender instance, that has .blend file with asset open, which doesn't happen automatically.

asset library problem.mp4

Steps to reproduce

  • Create asset from material
  • Add this asset to another blend file
  • Click the Open Blend File button
  • Change material color, save file and close Blender instance
    In parent Blender instance, asset has still original thumbnail, and refresh button doesn't help.
**Description** In asset browser I created new asset material. Then I wanted to change it by right clicking on it and opening new blender instance. Changed the color, saved and quit, After updating the material, its thumbnail is not updated. Thumbnail must be updated in Blender instance, that has .blend file with asset open, which doesn't happen automatically. [asset library problem.mp4](https://archive.blender.org/developer/F10264315/asset_library_problem.mp4) **Steps to reproduce** - Create asset from material - Add this asset to another blend file - Click the Open Blend File button - Change material color, save file and close Blender instance In parent Blender instance, asset has still original thumbnail, and refresh button doesn't help.
Author

Added subscriber: @MateuszWilinski

Added subscriber: @MateuszWilinski
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

It looks like that after 30 minutes of writing when I uploaded the image all the text was erased. So thank you but no reply ;(

I assume you mean there was an additional issue with the website here?
Sorry to hear that... especially since the issue about the Asset Browser sounds like an interesting/important issue in a actively developed area which would clearly benefit from reports like this!
But... not sure what you would expect us to do with a report like this? Now that all the info is missing? If the info cannot be provided, we'll have to close in a week...

> It looks like that after 30 minutes of writing when I uploaded the image all the text was erased. So thank you but no reply ;( I assume you mean there was an additional issue with the website here? Sorry to hear that... especially since the issue about the Asset Browser sounds like an interesting/important issue in a actively developed area which would clearly benefit from reports like this! **But**... not sure what you would expect us to do with a report like this? Now that all the info is missing? If the info cannot be provided, we'll have to close in a week...
Author

Hey :)
Let's get back to the point ;)
In asset browser I created new asset material. Then I wanted to change it by right clicking on it and opening new blender instance. Changed the color, saved and quit, blender was closed but the console tab as seen in the first post still is opened and cannot be closed. What is more, after updating the material, its preview is not updating. The material itself gets changed because when I try to apply it to some object on the scene it gets new, updated color but in the preview it stay as it was before. And thats it ;)

Hey :) Let's get back to the point ;) In asset browser I created new asset material. Then I wanted to change it by right clicking on it and opening new blender instance. Changed the color, saved and quit, blender was closed but the console tab as seen in the first post still is opened and cannot be closed. What is more, after updating the material, its preview is not updating. The material itself gets changed because when I try to apply it to some object on the scene it gets new, updated color but in the preview it stay as it was before. And thats it ;)
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

What is more, after updating the material, its preview is not updating. The material itself gets changed because when I try to apply it to some object on the scene it gets new, updated color but in the preview it stay as it was before.

Have you tried generating a new preview in the asset file?
image.png

Then I wanted to change it by right clicking on it and opening new blender instance. Changed the color, saved and quit, blender was closed but the console tab as seen in the first post still is opened and cannot be closed

Right clicking from where? The Windows file explorer?

> What is more, after updating the material, its preview is not updating. The material itself gets changed because when I try to apply it to some object on the scene it gets new, updated color but in the preview it stay as it was before. Have you tried generating a new preview in the asset file? ![image.png](https://archive.blender.org/developer/F10242858/image.png) > Then I wanted to change it by right clicking on it and opening new blender instance. Changed the color, saved and quit, blender was closed but the console tab as seen in the first post still is opened and cannot be closed Right clicking from where? The Windows file explorer?
Author

Hey, I made a video explaining this:
asset library problem.mp4

Hey, I made a video explaining this: [asset library problem.mp4](https://archive.blender.org/developer/F10264315/asset_library_problem.mp4)
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123

Added subscriber: @iss

Added subscriber: @iss

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

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

It seems that asset thumbnail must be updated in Blender instance, that has .blend file with asset open. I wasn't able to reproduce issue with console being kept open.

In any case, I think this is valid issue, so I will confirm.

It seems that asset thumbnail must be updated in Blender instance, that has .blend file with asset open. I wasn't able to reproduce issue with console being kept open. In any case, I think this is valid issue, so I will confirm.
Richard Antalik changed title from Asset Browser doesnt refresh shading materials preview after change and doesnt close the blend file to Asset Browser doesnt refresh shading materials preview after change 2021-08-06 04:52:21 +02:00
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Several issues mentioned here (in text or in the video):

    • muliple materials created when dragging in an asset (from a library file) multiple times
    • this is just regular appending (same thing happens when you append a material via File > Append multiple times)
    • if you change the Asset Browsers import type to Link, this of course does not happen
    • this is working as expected (unless the Asset Browser is supposed to do this differently from "regular" append/link -- which I dont think it is)
    • when using the Asset Broser with a library file, its purpose is bringing something into your file, in this situation I would not see the Asset Browser as a tool to do the material assignment at this stage
    • for material assignment, you can still use the Asset Browser, but you have to set the source the Current File instead (if you do this, you can drag and drop materials as often as you want without them being duplicated)
    • blue monkey is still blue
    • same reason, the Asset Browser is in append mode (instead of link)
    • if you append something, you loose the connection to the file you, please refer to append from https://docs.blender.org/manual/en/dev/files/linked_libraries/link_append.html
    • if you link and change the file you linked from, the changes will propagate
    • this is working as expected (unless the Asset Browser is supposed to do this differently from "regular" append/link -- which I dont think it is)
    • thumnail does not update
    • workflow here is:
    • open the library file (done correctly in the video)
    • change your asset/material (done correctly in the video)
    • generate a new preview for your asset/material (missing in the video)
      image.png
    • save
    • back in the main file, the thumbnail will be updated
    • so blender does not generate the thumbnails on the fly (this could take ages in complex projects), they are updated on demand and saved in the library file.
    • (what I do wonder though is why generating a thumbnail should not be possible from the main file? @JulianEisel - not a bug though)
    • in general, I do think this is working as expected (though thumbnail updating from the main file would be desirable)
Several issues mentioned here (in text or in the video): - - [x] muliple materials created when dragging in an asset (from a library file) multiple times - this is just regular appending (same thing happens when you append a material via File > Append multiple times) - if you change the Asset Browsers import type to Link, this of course does not happen - this is working as expected (unless the Asset Browser is supposed to do this differently from "regular" append/link -- which I dont think it is) - when using the Asset Broser with a library file, its purpose is bringing something **into** your file, in this situation I would not see the Asset Browser as a tool to do the material assignment at this stage - for material assignment, you can still use the Asset Browser, but you have to set the source the `Current File` instead (if you do this, you can drag and drop materials as often as you want without them being duplicated) - - [x] blue monkey is still blue - same reason, the Asset Browser is in append mode (instead of link) - if you append something, you loose the connection to the file you, please refer to append from https://docs.blender.org/manual/en/dev/files/linked_libraries/link_append.html - if you link and change the file you linked from, the changes will propagate - this is working as expected (unless the Asset Browser is supposed to do this differently from "regular" append/link -- which I dont think it is) - - [x] thumnail does not update - workflow here is: - open the library file (done correctly in the video) - change your asset/material (done correctly in the video) - generate a new preview for your asset/material (missing in the video) ![image.png](https://archive.blender.org/developer/F10242858/image.png) - save - back in the main file, the thumbnail will be updated - so blender does not generate the thumbnails on the fly (this could take ages in complex projects), they are updated on demand and saved in the library file. - (what I do wonder though is why generating a thumbnail should not be possible from the main file? @JulianEisel - not a bug though) - in general, I do think this is working as expected (though thumbnail updating **from the main file** would be desirable)
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Member

Blender currently doesn't update any asset preview automatically, this is intentional as this can be quite expensive to do. You have to manually refresh it in the Asset Browser Sidebar. We could try to automatically update the preview of the right-clicked asset when closing Blender after Open Blend File - but what if you changed other assets there as well? And this may still be expensive to do, requiring Blender to wait before closing.
@dr.sybren do you have an opionion here?

I don't know about the issue with the terminal window being open still. I assume this is Windows only and we have to do the same trickery there to hide the terminal in regular Blender instances. But I don't know why it doesn't work already. Please create a separate report on this.

Blender currently doesn't update any asset preview automatically, this is intentional as this can be quite expensive to do. You have to manually refresh it in the Asset Browser Sidebar. We *could* try to automatically update the preview of the right-clicked asset when closing Blender after *Open Blend File* - but what if you changed other assets there as well? And this may still be expensive to do, requiring Blender to wait before closing. @dr.sybren do you have an opionion here? I don't know about the issue with the terminal window being open still. I assume this is Windows only and we have to do the same trickery there to hide the terminal in regular Blender instances. But I don't know why it doesn't work already. Please create a separate report on this.
Member

Couldnt we have this available from any file (without having to open the lib file)? [Batch Generate Previews can generate previews in other files as well, no?]
image.png

This wouldnt be expensive (you are only doing it on a single asset)

Couldnt we have this available from **any** file (without having to open the lib file)? [`Batch Generate Previews` can generate previews in other files as well, no?] ![image.png](https://archive.blender.org/developer/F10242858/image.png) This wouldnt be expensive (you are only doing it on a single asset)
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

There are some issue with performance and shader graphs/libraries:

  • It will be expensive when using complex node setups in eevee. In this case the shader is compiled in the main thread and blocks any user activity.
  • The previews are saved in the library itself. In principle blender mustn't change anything in other blend files except the one opened.
  • When the library isn't opened it could select the incorrect render engine.
There are some issue with performance and shader graphs/libraries: * It will be expensive when using complex node setups in eevee. In this case the shader is compiled in the main thread and blocks any user activity. * The previews are saved in the library itself. In principle blender mustn't change anything in other blend files except the one opened. * When the library isn't opened it could select the incorrect render engine.
Member

In #90205#1217405, @Jeroen-Bakker wrote:

  • The previews are saved in the library itself. In principle blender mustn't change anything in other blend files except the one opened.

Batch Generate Previews does, no?

> In #90205#1217405, @Jeroen-Bakker wrote: > * The previews are saved in the library itself. In principle blender mustn't change anything in other blend files except the one opened. `Batch Generate Previews` does, no?
Member

Would think it tries, but only update the cached icon in the temp folders. But that should be checked as that could lead to invalid cache state.

Would think it tries, but only update the cached icon in the temp folders. But that should be checked as that could lead to invalid cache state.
Member

In #90205#1202778, @lichtwerk wrote:
Couldnt we have this available from any file (without having to open the lib file)? [Batch Generate Previews can generate previews in other files as well, no?]

It's not an issue technically. But we are basically not allowed to touch external .blend files. Ton is very opinionated on this as the acting product designer. It can lead to a number of nasty consequences.
If Batch Generate Previews does this, that probably was done without knowing about this design principle.

> In #90205#1202778, @lichtwerk wrote: > Couldnt we have this available from **any** file (without having to open the lib file)? [`Batch Generate Previews` can generate previews in other files as well, no?] It's not an issue technically. But we are basically not allowed to touch external .blend files. Ton is very opinionated on this as the acting product designer. It can lead to a number of nasty consequences. If *Batch Generate Previews* does this, that probably was done without knowing about this design principle.

In #90205#1202767, @JulianEisel wrote:
Blender currently doesn't update any asset preview automatically, this is intentional as this can be quite expensive to do. You have to manually refresh it in the Asset Browser Sidebar. We could try to automatically update the preview of the right-clicked asset when closing Blender after Open Blend File - but what if you changed other assets there as well? And this may still be expensive to do, requiring Blender to wait before closing.
@dr.sybren do you have an opionion here?

We could take the same approach here as in the material editor. After a change to an asset, wait for 2 seconds. If no further changes are made, start rendering the preview. This approach is far from water-tight though. To give an example of where it would not work: not all preview icons for the assets are actually showing the assets themselves. An Action that is marked as asset because it's a pose in the pose library doesn't show the Action itself, but it shows the posed character. Does this mean that any changes to the character mesh, or to any of its materials, should also trigger a re-render? What about when the lighting setup changes?

Furthermore, it might indeed cause either slowdowns in closing Blender, or aborted renders (and thus not re-rendered preview icons). I'm not completely against this, though -- there are plenty of applications that perform on-shutdown tasks, and having a little popup that says "Rendering 1 of 30 previews" would be ok for me (if it doesn't take too long, of course). However, the devil is in the details. Should saving the blend file also wait for these icons to be rendered? If not, how would you handle a file that was saved (so with old icons), and then Blender quits? Would it wait for the icons to be rendered, and then save the file again to be sure they're not lost? Blender saving a file by its own accord is also dangerous.

All in all I don't see this as a bug. It might be a nice design task at some point, but IMO it's not part of a minimal viable product.

> In #90205#1202767, @JulianEisel wrote: > Blender currently doesn't update any asset preview automatically, this is intentional as this can be quite expensive to do. You have to manually refresh it in the Asset Browser Sidebar. We *could* try to automatically update the preview of the right-clicked asset when closing Blender after *Open Blend File* - but what if you changed other assets there as well? And this may still be expensive to do, requiring Blender to wait before closing. > @dr.sybren do you have an opionion here? We *could* take the same approach here as in the material editor. After a change to an asset, wait for 2 seconds. If no further changes are made, start rendering the preview. This approach is far from water-tight though. To give an example of where it would not work: not all preview icons for the assets are actually showing the assets themselves. An Action that is marked as asset because it's a pose in the pose library doesn't show the Action itself, but it shows the posed character. Does this mean that any changes to the character mesh, or to any of its materials, should also trigger a re-render? What about when the lighting setup changes? Furthermore, it might indeed cause either slowdowns in closing Blender, or aborted renders (and thus not re-rendered preview icons). I'm not completely against this, though -- there are plenty of applications that perform on-shutdown tasks, and having a little popup that says "Rendering 1 of 30 previews" would be ok for me (if it doesn't take too long, of course). However, the devil is in the details. Should saving the blend file also wait for these icons to be rendered? If not, how would you handle a file that was saved (so with old icons), and then Blender quits? Would it wait for the icons to be rendered, and then save the file again to be sure they're not lost? Blender saving a file by its own accord is also dangerous. All in all I don't see this as a bug. It might be a nice design task at some point, but IMO it's not part of a minimal viable product.
Member

Changed status from 'Confirmed' to: 'Archived'

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

Right I agree. I'd say asset previews just always have to be manually updated. If Blender tries to be smart here, it would turn out more annoying than anything.
At least for the start we'll have to live with this I think.

Right I agree. I'd say asset previews just always have to be manually updated. If Blender tries to be smart here, it would turn out more annoying than anything. At least for the start we'll have to live with this I think.
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
7 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#90205
No description provided.