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>2013-09-16 08:04:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-16 08:04:44 +0400
commit23626e0149f25f13855735bbb7f65121e0c40ca0 (patch)
tree2688b304463fee3a042496727032f6772d447642 /source/blender/editors/space_logic
parent43bd8c2b28d06953b64ed6d1e72cead9e42463a0 (diff)
fix [#36444] view3d.viewnumpad operator should not animate
when running viewport operations with exec() rather then invoke(), perform the action immediately rather then using smoothview. makes viewport operations usable from python scripts.
Diffstat (limited to 'source/blender/editors/space_logic')
-rw-r--r--source/blender/editors/space_logic/logic_ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index fadf4c0b113..fac564f33fb 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -739,16 +739,17 @@ static void LOGIC_OT_texface_convert(wmOperatorType *ot)
/* ************************ view ********************* */
-static int logic_view_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int logic_view_all_exec(bContext *C, wmOperator *op)
{
ARegion *ar = CTX_wm_region(C);
rctf cur_new = ar->v2d.tot;
float aspect = BLI_rctf_size_y(&ar->v2d.cur) / BLI_rctf_size_x(&ar->v2d.cur);
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* force the view2d code to zoom to width, not height */
cur_new.ymin = cur_new.ymax - BLI_rctf_size_x(&cur_new) * aspect;
- UI_view2d_smooth_view(C, ar, &cur_new);
+ UI_view2d_smooth_view(C, ar, &cur_new, smooth_viewtx);
return OPERATOR_FINISHED;
}