Fix T41883 proxy sizes not correct.
Really bad issue which meant code could fetch an image buffer from the stored cache and modify it. Generally sequence image buffers could come from the cache and should not be modified directly. Easily solved by scaling a copy of the original.
This commit is contained in:
parent
c57d9c05d6
commit
226eb53bc7
Notes:
blender-bot
2023-02-14 10:04:44 +01:00
Referenced by issue #42606, proxy rendering problem Referenced by issue #41883, Strip keyframes not respected for scenes rendered by other scenes
|
@ -1489,20 +1489,25 @@ static void seq_proxy_build_frame(const SeqRenderData *context, Sequence *seq, i
|
|||
int quality;
|
||||
int rectx, recty;
|
||||
int ok;
|
||||
ImBuf *ibuf;
|
||||
ImBuf *ibuf_tmp, *ibuf;
|
||||
|
||||
if (!seq_proxy_get_fname(seq, cfra, proxy_render_size, name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ibuf = seq_render_strip(context, seq, cfra);
|
||||
ibuf_tmp = seq_render_strip(context, seq, cfra);
|
||||
|
||||
rectx = (proxy_render_size * ibuf->x) / 100;
|
||||
recty = (proxy_render_size * ibuf->y) / 100;
|
||||
rectx = (proxy_render_size * ibuf_tmp->x) / 100;
|
||||
recty = (proxy_render_size * ibuf_tmp->y) / 100;
|
||||
|
||||
if (ibuf->x != rectx || ibuf->y != recty) {
|
||||
if (ibuf_tmp->x != rectx || ibuf_tmp->y != recty) {
|
||||
ibuf = IMB_dupImBuf(ibuf_tmp);
|
||||
IMB_freeImBuf(ibuf_tmp);
|
||||
IMB_scalefastImBuf(ibuf, (short)rectx, (short)recty);
|
||||
}
|
||||
else {
|
||||
ibuf = ibuf_tmp;
|
||||
}
|
||||
|
||||
/* depth = 32 is intentionally left in, otherwise ALPHA channels
|
||||
* won't work... */
|
||||
|
|
Loading…
Reference in New Issue