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>2021-10-23 19:07:48 +0300
committerJulian Eisel <julian@blender.org>2021-10-23 19:07:48 +0300
commit9ad642c59ade21d8664ba968d317b062e9654c07 (patch)
tree6228d5fb6583f59275f1558e1d540e18148dc6ef /release/scripts/startup/bl_ui/space_userpref.py
parent50e7645211fb023280c6c55147fe15edcadddc17 (diff)
Assets/UI: Improve asset library Preferences UI
* Open File Browser when pressing "Add Asset Library". This just makes sense, since users have to select a directory for the asset library anyway. * Move '+' icon back to the right side of the box. Then it is right under the 'x' icons for each indivdual library, which seems like the more natural place. * Correct tooltip for the "Add Asset Library" operator. * Mark empty asset library name or paths field in red, to make clear that these need to be set.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index bb3b3fbc23b..abd235f1c44 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1410,12 +1410,18 @@ class USERPREF_PT_file_paths_asset_libraries(FilePathsPanel, Panel):
row.label(text="Path")
for i, library in enumerate(paths.asset_libraries):
- name_col.prop(library, "name", text="")
+ row = name_col.row()
+ row.alert = not library.name
+ row.prop(library, "name", text="")
+
row = path_col.row()
- row.prop(library, "path", text="")
+ subrow = row.row()
+ subrow.alert = not library.path
+ subrow.prop(library, "path", text="")
row.operator("preferences.asset_library_remove", text="", icon='X', emboss=False).index = i
+
row = box.row()
- row.alignment = 'LEFT'
+ row.alignment = 'RIGHT'
row.operator("preferences.asset_library_add", text="", icon='ADD', emboss=False)