Fix T38700: Plane track can't be adjust when select mouse is set to left
This commit is contained in:
parent
cbbc67a0b5
commit
7aa86ec243
Notes:
blender-bot
2023-02-14 11:09:52 +01:00
Referenced by issue #38700, Plane track: can't be adjust when select mouse is set to left Referenced by issue #38700, Plane track: can't be adjust when select mouse is set to left
|
@ -695,7 +695,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
|
|||
WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks_clear", HKEY, KM_PRESS, KM_ALT, 0);
|
||||
|
||||
/* plane tracks */
|
||||
WM_keymap_add_item(keymap, "CLIP_OT_slide_plane_marker", LEFTMOUSE, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "CLIP_OT_slide_plane_marker", ACTIONMOUSE, KM_PRESS, 0, 0);
|
||||
|
||||
WM_keymap_add_item(keymap, "CLIP_OT_keyframe_insert", IKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "CLIP_OT_keyframe_delete", IKEY, KM_PRESS, KM_ALT, 0);
|
||||
|
|
|
@ -3865,6 +3865,7 @@ void CLIP_OT_create_plane_track(wmOperatorType *ot)
|
|||
/********************** Slide plane marker corner operator *********************/
|
||||
|
||||
typedef struct SlidePlaneMarkerData {
|
||||
int event_type;
|
||||
MovieTrackingPlaneTrack *plane_track;
|
||||
MovieTrackingPlaneMarker *plane_marker;
|
||||
int width, height;
|
||||
|
@ -3960,6 +3961,8 @@ static void *slide_plane_marker_customdata(bContext *C, const wmEvent *event)
|
|||
|
||||
customdata = MEM_callocN(sizeof(SlidePlaneMarkerData), "slide plane marker data");
|
||||
|
||||
customdata->event_type = event->type;
|
||||
|
||||
plane_marker = BKE_tracking_plane_marker_ensure(plane_track, framenr);
|
||||
|
||||
customdata->plane_track = plane_track;
|
||||
|
@ -4109,7 +4112,8 @@ static int slide_plane_marker_modal(bContext *C, wmOperator *op, const wmEvent *
|
|||
break;
|
||||
|
||||
case LEFTMOUSE:
|
||||
if (event->val == KM_RELEASE) {
|
||||
case RIGHTMOUSE:
|
||||
if (event->type == data->event_type && event->val == KM_RELEASE) {
|
||||
/* Marker is now keyframed. */
|
||||
data->plane_marker->flag &= ~PLANE_MARKER_TRACKED;
|
||||
|
||||
|
|
Loading…
Reference in New Issue