Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-27 16:58:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-27 16:59:36 +0300
commitb6a0027de3a5ee039442f10cf7f9bc1bf3116733 (patch)
treec91d6b87fa1ee9b52407778c11c5cba945dec4ff /source/blender/windowmanager/gizmo
parentb1f0e3e4a74a959779245c163dbe3258aab88085 (diff)
Gizmo: add event argument to invoke_prepare callback
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c2
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c2
-rw-r--r--source/blender/windowmanager/gizmo/wm_gizmo_fn.h3
3 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
index 95cb86ef3cb..ded308f4b7b 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
@@ -411,7 +411,7 @@ static bool gizmo_tweak_start_and_finish(
}
else {
if (gz->parent_gzgroup->type->invoke_prepare) {
- gz->parent_gzgroup->type->invoke_prepare(C, gz->parent_gzgroup, gz);
+ gz->parent_gzgroup->type->invoke_prepare(C, gz->parent_gzgroup, gz, event);
}
/* Allow for 'button' gizmos, single click to run an action. */
WM_gizmo_operator_invoke(C, gz, gzop);
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index 1f29ffd5669..9c18406b84d 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -1010,7 +1010,7 @@ void wm_gizmomap_modal_set(
/* Use even if we don't have invoke, so we can setup data before an operator runs. */
if (gz->parent_gzgroup->type->invoke_prepare) {
- gz->parent_gzgroup->type->invoke_prepare(C, gz->parent_gzgroup, gz);
+ gz->parent_gzgroup->type->invoke_prepare(C, gz->parent_gzgroup, gz, event);
}
if (gz->type->invoke && (gz->type->modal || gz->custom_modal)) {
diff --git a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h
index 2aada0f202a..242b0f6de80 100644
--- a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h
+++ b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h
@@ -33,7 +33,8 @@ typedef void (*wmGizmoGroupFnRefresh)(const struct bContext *, struct wmGizmoGro
typedef void (*wmGizmoGroupFnDrawPrepare)(const struct bContext *, struct wmGizmoGroup *);
typedef void (*wmGizmoGroupFnInvokePrepare)(const struct bContext *,
struct wmGizmoGroup *,
- struct wmGizmo *);
+ struct wmGizmo *,
+ const struct wmEvent *);
typedef struct wmKeyMap *(*wmGizmoGroupFnSetupKeymap)(const struct wmGizmoGroupType *,
struct wmKeyConfig *)ATTR_WARN_UNUSED_RESULT;
typedef void (*wmGizmoGroupFnMsgBusSubscribe)(const struct bContext *,