[Bf-blender-cvs] [ac2941fb15f] blender-v2.93-release: Fix use of imbuf that was never valid in animation player
Campbell Barton
noreply at git.blender.org
Fri May 7 10:17:49 CEST 2021
Commit: ac2941fb15fafcf28907d84304b48d6f7e14e65f
Author: Campbell Barton
Date: Fri May 7 17:25:06 2021 +1000
Branches: blender-v2.93-release
https://developer.blender.org/rBac2941fb15fafcf28907d84304b48d6f7e14e65f
Fix use of imbuf that was never valid in animation player
Resizing the window would always draw the image with an empty imbuf.
===================================================================
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 7726eb1b5d3..a209930f978 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -132,9 +132,6 @@ typedef struct PlayState {
int ibufx, ibufy;
int fontid;
- /* saves passing args */
- struct ImBuf *curframe_ibuf;
-
/* restarts player for file drop */
char dropped_file[FILE_MAX];
@@ -958,9 +955,9 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void)
case GHOST_kKeyNumpadSlash:
if (val) {
if (g_WS.qual & WS_QUAL_SHIFT) {
- if (ps->curframe_ibuf) {
+ if (ps->picture && ps->picture->ibuf) {
printf(" Name: %s | Speed: %.2f frames/s\n",
- ps->curframe_ibuf->name,
+ ps->picture->ibuf->name,
ps->fstep / swaptime);
}
}
@@ -1197,7 +1194,8 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void)
playanim_gl_matrix();
ptottime = 0.0;
- playanim_toscreen(ps, ps->picture, ps->curframe_ibuf, ps->fontid, ps->fstep);
+ playanim_toscreen(
+ ps, ps->picture, ps->picture ? ps->picture->ibuf : NULL, ps->fontid, ps->fstep);
break;
}
More information about the Bf-blender-cvs
mailing list