This patch adds the ability to use vertical gestures to define multiple buttons to draw or type values into.
Also, this sounds more complicated then it really is, recommend testing the patch out before jumping to conclusions.
Usage
- click on the first button you want to modify, then drag up/down to another grouped button you want to drag)
- notice only the buttons highlight and un-highlight as you drag.
- drag horizontally to edit the highlighed buttons OR let go of the mouse button and type in a value (its applied to all).
Pros:
- fast to access, applies to all buttons without modifications to layout or cluttering the interface with more buttons.
- Compared to adding a button that links values...
- - No extra UI clutter or having to keep track of the state of which buttons are linked (not so simple for dynamically generated UI's)
- - One click instead of 3 (link, drag, unlink)
- - You can easily select a subset of the buttons to drag (just XY for eg).
Cons:
- Not discoverable (This can be resolved by having visual hints around grouped buttons when initiating the drag)
- The L (or '˥' - flipped) shaped motion used to select buttons to drag, then to drag, may be hard for some users (maybe they drag vertically by accident sometimes, or wish to drag vertically but the gesture isn't detected...)
- This only works when buttons are stacked vertically (which is mostly the case, but there are exceptions).
Todo:
If this patch is accepted, some todo's...
- Draw some indication that vertical drag is possible so this isnt a totally hidden feature.
- Color is currently hard coded to a white highlight, perhaps should use theme color for highlight, or a different theme color (minor detail).
- Support for maintaining aspect ratio with render resolution and object scale (perhaps with an RNA flag).
Technical Notes:
- To tweak behavior - modify DRAG_MULTINUM_THRESHOLD_DRAG_X, DRAG_MULTINUM_THRESHOLD_DRAG_Y and DRAG_MULTINUM_THRESHOLD_VERTICAL, comments explain how they work.
- we could have a more generic way to modify and restore a list of button values.
- referencing buttons by center-point isn't ideal, could use pointers and update them in ui_but_update_from_old_block
- ifdef'd in for now, this kind of feature makes changes it quite a few areas and I'd like to quickly be able to disable (as with drag-toggle)
Credits:
extended from an initial patch developed with Alex Fraser - @Alex Fraser (z0r), modified based on feedback from @Daniel Salazar (zanqdo) and @Jonathan Williamson (carter2422)



