Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-20 17:50:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-20 17:50:41 +0400
commit363bfdc46a05a5225bd4abc76b14ba2002f414af (patch)
tree5ffc73ffa68976711eebfc3770542a9df9287cd8 /source/blender/editors/gpencil/gpencil_edit.c
parenta8ef6ffd170f559a50791556160fc3d7ec6a54d8 (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_edit.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 74e9799e668..83dec47bf8b 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -377,31 +377,30 @@ static void gp_strokepoint_convertcoords (bContext *C, bGPDstroke *gps, bGPDspoi
}
else {
float *fp= give_cursor(scene, v3d);
- float mx, my;
+ float mvalf[2];
/* get screen coordinate */
if (gps->flag & GP_STROKE_2DSPACE) {
- int mxi, myi;
+ int mvali[2];
View2D *v2d= &ar->v2d;
- UI_view2d_view_to_region(v2d, pt->x, pt->y, &mxi, &myi);
- mx= mxi;
- my= myi;
+ UI_view2d_view_to_region(v2d, pt->x, pt->y, mvali, mvali+1);
+ VECCOPY2D(mvalf, mvali);
}
else {
if(subrect) {
- mx= (((float)pt->x/100.0f) * (subrect->xmax - subrect->xmin)) + subrect->xmin;
- my= (((float)pt->y/100.0f) * (subrect->ymax - subrect->ymin)) + subrect->ymin;
+ mvalf[0]= (((float)pt->x/100.0f) * (subrect->xmax - subrect->xmin)) + subrect->xmin;
+ mvalf[1]= (((float)pt->y/100.0f) * (subrect->ymax - subrect->ymin)) + subrect->ymin;
}
else {
- mx= (float)pt->x / 100.0f * ar->winx;
- my= (float)pt->y / 100.0f * ar->winy;
+ mvalf[0]= (float)pt->x / 100.0f * ar->winx;
+ mvalf[1]= (float)pt->y / 100.0f * ar->winy;
}
}
/* convert screen coordinate to 3d coordinates
* - method taken from editview.c - mouse_cursor()
*/
- ED_view3d_win_to_3d(ar, fp, mx, my, p3d);
+ ED_view3d_win_to_3d(ar, fp, mvalf, p3d);
}
}