image sequence - apply cyclic option AFTER the image offset,
there was no way to properly loop on a sequence of images that didnt start frame 1.
This commit is contained in:
parent
42aaa47e9b
commit
2e3c474b2d
|
@ -2829,7 +2829,6 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, shor
|
|||
/* transform to images space */
|
||||
framenr = (cfra + iuser->fie_ima - 2) / iuser->fie_ima;
|
||||
if (framenr > iuser->frames) framenr = iuser->frames;
|
||||
framenr += iuser->offset;
|
||||
|
||||
if (iuser->cycl) {
|
||||
framenr = ((framenr) % len);
|
||||
|
@ -2837,6 +2836,9 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, shor
|
|||
if (framenr == 0) framenr = len;
|
||||
}
|
||||
|
||||
/* important to apply after else we cant loop on frames 100 - 110 for eg. */
|
||||
framenr += iuser->offset;
|
||||
|
||||
return framenr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue