[Bf-blender-cvs] [67933fbae85] asset-browser: Add sub-panel with buttons for asset author and description
Julian Eisel
noreply at git.blender.org
Fri Nov 20 14:05:04 CET 2020
Commit: 67933fbae85f5c644e2245201412f696f544fddf
Author: Julian Eisel
Date: Fri Nov 20 14:04:35 2020 +0100
Branches: asset-browser
https://developer.blender.org/rB67933fbae85f5c644e2245201412f696f544fddf
Add sub-panel with buttons for asset author and description
===================================================================
M release/scripts/addons
M release/scripts/startup/bl_ui/space_filebrowser.py
===================================================================
diff --git a/release/scripts/addons b/release/scripts/addons
index 35c23b4db49..1416eacdbea 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 35c23b4db494e58538a677c4fb0ec9ec1e8ffaa8
+Subproject commit 1416eacdbea17df75634fc972e75d0bb8dd195f9
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index 72d521dd853..2dfb3843c39 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -561,13 +561,32 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
def draw(self, context):
layout = self.layout
active_file = context.active_file
+ active_asset = asset_utils.SpaceAssetInfo.get_active_asset(context)
- if active_file:
- layout.label(text=active_file.name)
+ layout.use_property_split = True
+
+ if active_file and active_asset:
+ layout.prop(active_file, "name")
else:
layout.label(text="No asset selected.")
+class ASSETBROWSER_PT_metadata_details(asset_utils.AssetBrowserPanel, Panel):
+ bl_region_type = 'TOOL_PROPS'
+ bl_label = "Details"
+ bl_parent_id = "ASSETBROWSER_PT_metadata"
+
+ def draw(self, context):
+ layout = self.layout
+ active_asset = asset_utils.SpaceAssetInfo.get_active_asset(context)
+
+ layout.use_property_split = True
+
+ if active_asset:
+ layout.prop(active_asset, "author")
+ layout.prop(active_asset, "description")
+
+
class ASSETBROWSER_PT_metadata_tags(asset_utils.AssetMetaDataPanel, Panel):
bl_label = "Tags"
@@ -614,6 +633,7 @@ classes = (
FILEBROWSER_MT_context_menu,
ASSETBROWSER_PT_navigation_bar,
ASSETBROWSER_PT_metadata,
+ ASSETBROWSER_PT_metadata_details,
ASSETBROWSER_PT_metadata_tags,
ASSETBROWSER_UL_metadata_tags,
)
More information about the Bf-blender-cvs
mailing list