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>2017-09-01 17:15:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-01 17:55:29 +0300
commitce112cf0df49d9edd74cb91503f14fec30b55d71 (patch)
tree98dbb395a0b97f0f2f443f5177a6a8d38905faed /source/blender/windowmanager
parenta5cb23c441bcc39cb581674303617ea3a99a4b1c (diff)
Revert "Manipulator: remove unused event hack"
This reverts commit 134e927965c9871df8a9e13806f1cd48f4d43f16. Writing into const event is very bad, but this change broke compositor manipulators. Will look into better solution eventually.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c3
-rw-r--r--source/blender/windowmanager/wm_event_types.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c
index bc09fa30931..1675be861d6 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c
@@ -362,6 +362,9 @@ static int manipulator_tweak_modal(bContext *C, wmOperator *op, const wmEvent *e
return OPERATOR_FINISHED;
}
+ /* Ugly hack to send manipulator events */
+ ((wmEvent *)event)->type = EVT_MANIPULATOR_UPDATE;
+
/* always return PASS_THROUGH so modal handlers
* with manipulators attached can update */
return OPERATOR_PASS_THROUGH;
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index 5ebaa9bc3e9..9d34bc24e6c 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -338,6 +338,9 @@ enum {
EVT_MODAL_MAP = 0x5022,
EVT_DROP = 0x5023,
EVT_BUT_CANCEL = 0x5024,
+
+ /* could become manipulator callback */
+ EVT_MANIPULATOR_UPDATE = 0x5025,
/* ********** End of Blender internal events. ********** */
};