mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-27 06:14:09 +00:00
Fix end_frame computation in osg_stats.py
If begin_frame is not the first frame then begin_frame + number of frames points to a frame after end_frame with shift begin_frame - first_frame.
This commit is contained in:
parent
d1c602ce85
commit
2a660be8a2
@ -123,7 +123,7 @@ def collect_per_frame(sources, keys, begin_frame, end_frame, frame_number_name):
|
||||
assert begin_frame < end_frame
|
||||
result = collections.defaultdict(lambda: collections.defaultdict(list))
|
||||
begin_frame = max(begin_frame, min(v[0][frame_number_name] for v in sources.values()))
|
||||
end_frame = min(end_frame, begin_frame + max(len(v) for v in sources.values()))
|
||||
end_frame = min(end_frame, max(v[-1][frame_number_name] for v in sources.values()) + 1)
|
||||
for name in sources.keys():
|
||||
for key in keys:
|
||||
result[name][key] = [0] * (end_frame - begin_frame)
|
||||
|
Loading…
Reference in New Issue
Block a user