Outliner: Add shortcut to Add Object and Duplicate

Add shortcuts to the Outliner for consistency and convenience:
* Add Object (Shift+A)
* Duplicate (Shift+D)
* Duplicate Linked (Alt+D)

More info and images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/117922
This commit is contained in:
Pablo Vazquez
2024-02-07 12:00:09 +01:00
committed by Pablo Vazquez
parent 45a73827b0
commit 537d175289
3 changed files with 8 additions and 1 deletions

View File

@@ -1299,7 +1299,6 @@ def km_outliner(params):
("outliner.show_one_level", {"type": 'NUMPAD_MINUS', "value": 'PRESS'},
{"properties": [("open", False)]}),
*_template_items_select_actions(params, "outliner.select_all"),
("outliner.expanded_toggle", {"type": 'A', "value": 'PRESS', "shift": True}, None),
("outliner.keyingset_add_selected", {"type": 'K', "value": 'PRESS'}, None),
("outliner.keyingset_remove_selected", {"type": 'K', "value": 'PRESS', "alt": True}, None),
("anim.keyframe_insert", {"type": 'I', "value": 'PRESS'}, None),
@@ -1318,6 +1317,11 @@ def km_outliner(params):
# Copy/paste.
("outliner.id_copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
("outliner.id_paste", {"type": 'V', "value": 'PRESS', "ctrl": True}, None),
op_menu("VIEW3D_MT_add", {"type": 'A', "value": 'PRESS', "shift": True}),
("object.duplicate", {"type": 'D', "value": 'PRESS', "shift": True}, None),
("object.duplicate", {"type": 'D', "value": 'PRESS', "alt": True},
{"properties": [("linked", True)]}),
])
return keymap

View File

@@ -557,6 +557,8 @@ def km_outliner(params):
# Copy/paste.
("outliner.id_copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
("outliner.id_paste", {"type": 'V', "value": 'PRESS', "ctrl": True}, None),
("object.duplicate", {"type": 'D', "value": 'PRESS', "ctrl": True}, None),
])
return keymap

View File

@@ -155,6 +155,7 @@ class OUTLINER_MT_view_pie(Menu):
pie = layout.menu_pie()
pie.operator("outliner.show_hierarchy")
pie.operator("outliner.show_active", icon='ZOOM_SELECTED')
pie.operator("outliner.expanded_toggle")
class OUTLINER_MT_edit_datablocks(Menu):