Blender Git Loki

Git Commits -> Revision 83c53d1

April 1, 2021, 15:32 (GMT)
Support custom context menu entries for UI-lists, e.g. for pose assets

Makes it possible to add custom entries to the context menu of UI List items, by doing the following:
`bpy.types.UI_MT_list_item_context_menu.prepend(some_draw_function)`/`append(...)`.

The given draw function must check if the list is of the correct type. For that
to work I made it possible to get the hovered UI List using `context.ui_list`
and the list-ID via `ui_list.list_id`.

Commit Details:

Full Hash: 83c53d1bee2544f52d5b685d94fb89c73c476c19
Parent Commit: 19ac6a3
Lines Changed: +154, -23

13 Modified Paths:

/release/scripts/startup/bl_ui/__init__.py (+18, -0) (Diff)
/source/blender/editors/include/UI_interface.h (+2, -0) (Diff)
/source/blender/editors/interface/interface_context_menu.c (+16, -1) (Diff)
/source/blender/editors/interface/interface_handlers.c (+2, -8) (Diff)
/source/blender/editors/interface/interface_intern.h (+4, -1) (Diff)
/source/blender/editors/interface/interface_query.c (+22, -5) (Diff)
/source/blender/editors/interface/interface_templates.c (+5, -6) (Diff)
/source/blender/editors/interface/interface_template_asset_view.cc (+1, -0) (Diff)
/source/blender/editors/interface/interface_template_search_menu.c (+2, -2) (Diff)
/source/blender/editors/screen/screen_context.c (+11, -0) (Diff)
/source/blender/makesrna/intern/rna_ui.c (+31, -0) (Diff)
/source/blender/windowmanager/intern/wm_uilist_type.c (+35, -0) (Diff)
/source/blender/windowmanager/WM_api.h (+5, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021