Update scene.py to make scene.time more accurate

When the time intervals are (0, dt, 2dt, ...), during the first frame processing, only the video is inserted, but the update parameter is 0, which causes scene.time to be inaccurate. The correct time intervals should be (dt, 2dt, ...)
This commit is contained in:
zhujisheng 2024-09-23 23:48:18 +08:00 committed by GitHub
parent 9eda000a97
commit ccb9977a67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -552,7 +552,7 @@ class Scene(object):
if self.skip_animations and not override_skip_animations: if self.skip_animations and not override_skip_animations:
return [run_time] return [run_time]
times = np.arange(0, run_time, 1 / self.camera.fps) times = np.arange(0, run_time, 1 / self.camera.fps) + 1 / self.camera.fps
self.file_writer.set_progress_display_description(sub_desc=desc) self.file_writer.set_progress_display_description(sub_desc=desc)