[Bf-blender-cvs] [9eee2aa20c7] master: Animation player: tweaks for zooming in and out

Sergey Sharybin noreply at git.blender.org
Thu Jan 24 15:13:26 CET 2019


Commit: 9eee2aa20c7b5d29e76f023771f9c27002292804
Author: Sergey Sharybin
Date:   Thu Jan 24 15:07:53 2019 +0100
Branches: master
https://developer.blender.org/rB9eee2aa20c7b5d29e76f023771f9c27002292804

Animation player: tweaks for zooming in and out

Use zoom steps lower than 1. This allows to zoom out a high-res
image. For example, before it was not possible to maker 4K image
to fit on FullHD monitor.

Also, don't force zoom to be above 1. Not sure why that was done,
but this disallows zooming out.

It is still not possible to zoom in higher than the window size
allows. In order to support this the player needs to be refactored
in a way that allows to decouple zoom from window size.

Fixes T59177: Animplayer extreme zooms in when playing rendered animation

===================================================================

M	source/blender/windowmanager/intern/wm_playanim.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 17e3f643a40..87737229d83 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -930,7 +930,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void)
 				{
 					if (val == 0) break;
 					if (g_WS.qual & WS_QUAL_CTRL) {
-						playanim_window_zoom(ps, 1.0f);
+						playanim_window_zoom(ps, 0.1f);
 					}
 					else {
 						if (swaptime > ps->fstep / 60.0) {
@@ -945,7 +945,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void)
 				{
 					if (val == 0) break;
 					if (g_WS.qual & WS_QUAL_CTRL) {
-						playanim_window_zoom(ps, -1.0f);
+						playanim_window_zoom(ps, -0.1f);
 					}
 					else {
 						if (swaptime < ps->fstep / 5.0) {
@@ -1048,10 +1048,6 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void)
 			/* zoom always show entire image */
 			ps->zoom = MIN2(zoomx, zoomy);
 
-			/* zoom steps of 2 for speed */
-			ps->zoom = floor(ps->zoom + 0.5f);
-			if (ps->zoom < 1.0f) ps->zoom = 1.0f;
-
 			glViewport(0, 0, ps->win_x, ps->win_y);
 			glScissor(0, 0, ps->win_x, ps->win_y);



More information about the Bf-blender-cvs mailing list