[Bf-blender-cvs] [ce112cf0df4] blender2.8: Revert "Manipulator: remove unused event hack"

Campbell Barton noreply at git.blender.org
Fri Sep 1 16:48:51 CEST 2017


Commit: ce112cf0df49d9edd74cb91503f14fec30b55d71
Author: Campbell Barton
Date:   Sat Sep 2 00:15:35 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBce112cf0df49d9edd74cb91503f14fec30b55d71

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.

===================================================================

M	source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c
M	source/blender/windowmanager/wm_event_types.h

===================================================================

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. ********** */
 };



More information about the Bf-blender-cvs mailing list