Blender Git Commit Log

Git Commits -> Revision 8839b4c

Revision 8839b4c by Campbell Barton (master)
July 13, 2021, 10:03 (GMT)
UI: support persistent state during number/slider interaction

Support for begin/update/end callbacks allowing state to be cached
and reused while dragging a number button or slider.

This is done using `UI_block_interaction_set` to set callbacks.

- Dragging multiple buttons at once is supported,
passing multiple unique events into the update function.

- Update is only called once even when multiple buttons are edited.

- The update callback can detect the difference between click & drag
actions so situations to support skipping cache creation and
freeing for situations where it's not beneficial.

Reviewed by: Severin, HooglyBoogly

Ref D11861

Commit Details:

Full Hash: 8839b4c32a44ba2c50f08ccd815d450ac71c454a
Parent Commit: 1b4d5c7
Lines Changed: +250, -0

3 Modified Paths:

/source/blender/editors/include/UI_interface.h (+49, -0) (Diff)
/source/blender/editors/interface/interface_handlers.c (+198, -0) (Diff)
/source/blender/editors/interface/interface_intern.h (+3, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021