diff options
author | Julian Eisel <julian@blender.org> | 2021-10-29 17:45:08 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-10-29 17:55:20 +0300 |
commit | dcdbaf89bd114aaf066cec57bb619b828c159719 (patch) | |
tree | 72b3fa63c96e34aee778057f47ee02317feb062f /release | |
parent | 0c3da7f37019df937aa70ec9f02f3c16a0b6f257 (diff) |
Asset Browser: Correct name & tooltip for asset list refresh operator
The name and tooltip were talking about file-lists, which exposes the
fact that the Asset Browser uses the File Browser code in the UI, which
we shouldn't do. This can confuse users.
Instead have a dedicated operator for the Asset Browser with a proper
name and tooltip.
Diffstat (limited to 'release')
3 files changed, 7 insertions, 1 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 2289e8200a6..9f921bd2b70 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -2140,7 +2140,9 @@ def km_file_browser(params): ("file.parent", {"type": 'UP_ARROW', "value": 'PRESS', "alt": True}, None), ("file.previous", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True}, None), ("file.next", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True}, None), + # The two refresh operators have polls excluding each other (so only one is available depending on context). ("file.refresh", {"type": 'R', "value": 'PRESS'}, None), + ("file.asset_library_refresh", {"type": 'R', "value": 'PRESS'}, None), ("file.parent", {"type": 'P', "value": 'PRESS'}, None), ("file.previous", {"type": 'BACK_SPACE', "value": 'PRESS'}, None), ("file.next", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True}, None), diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py index 8200aad1091..0ae64dbc62e 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -1227,7 +1227,9 @@ def km_file_browser(params): ("file.previous", {"type": 'LEFT_ARROW', "value": 'PRESS', "ctrl": True}, None), ("file.next", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True}, None), ("file.next", {"type": 'RIGHT_ARROW', "value": 'PRESS', "ctrl": True}, None), + # The two refresh operators have polls excluding each other (so only one is available depending on context). ("file.refresh", {"type": 'R', "value": 'PRESS', "ctrl": True}, None), + ("file.asset_library_refresh", {"type": 'R', "value": 'PRESS', "ctrl": True}, None), ("file.previous", {"type": 'BACK_SPACE', "value": 'PRESS'}, None), ("file.next", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True}, None), ("wm.context_toggle", {"type": 'H', "value": 'PRESS'}, @@ -1272,7 +1274,9 @@ def km_file_browser_main(params): items.extend([ ("file.mouse_execute", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, None), + # The two refresh operators have polls excluding each other (so only one is available depending on context). ("file.refresh", {"type": 'R', "value": 'PRESS', "ctrl": True}, None), + ("file.asset_library_refresh", {"type": 'R', "value": 'PRESS', "ctrl": True}, None), ("file.select", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, None), ("file.select", {"type": 'LEFTMOUSE', "value": 'CLICK'}, {"properties": [("open", False), ("deselect_all", True)]}), diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index a33e2665b58..05f505c518d 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -792,7 +792,7 @@ class ASSETBROWSER_MT_context_menu(AssetBrowserMenu, Menu): st = context.space_data params = st.params - layout.operator("file.refresh", text="Refresh") + layout.operator("file.asset_library_refresh") layout.separator() |