Asset Catalogs Undo: add Ctrl+Z and Ctrl+Shift+Z as hotkeys for undo/redo

Allow undo/redo of asset catalog edits with Ctrl+Z/Ctrl+Shift+Z. These
keys are registered in the 'screen' keymap, so that they can take
priority over the global undo/redo operators.

Updated both Blender Default and Industry Compatible keymaps.
This commit is contained in:
Sybren A. Stüvel 2021-10-12 15:12:48 +02:00
parent 7867feae56
commit b7b2103cf7
2 changed files with 6 additions and 0 deletions

View File

@ -627,6 +627,9 @@ def km_screen(params):
("file.execute", {"type": 'RET', "value": 'PRESS'}, None),
("file.execute", {"type": 'NUMPAD_ENTER', "value": 'PRESS'}, None),
("file.cancel", {"type": 'ESC', "value": 'PRESS'}, None),
# Asset Catalog undo is only available in the asset browser, and should take priority over `ed.undo`.
("asset.catalog_undo", {"type": 'Z', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
("asset.catalog_redo", {"type": 'Z', "value": 'PRESS', "ctrl": True, "shift": True, "repeat": True}, None),
# Undo
("ed.undo", {"type": 'Z', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
("ed.redo", {"type": 'Z', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True}, None),

View File

@ -255,6 +255,9 @@ def km_screen(params):
("file.execute", {"type": 'RET', "value": 'PRESS'}, None),
("file.execute", {"type": 'NUMPAD_ENTER', "value": 'PRESS'}, None),
("file.cancel", {"type": 'ESC', "value": 'PRESS'}, None),
# Asset Catalog undo is only available in the asset browser, and should take priority over `ed.undo`.
("asset.catalog_undo", {"type": 'Z', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
("asset.catalog_redo", {"type": 'Z', "value": 'PRESS', "ctrl": True, "shift": True, "repeat": True}, None),
# Undo
("ed.undo", {"type": 'Z', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
("ed.redo", {"type": 'Z', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True}, None),