diff options
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index fb0a33674f7..53d2bed996e 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2735,7 +2735,7 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve View3D *v3d = CTX_wm_view3d(C); RegionView3D *rv3d= CTX_wm_region_view3d(C); float dx, dy, fz, *fp = NULL, dvec[3], oldcurs[3]; - short mx, my, mval[2]; + int mx, my, mval[2]; // short ctrl= 0; // XXX int flip; fp= give_cursor(scene, v3d); @@ -2746,7 +2746,7 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve mx= event->x - ar->winrct.xmin; my= event->y - ar->winrct.ymin; - project_short_noclip(ar, fp, mval); + project_int_noclip(ar, fp, mval); flip= initgrabz(rv3d, fp[0], fp[1], fp[2]); /* reset the depth based on the view offset */ @@ -2754,7 +2754,7 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve negate_v3_v3(fp, rv3d->ofs); /* re initialize */ - project_short_noclip(ar, fp, mval); + project_int_noclip(ar, fp, mval); flip= initgrabz(rv3d, fp[0], fp[1], fp[2]); } @@ -2762,7 +2762,7 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve short depth_used = 0; if (U.uiflag & USER_ORBIT_ZBUF) { /* maybe this should be accessed some other way */ - short mval_depth[2]; + int mval_depth[2]; mval_depth[0]= mx; mval_depth[1]= my; view3d_operator_needs_opengl(C); @@ -2893,7 +2893,7 @@ void VIEW3D_OT_enable_manipulator(wmOperatorType *ot) /* ************************* below the line! *********************** */ -static float view_autodist_depth_margin(ARegion *ar, const short mval[2], int margin) +static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int margin) { ViewDepths depth_temp= {0}; rcti rect; @@ -2921,7 +2921,7 @@ static float view_autodist_depth_margin(ARegion *ar, const short mval[2], int ma } /* XXX todo Zooms in on a border drawn by the user */ -int view_autodist(Scene *scene, ARegion *ar, View3D *v3d, const short mval[2], float mouse_worldloc[3] ) //, float *autodist ) +int view_autodist(Scene *scene, ARegion *ar, View3D *v3d, const int mval[2], float mouse_worldloc[3] ) //, float *autodist ) { bglMats mats; /* ZBuffer depth vars */ float depth_close= FLT_MAX; @@ -2964,7 +2964,7 @@ int view_autodist_init(Scene *scene, ARegion *ar, View3D *v3d, int mode) //, flo } // no 4x4 sampling, run view_autodist_init first -int view_autodist_simple(ARegion *ar, const short mval[2], float mouse_worldloc[3], int margin, float *force_depth) //, float *autodist ) +int view_autodist_simple(ARegion *ar, const int mval[2], float mouse_worldloc[3], int margin, float *force_depth) //, float *autodist ) { bglMats mats; /* ZBuffer depth vars, could cache? */ float depth; @@ -2992,7 +2992,7 @@ int view_autodist_simple(ARegion *ar, const short mval[2], float mouse_worldloc[ return 1; } -int view_autodist_depth(struct ARegion *ar, const short mval[2], int margin, float *depth) +int view_autodist_depth(struct ARegion *ar, const int mval[2], int margin, float *depth) { *depth= view_autodist_depth_margin(ar, mval, margin); @@ -3002,11 +3002,11 @@ int view_autodist_depth(struct ARegion *ar, const short mval[2], int margin, flo static int depth_segment_cb(int x, int y, void *userData) { struct { struct ARegion *ar; int margin; float depth; } *data = userData; - short mval[2]; + int mval[2]; float depth; - mval[0]= (short)x; - mval[1]= (short)y; + mval[0]= x; + mval[1]= y; depth= view_autodist_depth_margin(data->ar, mval, data->margin); @@ -3019,7 +3019,7 @@ static int depth_segment_cb(int x, int y, void *userData) } } -int view_autodist_depth_segment(struct ARegion *ar, const short mval_sta[2], const short mval_end[2], int margin, float *depth) +int view_autodist_depth_segment(struct ARegion *ar, const int mval_sta[2], const int mval_end[2], int margin, float *depth) { struct { struct ARegion *ar; int margin; float depth; } data = {NULL}; int p1[2]; |