Blender Git Commit Log

Git Commits -> Revision 272e077

Revision 272e077 by Julian Eisel (asset-browser)
November 25, 2020, 15:58 (GMT)
Proper implementation of "Make Asset" for button context menus

Buttons or other UI elements can now set a "focused_id" context pointer. The
asset operators (and in future, general data-block operators) can use this
then. Further the UI code automatically sets it when a button represents a
data-block pointer. That way, data-block search menus or data-block selectors
also show "Make Asset" in the context menu.

This also works for material slots now, the material slot you right click will
properly set the "focused_id" context pointer, and "Make Asset" makes that
material an asset.

Had to add support for using custom context pointers to context menus and
UILists.

Addresses T82664.

Commit Details:

Full Hash: 272e0770a032805b5675dd317882fd7f81cd76e7
Parent Commit: 51efe80
Lines Changed: +95, -10

12 Modified Paths:

/release/scripts/startup/bl_ui/properties_material.py (+3, -0) (Diff)
/source/blender/blenkernel/BKE_context.h (+2, -1) (Diff)
/source/blender/blenkernel/intern/context.c (+6, -1) (Diff)
/source/blender/editors/asset/asset_edit.c (+8, -0) (Diff)
/source/blender/editors/asset/asset_ops.c (+35, -4) (Diff)
/source/blender/editors/asset/CMakeLists.txt (+1, -0) (Diff)
/source/blender/editors/include/ED_asset.h (+2, -0) (Diff)
/source/blender/editors/include/UI_interface.h (+1, -0) (Diff)
/source/blender/editors/interface/interface.c (+9, -0) (Diff)
/source/blender/editors/interface/interface_context_menu.c (+16, -4) (Diff)
/source/blender/editors/interface/interface_layout.c (+5, -0) (Diff)
/source/blender/editors/interface/interface_templates.c (+7, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021