UI: Tree View: Operator to delete with X key
Tree view elements can be deleted by the remove operator located on the right side with `-` icon. But these operators are different for every type. Now introduced `UI_OT_view_item_delete`. With that it is possible to delete elements with X key when mouse is over tree view. In future maybe we could remove type specific operators (for example: `GREASE_PENCIL_OT_layer_remove`). See video in PR description Pull Request: https://projects.blender.org/blender/blender/pulls/144045
This commit is contained in:
@@ -1048,6 +1048,8 @@ def km_user_interface(_params):
|
||||
("ui.view_item_select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("range_select", True)]}),
|
||||
("ui.view_item_rename", {"type": 'F2', "value": 'PRESS'}, None),
|
||||
("ui.view_item_delete", {"type": 'X', "value": 'PRESS'}, None),
|
||||
("ui.view_item_delete", {"type": 'DEL', "value": 'PRESS'}, None),
|
||||
])
|
||||
|
||||
return keymap
|
||||
|
||||
Reference in New Issue
Block a user