From e0c60985b64cf112cb782f6378552d5fc83f0f65 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Oct 2015 22:56:09 +1100 Subject: Transform: Replace t->imval w/ t->mouse.imval Initial mouse position was saved in two different places D1588 by @mauge --- source/blender/editors/transform/transform_conversions.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/transform/transform_conversions.c') diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 5e13afdc152..110cd4cdd59 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3027,7 +3027,7 @@ static void createTransNlaData(bContext *C, TransInfo *t) /* only side on which mouse is gets transformed */ float xmouse, ymouse; - UI_view2d_region_to_view(&ac.ar->v2d, t->imval[0], t->imval[1], &xmouse, &ymouse); + UI_view2d_region_to_view(&ac.ar->v2d, t->mouse.imval[0], t->mouse.imval[1], &xmouse, &ymouse); t->frame_side = (xmouse > CFRA) ? 'R' : 'L'; } else { @@ -3664,7 +3664,7 @@ static void createTransActionData(bContext *C, TransInfo *t) /* only side on which mouse is gets transformed */ float xmouse, ymouse; - UI_view2d_region_to_view(&ac.ar->v2d, t->imval[0], t->imval[1], &xmouse, &ymouse); + UI_view2d_region_to_view(&ac.ar->v2d, t->mouse.imval[0], t->mouse.imval[1], &xmouse, &ymouse); t->frame_side = (xmouse > CFRA) ? 'R' : 'L'; // XXX use t->frame_side } else { @@ -4063,7 +4063,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) /* only side on which mouse is gets transformed */ float xmouse, ymouse; - UI_view2d_region_to_view(v2d, t->imval[0], t->imval[1], &xmouse, &ymouse); + UI_view2d_region_to_view(v2d, t->mouse.imval[0], t->mouse.imval[1], &xmouse, &ymouse); t->frame_side = (xmouse > CFRA) ? 'R' : 'L'; // XXX use t->frame_side } else { @@ -5108,7 +5108,7 @@ static void createTransSeqData(bContext *C, TransInfo *t) t->customFree = freeSeqData; - xmouse = (int)UI_view2d_region_to_view_x(v2d, t->imval[0]); + xmouse = (int)UI_view2d_region_to_view_x(v2d, t->mouse.imval[0]); /* which side of the current frame should be allowed */ if (t->mode == TFM_TIME_EXTEND) { -- cgit v1.2.3