diff options
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_bevel.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_inset.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 8 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.h | 6 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 8 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_input.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/ed_util.c | 4 |
8 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 81308dd84f2..eff79b6a039 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -103,7 +103,7 @@ enum TfmMode { * returns 1 if successful, 0 otherwise (usually means there's no selection) * (if 0 is returns, *vec is unmodified) * */ -int calculateTransformCenter(struct bContext *C, int centerMode, float cent3d[3], int cent2d[2]); +int calculateTransformCenter(struct bContext *C, int centerMode, float cent3d[3], float cent2d[2]); struct TransInfo; struct ScrArea; diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index 6033e7ee471..97da0047793 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -64,7 +64,7 @@ typedef struct { float shift_factor; /* The current factor when shift is pressed. Negative when shift not active. */ /* modal only */ - int mcenter[2]; + float mcenter[2]; BMBackup mesh_backup; void *draw_handle_pixel; short twtype; diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c index 3966826a5b2..71822868026 100644 --- a/source/blender/editors/mesh/editmesh_inset.c +++ b/source/blender/editors/mesh/editmesh_inset.c @@ -68,7 +68,7 @@ typedef struct { NumInput num_input; /* modal only */ - int mcenter[2]; + float mcenter[2]; BMBackup mesh_backup; void *draw_handle_pixel; short twtype; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index ce2f07f1813..239d6297695 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1360,7 +1360,7 @@ int transformEvent(TransInfo *t, const wmEvent *event) } } -int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], int cent2d[2]) +int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], float cent2d[2]) { TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data"); int success; @@ -1390,7 +1390,7 @@ int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], int c calculateCenter(t); if (cent2d) { - copy_v2_v2_int(cent2d, t->center2d); + copy_v2_v2(cent2d, t->center2d); } if (cent3d) { @@ -7238,7 +7238,7 @@ int TimeSlide(TransInfo *t, const int mval[2]) void initTimeScale(TransInfo *t) { - int center[2]; + float center[2]; /* this tool is only really available in the Action Editor * AND NLA Editor (for strip scaling) @@ -7253,7 +7253,7 @@ void initTimeScale(TransInfo *t) /* recalculate center2d to use CFRA and mouse Y, since that's * what is used in time scale */ t->center[0] = t->scene->r.cfra; - projectIntView(t, t->center, center); + projectFloatView(t, t->center, center); center[1] = t->imval[1]; /* force a reinit with the center2d used here */ diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index a4828317604..9355773c47b 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -271,7 +271,7 @@ typedef struct MouseInput { int imval[2]; /* initial mouse position */ char precision; int precision_mval[2]; /* mouse position when precision key was pressed */ - int center[2]; + float center[2]; float factor; void *data; /* additional data, if needed by the particular function */ } MouseInput; @@ -300,7 +300,7 @@ typedef struct TransInfo { float prop_size; /* proportional circle radius */ char proptext[20]; /* proportional falloff text */ float center[3]; /* center of transformation */ - int center2d[2]; /* center in screen coordinates */ + float center2d[2]; /* center in screen coordinates */ int imval[2]; /* initial mouse position */ short event_type; /* event->type used to invoke transform */ short idx_max; /* maximum index on the input vector */ @@ -687,7 +687,7 @@ typedef enum { INPUT_CUSTOM_RATIO_FLIP } MouseInputMode; -void initMouseInput(TransInfo *t, MouseInput *mi, const int center[2], const int mval[2]); +void initMouseInput(TransInfo *t, MouseInput *mi, const float center[2], const int mval[2]); void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode); int handleMouseInput(struct TransInfo *t, struct MouseInput *mi, const struct wmEvent *event); void applyMouseInput(struct TransInfo *t, struct MouseInput *mi, const int mval[2], float output[3]); diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 233ef1d18a5..b6f031614ca 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1484,10 +1484,10 @@ void calculateCenter2D(TransInfo *t) copy_v3_v3(vec, t->center); mul_m4_v3(ob->obmat, vec); - projectIntView(t, vec, t->center2d); + projectFloatView(t, vec, t->center2d); } else { - projectIntView(t, t->center, t->center2d); + projectFloatView(t, t->center, t->center2d); } } @@ -1691,7 +1691,7 @@ void calculateCenter(TransInfo *t) Object *ob = OBACT; if (ob) { copy_v3_v3(t->center, ob->obmat[3]); - projectIntView(t, t->center, t->center2d); + projectFloatView(t, t->center, t->center2d); } } break; @@ -1723,7 +1723,7 @@ void calculateCenter(TransInfo *t) axis[1] = t->center[1] - 6.0f * axis[1]; axis[2] = t->center[2] - 6.0f * axis[2]; - projectIntView(t, axis, t->center2d); + projectFloatView(t, axis, t->center2d); /* rotate only needs correct 2d center, grab needs ED_view3d_calc_zfac() value */ if (t->mode == TFM_TRANSLATION) { diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index c035b6173c8..db214e1f6db 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -279,7 +279,7 @@ static void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, const int mval[2], output[0] = *angle; } -void initMouseInput(TransInfo *UNUSED(t), MouseInput *mi, const int center[2], const int mval[2]) +void initMouseInput(TransInfo *UNUSED(t), MouseInput *mi, const float center[2], const int mval[2]) { mi->factor = 0; mi->precision = 0; diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 35e6c40c36b..7424acd752f 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -258,7 +258,7 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *ar, void *arg_info) { wmWindow *win = CTX_wm_window(C); - const int *mval_src = (int *)arg_info; + const float *mval_src = (float *)arg_info; const int mval_dst[2] = {win->eventstate->x - ar->winrct.xmin, win->eventstate->y - ar->winrct.ymin}; @@ -266,7 +266,7 @@ void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *ar, void *arg_info setlinestyle(3); glBegin(GL_LINE_STRIP); glVertex2iv(mval_dst); - glVertex2iv(mval_src); + glVertex2fv(mval_src); glEnd(); setlinestyle(0); } |