Cleanup: rename ED_view3d_smooth_view_finish (to force_finish)

This commit is contained in:
Campbell Barton
2016-05-05 01:51:25 +10:00
parent e30f0427a5
commit bd1378b56b
3 changed files with 12 additions and 8 deletions

View File

@@ -2838,7 +2838,7 @@ static void view3d_from_minmax(bContext *C, View3D *v3d, ARegion *ar,
float afm[3];
float size;
ED_view3d_smooth_view_finish(C, v3d, ar);
ED_view3d_smooth_view_force_finish(C, v3d, ar);
/* SMOOTHVIEW */
float new_ofs[3];
@@ -3198,7 +3198,7 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *op)
ARegion *ar = CTX_wm_region(C);
const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
ED_view3d_smooth_view_finish(C, v3d, ar);
ED_view3d_smooth_view_force_finish(C, v3d, ar);
/* non camera center */
float new_ofs[3];
@@ -3239,7 +3239,7 @@ static int viewcenter_pick_invoke(bContext *C, wmOperator *op, const wmEvent *ev
float new_ofs[3];
const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
ED_view3d_smooth_view_finish(C, v3d, ar);
ED_view3d_smooth_view_force_finish(C, v3d, ar);
view3d_operator_needs_opengl(C);
@@ -3846,7 +3846,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
ED_view3d_context_user_region(C, &v3d, &ar);
rv3d = ar->regiondata;
ED_view3d_smooth_view_finish(C, v3d, ar);
ED_view3d_smooth_view_force_finish(C, v3d, ar);
viewnum = RNA_enum_get(op->ptr, "type");
align_active = RNA_boolean_get(op->ptr, "align_active");
@@ -3998,7 +3998,7 @@ static int vieworbit_exec(bContext *C, wmOperator *op)
rv3d = ar->regiondata;
}
ED_view3d_smooth_view_finish(C, v3d, ar);
ED_view3d_smooth_view_force_finish(C, v3d, ar);
if ((rv3d->viewlock & RV3D_LOCKED) == 0 || (view_opposite != RV3D_VIEW_USER)) {
if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) {
@@ -4206,7 +4206,7 @@ static int viewroll_exec(bContext *C, wmOperator *op)
rv3d = ar->regiondata;
if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) {
ED_view3d_smooth_view_finish(C, v3d, ar);
ED_view3d_smooth_view_force_finish(C, v3d, ar);
int type = RNA_enum_get(op->ptr, "type");
float angle = (type == 0) ? RNA_float_get(op->ptr, "angle") : DEG2RADF(U.pad_rot_angle);

View File

@@ -229,7 +229,7 @@ void ED_view3d_smooth_view(
struct View3D *v3d, struct ARegion *ar, const int smooth_viewtx,
const V3D_SmoothParams *sview);
void ED_view3d_smooth_view_finish(
void ED_view3d_smooth_view_force_finish(
struct bContext *C,
struct View3D *v3d, struct ARegion *ar);

View File

@@ -432,7 +432,11 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), const w
return OPERATOR_FINISHED;
}
void ED_view3d_smooth_view_finish(
/**
* Apply the smoothview immediately, use when we need to start a new view operation.
* (so we don't end up half-applying a view operation when pressing keys quickly).
*/
void ED_view3d_smooth_view_force_finish(
bContext *C,
View3D *v3d, ARegion *ar)
{