Blender Git Commit Log
Git Commits -> Revision 17c928e
Revision 17c928e by Julian Eisel (master) October 8, 2021, 18:08 (GMT) |
UI: Add context menu support for tree-view items Tree-view items can now easily define their own context menu. This works by overriding the `ui::AbstractTreeViewItem::build_context_menu()` function. See the documentation: https://wiki.blender.org/wiki/Source/Interface/Views#Context_Menus Consistently with the Outliner and File Browser, the right-clicked item also gets activated. This makes sure the correct context is set for the operators and makes it clear to the user which item is operated on. An operator to rename the active item is also added, which is something you'd typically want to put in the context menu as well. |
Commit Details:
Full Hash: 17c928e9752372b698a1ed27e243181873aa411e
Parent Commit: 7bd0de9
Lines Changed: +109, -0
9 Modified Paths:
/source/blender/editors/include/UI_interface.h (+5, -0) (Diff)
/source/blender/editors/include/UI_tree_view.hh (+1, -0) (Diff)
/source/blender/editors/interface/interface_context_menu.c (+12, -0) (Diff)
/source/blender/editors/interface/interface_handlers.c (+8, -0) (Diff)
/source/blender/editors/interface/interface_intern.h (+1, -0) (Diff)
/source/blender/editors/interface/interface_ops.c (+44, -0) (Diff)
/source/blender/editors/interface/interface_query.c (+15, -0) (Diff)
/source/blender/editors/interface/interface_view.cc (+10, -0) (Diff)
/source/blender/editors/interface/tree_view.cc (+13, -0) (Diff)
/source/blender/editors/include/UI_tree_view.hh (+1, -0) (Diff)
/source/blender/editors/interface/interface_context_menu.c (+12, -0) (Diff)
/source/blender/editors/interface/interface_handlers.c (+8, -0) (Diff)
/source/blender/editors/interface/interface_intern.h (+1, -0) (Diff)
/source/blender/editors/interface/interface_ops.c (+44, -0) (Diff)
/source/blender/editors/interface/interface_query.c (+15, -0) (Diff)
/source/blender/editors/interface/interface_view.cc (+10, -0) (Diff)
/source/blender/editors/interface/tree_view.cc (+13, -0) (Diff)