diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 17:50:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-20 17:50:41 +0400 |
commit | 363bfdc46a05a5225bd4abc76b14ba2002f414af (patch) | |
tree | 5ffc73ffa68976711eebfc3770542a9df9287cd8 /source/blender/editors/gpencil/gpencil_paint.c | |
parent | a8ef6ffd170f559a50791556160fc3d7ec6a54d8 (diff) |
use consistant arguments to ED_view3d_win_* funcs, a single float vector rather then 2 floats.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index f84e770b8f2..de989a1a292 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -253,6 +253,7 @@ static void gp_stroke_convertcoords (tGPsdata *p, int mval[2], float out[3], flo else { const int mx=mval[0], my=mval[1]; float rvec[3], dvec[3]; + float mval_f[2]; /* Current method just converts each point in screen-coordinates to * 3D-coordinates using the 3D-cursor as reference. In general, this @@ -267,7 +268,10 @@ static void gp_stroke_convertcoords (tGPsdata *p, int mval[2], float out[3], flo /* method taken from editview.c - mouse_cursor() */ project_int_noclip(p->ar, rvec, mval); - ED_view3d_win_to_delta(p->ar, mval[0]-mx, mval[1]-my, dvec); + + mval_f[0]= mval[0] - mx; + mval_f[0]= mval[1] - my; + ED_view3d_win_to_delta(p->ar, mval_f, dvec); sub_v3_v3v3(out, rvec, dvec); } } |