Alembic import: fixed off-by-one error in start/end frame

static_cast<int> truncates, so a computed end frame of 99.999999999998
would result in 99, instead of the correct 100.
This commit is contained in:
Sybren A. Stüvel 2017-04-13 14:50:02 +02:00
parent 575d6415fb
commit 0706b908db
1 changed files with 2 additions and 2 deletions

View File

@ -717,8 +717,8 @@ static void import_startjob(void *user_data, short *stop, short *do_update, floa
CFRA = SFRA;
}
else if (min_time < max_time) {
SFRA = static_cast<int>(min_time * FPS);
EFRA = static_cast<int>(max_time * FPS);
SFRA = static_cast<int>(round(min_time * FPS));
EFRA = static_cast<int>(round(max_time * FPS));
CFRA = SFRA;
}
}