Fix #114358: Trace Image to Grease Pencil misses first frame in sequence
Off by one when it comes to setting `ImageUser` > `framenr` Pull Request: https://projects.blender.org/blender/blender/pulls/114365
This commit is contained in:
committed by
Philipp Oeser
parent
e24c7f1954
commit
0a3b44ed64
@@ -234,7 +234,7 @@ static void trace_start_job(void *customdata, bool *stop, bool *do_update, float
|
||||
/* Image sequence. */
|
||||
else if (trace_job->image->type == IMA_TYPE_IMAGE) {
|
||||
ImageUser *iuser = trace_job->ob_active->iuser;
|
||||
for (int i = init_frame; i < iuser->frames; i++) {
|
||||
for (int i = init_frame; i <= iuser->frames; i++) {
|
||||
if (G.is_break) {
|
||||
trace_job->was_canceled = true;
|
||||
break;
|
||||
@@ -243,7 +243,7 @@ static void trace_start_job(void *customdata, bool *stop, bool *do_update, float
|
||||
*(trace_job->progress) = float(i) / float(iuser->frames);
|
||||
*do_update = true;
|
||||
|
||||
iuser->framenr = i + 1;
|
||||
iuser->framenr = i;
|
||||
|
||||
void *lock;
|
||||
ImBuf *ibuf = BKE_image_acquire_ibuf(trace_job->image, iuser, &lock);
|
||||
|
||||
Reference in New Issue
Block a user