Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-12-16 13:44:22 +0300
committerJulian Eisel <julian@blender.org>2020-12-16 14:10:58 +0300
commit58d818f8bebf8c08b528d1637c93f15d2559cca1 (patch)
tree2b7f0b7ce67238620b1118562d0360feb20ef535 /release/scripts/startup/bl_ui/space_filebrowser.py
parentc7a500e3a0fa0721eb1771a422b6b17255692843 (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/space_filebrowser.py')
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py2
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):