diff options
author | Julian Eisel <julian@blender.org> | 2020-12-16 13:44:22 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-12-16 14:10:58 +0300 |
commit | 58d818f8bebf8c08b528d1637c93f15d2559cca1 (patch) | |
tree | 2b7f0b7ce67238620b1118562d0360feb20ef535 /release/scripts/startup/bl_ui | |
parent | c7a500e3a0fa0721eb1771a422b6b17255692843 (diff) |
Assets: Add operator & button to regenerate the automatic preview
This makes it possible to trigger a refresh of the data-block preview,
available next to the preview in the Asset Browser sidebar. The previews get
easily outdated and automatically refreshing it all the time is not an option
because it would be a consistently running, quite expensive process. So a
button to cause a refresh should be reasonable.
This button can also be used to switch back from a custom preview to a
generated one. Although that may not be clear, and we should probably think of
a way to explain that better.
Addresses T82719.
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_filebrowser.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 98368f304d9..58a4269ab96 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -609,6 +609,8 @@ class ASSETBROWSER_PT_metadata_preview(asset_utils.AssetMetaDataPanel, Panel): if bpy.ops.ed.lib_id_load_custom_preview.poll(): col = row.column(align=True) col.operator("ed.lib_id_load_custom_preview", icon='FILEBROWSER', text="") + col.separator() + col.operator("ed.lib_id_generate_preview", icon='FILE_REFRESH', text="") class ASSETBROWSER_PT_metadata_details(asset_utils.AssetMetaDataPanel, Panel): |