Blender Git Commit Log

Git Commits -> Revision caacb0f

July 30, 2021, 14:51 (GMT)
UI: UI list refactor & preparations for asset view template

This is more of a first-pass refactor for the UI list template. More
improvements could be done, but that's better done separately. Main
purpose of this is to make the UI list code more manageable and ready
for the asset view template.

No functional changes for users.

* Split the huge template function into more manageable functions, with
clear names and a few structs with high coherency.
* Move runtime data management to the template code, with a free
callback called from BKE. This is UI data and should be managed at
that level.
* Replace boolean arguments with bit-flags (easily extendable and more
readable from the caller).
* Allow passing custom-data to the UI list for callbacks to access.
* Make list grip button for resizing optional.
* Put logic for generating the internal UI list identifier (stored in
.blends) into function. This is a quite important bit and a later
commit adds a related function. Good to have a clear API for this.
* Improve naming, comments, etc.

As part of further cleanups I'd like to move this to an own file.

Commit Details:

Full Hash: caacb0f7bde53efa96f69f29b74e8b39c77893cd
Parent Commit: 135d1bd
Committed By: Fabian Schempp
Lines Changed: +649, -322

8 Modified Paths:

/source/blender/blenkernel/intern/screen.c (+3, -9) (Diff)
/source/blender/editors/include/UI_interface.h (+29, -2) (Diff)
/source/blender/editors/interface/interface_templates.c (+537, -306) (Diff)
/source/blender/editors/space_node/drawnode.cc (+2, -4) (Diff)
/source/blender/makesdna/DNA_screen_types.h (+12, -0) (Diff)
/source/blender/makesrna/intern/rna_ui_api.c (+41, -1) (Diff)
/source/blender/windowmanager/intern/wm_uilist_type.c (+21, -0) (Diff)
/source/blender/windowmanager/WM_api.h (+4, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021