Blender Git Commit Log

Git Commits -> Revision b4f92bf

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

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2021