Page MenuHome

UI: Always Create Asset Previews
ClosedPublic

Authored by Harley Acheson (harley) on Sep 14 2021, 5:55 PM.

Details

Summary

This patch allows Asset Browser previews to be made regardless
of the setting of the (unrelated) "Preview Type" Preference.


Prior versions of Blender had a checkbox in Preferences / "Save & Load" for "Save Preview Images". This was only ever intended to allow turning off the rendering of blend file previews since these are recreated every time you save. Turning that off never disabled the creation of other previews and thumbnails. Using File Browser with that option off still created thumbnails for images, videos, etc. It was just an option to potentially save time when saving.

But with the addition of the Asset browser this option is now mistakenly used to turn off all the rendering of all blend contents. So turning that off turns off Asset Browser previews. With D10492 this one checkbox is now expanded into several options, but with the same intention of only altering blend file previews. But this also makes this more likely to be seen and for users to select "None" - and therefore breaking Asset Browser.

I can't think of any argument for allowing users to turn off Asset Browser previews.

Diff Detail

Repository
rB Blender

Event Timeline

Harley Acheson (harley) requested review of this revision.Sep 14 2021, 5:55 PM
Harley Acheson (harley) created this revision.
Julian Eisel (Severin) requested changes to this revision.Sep 16 2021, 3:36 PM

Doesn't this just make the None item have no effect?

This was only ever intended to allow turning off the rendering of blend file previews since these are recreated every time you save.

AFAIK the option was intended for both blend file previews and data-block previews. Think for the former speed was the reason (like you say) but for the latter it was about saving disk space when there are dozens or hundreds of previews to store.

But with the addition of the Asset browser this option is now mistakenly used to turn off all the rendering of all blend contents.

The rendering still happens, the preview is just not saved to files. And this was the case before the Asset Browser was introduced, which just uses (and extends) the preexisting data-block preview support.


I don't think memory is much of a concern for the previews anymore. And if so, there are better ways to save memory than to just entirely throw out asset/data-block previews. So I'd suggest always storing the asset previews for now, I don't mind much about the file preview.

This revision now requires changes to proceed.Sep 16 2021, 3:36 PM

@Julian Eisel (Severin) - Doesn't this just make the None item have no effect?

With this patch applied the None, and the other "File Preview Type" options continue to work fine for the creation of the preview used for the blend file itself. In wm_file_write the blend previews are only made if it is explicitly set to screenshot or camera and nothing is done if none.

This patch just makes Asset Browser thumbnails to be created regardless of that setting. Which I think is what we want? But I might just be confused, as usual.

With this patch applied the None, and the other "File Preview Type" options continue to work fine for the creation of the preview used for the blend file itself. In wm_file_write the blend previews are only made if it is explicitly set to screenshot or camera and nothing is done if none.

You're right there, so this is good to go.

This revision is now accepted and ready to land.Sep 17 2021, 4:25 PM
This revision was automatically updated to reflect the committed changes.