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:
authorSybren A. Stüvel <sybren@blender.org>2021-07-02 11:40:19 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-07-15 17:12:36 +0300
commitb40e05fcd134e5b9d5aac7ba9e5f45e4e9733607 (patch)
tree800b488d96fff7a0329768322a6adc0a9c7e466d /release/scripts/startup/bl_ui/space_filebrowser.py
parent637731dc610370782b1041ece4425bf3e6086ba0 (diff)
Assets: Open Blend File operator
Add operator 'Open Blend File' to the Asset Browser. This operator: - starts a new Blender process, - opens the blend file containing the asset, - monitors the new Blender process, and when it stops, - reloads the assets to show any changes made.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_filebrowser.py')
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index 96855cb4a07..8ca93d2406c 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -552,6 +552,10 @@ class FILEBROWSER_MT_context_menu(Menu):
sub.operator_context = 'EXEC_DEFAULT'
sub.operator("file.delete", text="Delete")
+ active_asset = asset_utils.SpaceAssetInfo.get_active_asset(context)
+ if active_asset:
+ layout.operator("asset.open_containing_blend_file")
+
layout.separator()
sub = layout.row()
@@ -613,6 +617,8 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
row = col.row()
row.label(text=asset_lib_path)
+ row.operator("asset.open_containing_blend_file", text="", icon='TOOL_SETTINGS')
+
class ASSETBROWSER_PT_metadata_preview(asset_utils.AssetMetaDataPanel, Panel):
bl_label = "Preview"