[Bf-blender-cvs] [e555f976fc1] asset-browser: Minor UI tweaks

Julian Eisel noreply at git.blender.org
Tue Dec 1 19:23:04 CET 2020


Commit: e555f976fc12e82e5238a83796b92114898d6480
Author: Julian Eisel
Date:   Tue Dec 1 18:21:59 2020 +0100
Branches: asset-browser
https://developer.blender.org/rBe555f976fc12e82e5238a83796b92114898d6480

Minor UI tweaks

* Use "metadata" not "meta-data", just like elsewhere.
* Move asset repositories panel in the Preferences to the bottom, looks weird
  otherwise.
* Slightly improve layout of the panel, after review feedback.

===================================================================

M	release/scripts/startup/bl_ui/space_filebrowser.py
M	release/scripts/startup/bl_ui/space_userpref.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index ac05882896f..51ab2c512ad 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -565,7 +565,7 @@ class ASSETBROWSER_PT_navigation_bar(asset_utils.AssetBrowserPanel, Panel):
 
 class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
     bl_region_type = 'TOOL_PROPS'
-    bl_label = "Asset Meta-data"
+    bl_label = "Asset Metadata"
     bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 0ef308ebe32..868e485dde2 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1255,28 +1255,6 @@ class USERPREF_PT_file_paths_data(FilePathsPanel, Panel):
         col.prop(paths, "temporary_directory", text="Temporary Files")
 
 
-class USERPREF_PT_file_paths_asset_repositories(FilePathsPanel, Panel):
-    bl_label = "Asset Repositories"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.use_property_split = False
-        layout.use_property_decorate = False
-
-        paths = context.preferences.filepaths
-
-        box = layout.box()
-        for i, repository in enumerate(paths.asset_repositories):
-            row = box.row()
-            split = row.split(factor=0.65)
-            split.prop(repository, "path", text="")
-            split.prop(repository, "name")
-            row.operator("preferences.asset_repository_remove", text="", icon='X', emboss=False).index = i
-
-        row = box.row()
-        row.operator("preferences.asset_repository_add", text="", icon='ADD', emboss=False)
-
-
 class USERPREF_PT_file_paths_render(FilePathsPanel, Panel):
     bl_label = "Render"
 
@@ -1357,6 +1335,29 @@ class USERPREF_PT_saveload_autorun(FilePathsPanel, Panel):
             row.operator("preferences.autoexec_path_remove", text="", icon='X', emboss=False).index = i
 
 
+class USERPREF_PT_file_paths_asset_repositories(FilePathsPanel, Panel):
+    bl_label = "Asset Repositories"
+
+    def draw(self, context):
+        layout = self.layout
+        layout.use_property_split = False
+        layout.use_property_decorate = False
+
+        paths = context.preferences.filepaths
+
+        box = layout.box()
+        for i, repository in enumerate(paths.asset_repositories):
+            row = box.row()
+            split = row.split(factor=0.35)
+            split.prop(repository, "name")
+            split.prop(repository, "path", text="")
+            row.operator("preferences.asset_repository_remove", text="", icon='X', emboss=False).index = i
+
+        row = box.row()
+        row.alignment = 'RIGHT'
+        row.operator("preferences.asset_repository_add", text="", icon='ADD', emboss=False)
+
+
 # -----------------------------------------------------------------------------
 # Save/Load Panels
 
@@ -2306,10 +2307,10 @@ classes = (
     USERPREF_PT_theme_collection_colors,
 
     USERPREF_PT_file_paths_data,
-    USERPREF_PT_file_paths_asset_repositories,
     USERPREF_PT_file_paths_render,
     USERPREF_PT_file_paths_applications,
     USERPREF_PT_file_paths_development,
+    USERPREF_PT_file_paths_asset_repositories,
 
     USERPREF_PT_saveload_blend,
     USERPREF_PT_saveload_blend_autosave,



More information about the Bf-blender-cvs mailing list