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/armature
parenta8ef6ffd170f559a50791556160fc3d7ec6a54d8 (diff)
use consistant arguments to ED_view3d_win_* funcs, a single float vector rather then 2 floats.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c5
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 702c133ffc5..d5dce320a6b 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -2489,7 +2489,7 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, wmEvent *e
ARegion *ar;
View3D *v3d;
RegionView3D *rv3d;
- float *fp = NULL, tvec[3], oldcurs[3];
+ float *fp = NULL, tvec[3], oldcurs[3], mval_f[2];
int retv;
scene= CTX_data_scene(C);
@@ -2501,7 +2501,8 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, wmEvent *e
copy_v3_v3(oldcurs, fp);
- ED_view3d_win_to_3d(ar, fp, event->mval[0], event->mval[1], tvec);
+ VECCOPY2D(mval_f, event->mval);
+ ED_view3d_win_to_3d(ar, fp, mval_f, tvec);
copy_v3_v3(fp, tvec);
/* extrude to the where new cursor is and store the operation result */
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 214f2dbccce..ccb9a45af37 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -1022,6 +1022,7 @@ static void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_Dr
short cval[2];
float fp[3] = {0, 0, 0};
float dvec[3];
+ float mval_f[2];
if (last != NULL)
{
@@ -1032,7 +1033,8 @@ static void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_Dr
/* method taken from editview.c - mouse_cursor() */
project_short_noclip(ar, fp, cval);
- ED_view3d_win_to_delta(ar, cval[0] - dd->mval[0], cval[1] - dd->mval[1], dvec);
+ VECSUB2D(mval_f, cval, dd->mval);
+ ED_view3d_win_to_delta(ar, mval_f, dvec);
sub_v3_v3v3(vec, fp, dvec);
}