== Sequencer ==
This fixes: [11750] "Translate" stops working when offset > image size
This commit is contained in:
@@ -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) {
|
if(seq->flag & SEQ_USE_CROP || seq->flag & SEQ_USE_TRANSFORM) {
|
||||||
StripCrop c;
|
StripCrop c;
|
||||||
StripTransform t;
|
StripTransform t;
|
||||||
|
int sx,sy,dx,dy;
|
||||||
|
|
||||||
memset(&c, 0, sizeof(StripCrop));
|
memset(&c, 0, sizeof(StripCrop));
|
||||||
memset(&t, 0, sizeof(StripTransform));
|
memset(&t, 0, sizeof(StripTransform));
|
||||||
@@ -1463,22 +1464,22 @@ static void input_preprocess(Sequence * seq, TStripElem* se, int cfra)
|
|||||||
t = *seq->strip->transform;
|
t = *seq->strip->transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 ||
|
if (c.top + c.bottom >= se->ibuf->y ||
|
||||||
c.left + c.right >= se->ibuf->x ||
|
c.left + c.right >= se->ibuf->x ||
|
||||||
t.xofs >= se->ibuf->x ||
|
t.xofs >= dx || t.yofs >= dy) {
|
||||||
t.yofs >= se->ibuf->y) {
|
|
||||||
make_black_ibuf(se->ibuf);
|
make_black_ibuf(se->ibuf);
|
||||||
} else {
|
} else {
|
||||||
ImBuf * i;
|
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;
|
|
||||||
|
|
||||||
if (seq->flag & SEQ_USE_TRANSFORM) {
|
|
||||||
dx = seqrectx;
|
|
||||||
dy = seqrecty;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (se->ibuf->rect_float) {
|
if (se->ibuf->rect_float) {
|
||||||
i = IMB_allocImBuf(dx, dy,32, IB_rectfloat, 0);
|
i = IMB_allocImBuf(dx, dy,32, IB_rectfloat, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user