== Sequencer ==

This fixes:
[11750] "Translate" stops working when offset > image size
This commit is contained in:
Peter Schlaile 2008-05-19 06:14:57 +00:00
parent c526b1b2df
commit 591a478670

@ -1452,6 +1452,7 @@ static void input_preprocess(Sequence * seq, TStripElem* se, int cfra)
if(seq->flag & SEQ_USE_CROP || seq->flag & SEQ_USE_TRANSFORM) {
StripCrop c;
StripTransform t;
int sx,sy,dx,dy;
memset(&c, 0, sizeof(StripCrop));
memset(&t, 0, sizeof(StripTransform));
@ -1463,23 +1464,23 @@ static void input_preprocess(Sequence * seq, TStripElem* se, int cfra)
t = *seq->strip->transform;
}
if (c.top + c.bottom >= se->ibuf->y ||
c.left + c.right >= se->ibuf->x ||
t.xofs >= se->ibuf->x ||
t.yofs >= se->ibuf->y) {
make_black_ibuf(se->ibuf);
} else {
ImBuf * i;
int sx = se->ibuf->x - c.left - c.right;
int sy = se->ibuf->y - c.top - c.bottom;
int dx = sx;
int dy = sy;
sx = se->ibuf->x - c.left - c.right;
sy = se->ibuf->y - c.top - c.bottom;
dx = sx;
dy = sy;
if (seq->flag & SEQ_USE_TRANSFORM) {
dx = seqrectx;
dy = seqrecty;
}
if (c.top + c.bottom >= se->ibuf->y ||
c.left + c.right >= se->ibuf->x ||
t.xofs >= dx || t.yofs >= dy) {
make_black_ibuf(se->ibuf);
} else {
ImBuf * i;
if (se->ibuf->rect_float) {
i = IMB_allocImBuf(dx, dy,32, IB_rectfloat, 0);
} else {