Revert "Manipulator: remove unused event hack"

This reverts commit 134e927965.

Writing into const event is very bad,
but this change broke compositor manipulators.

Will look into better solution eventually.
This commit is contained in:
Campbell Barton 2017-09-02 00:15:35 +10:00
parent a5cb23c441
commit ce112cf0df
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

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