diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-03 18:25:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-03 18:25:06 +0400 |
commit | 2e3c474b2d6dbd856b276899930a5f942c49417e (patch) | |
tree | 10ea59bdc1bab23aa1e12f6f22922f4175e3a3ff /source | |
parent | 42aaa47e9b01d6dd7f2cf73f754652233438bffe (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 65747baa323..d2a2412843a 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -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; } } |