Blender Git Commit Log
Git Commits -> Revision b4f92bf
Revision b4f92bf by Julian Eisel (temp-ui-button-type-refactor) May 3, 2020, 20:59 (GMT) |
UI Code Quality: Use derived structs for search buttons and decorators The current on-size-fits-all `uiBut` creates quite a mess, where it's hard to reason about which members are free for use, under which conditions they are used and how. This tries to untangle that mess. A draw-back is that many casts have to be done although this seems reasonable. (I don't expect an in-depth review, but would like to have the general design change reviewed first.) A complication was that we sometimes change the button type after it's created. So I had to add logic to reallocate the button for use with the new, possibly derived struct. Ideally that wouldn't be needed, but for now that's what we have. This is also something I'd like to have reviewed. Differential Revision: https://developer.blender.org/D7610 |
Commit Details:
Full Hash: b4f92bf7bc59aaacb0baefc8c0ad5c6914c23dad
Parent Commit: dc9df65
Lines Changed: +84, -62
8 Modified Paths:
/source/blender/editors/include/UI_interface.h (+2, -1) (Diff)
/source/blender/editors/interface/interface.c (+8, -2) (Diff)
/source/blender/editors/interface/interface_anim.c (+23, -17) (Diff)
/source/blender/editors/interface/interface_handlers.c (+3, -1) (Diff)
/source/blender/editors/interface/interface_intern.h (+10, -4) (Diff)
/source/blender/editors/interface/interface_layout.c (+35, -35) (Diff)
/source/blender/editors/interface/interface_query.c (+1, -1) (Diff)
/source/blender/editors/interface/interface_widgets.c (+2, -1) (Diff)
/source/blender/editors/interface/interface.c (+8, -2) (Diff)
/source/blender/editors/interface/interface_anim.c (+23, -17) (Diff)
/source/blender/editors/interface/interface_handlers.c (+3, -1) (Diff)
/source/blender/editors/interface/interface_intern.h (+10, -4) (Diff)
/source/blender/editors/interface/interface_layout.c (+35, -35) (Diff)
/source/blender/editors/interface/interface_query.c (+1, -1) (Diff)
/source/blender/editors/interface/interface_widgets.c (+2, -1) (Diff)