Fix #134043: Account for frame_offset in Alembic procedurals

There's two places which perform the frame start and end time
calculation and only one of them was respecting the frame_offset.

Pull Request: https://projects.blender.org/blender/blender/pulls/134149
This commit is contained in:
Jesse Yurkovich
2025-03-06 20:54:22 +01:00
committed by Jesse Yurkovich
parent 3a0e4fe316
commit 4c38380cc6
+3 -2
View File
@@ -49,8 +49,9 @@ static set<chrono_t> get_relevant_sample_times(AlembicProcedural *proc,
}
const double frame_rate = static_cast<double>(proc->get_frame_rate());
const double start_time = start_frame / frame_rate;
const double end_time = (end_frame + 1) / frame_rate;
const double frame_offset = proc->get_frame_offset();
const double start_time = (start_frame - frame_offset) / frame_rate;
const double end_time = (end_frame - frame_offset + 1) / frame_rate;
const size_t start_index = time_sampling.getFloorIndex(start_time, num_samples).first;
const size_t end_index = time_sampling.getCeilIndex(end_time, num_samples).first;