diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-28 06:26:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-28 06:36:43 +0300 |
commit | 2e22cfd08a0d589e8894e322ed29d5c3227ca04d (patch) | |
tree | 1dea3f566ce6ee8bdefaa5ca78cec1844662d2b8 /source/blender/windowmanager/gizmo/WM_gizmo_types.h | |
parent | 219e6a98c66a00673395d5c420ff35ad86eef846 (diff) |
Gizmo: changes to internal drag logic
Minor changes to recent gizmo click/drag logic 08dff7b40bc6a
Changing the gizmos highlighted part in the invoke_prepare
callback is too error prone since it needs to run
before it's known which operator will execute.
Add back 'drag_part', since it simplifies click-drag use.
While this isn't essential with custom keymaps per gizmo
it avoids having to define a keymap in the case a drag
event needs a different action.
Diffstat (limited to 'source/blender/windowmanager/gizmo/WM_gizmo_types.h')
-rw-r--r-- | source/blender/windowmanager/gizmo/WM_gizmo_types.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_types.h b/source/blender/windowmanager/gizmo/WM_gizmo_types.h index 5398c262c72..cd8bcc6696b 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_types.h +++ b/source/blender/windowmanager/gizmo/WM_gizmo_types.h @@ -199,6 +199,12 @@ struct wmGizmo { * -1 when unset, otherwise a valid index. (Used as index to 'op_data'). */ int highlight_part; + /** + * For gizmos that differentiate between click & drag, + * use a different part for any drag events, -1 when unused. + */ + int drag_part; + /** Distance to bias this gizmo above others when picking * (in worldspace, scaled by the gizmo scale - when used). */ float select_bias; |