mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 21:11:33 +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
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ def collect_per_frame(sources, keys, begin_frame, end_frame, frame_number_name):
|
||||||
assert begin_frame < end_frame
|
assert begin_frame < end_frame
|
||||||
result = collections.defaultdict(lambda: collections.defaultdict(list))
|
result = collections.defaultdict(lambda: collections.defaultdict(list))
|
||||||
begin_frame = max(begin_frame, min(v[0][frame_number_name] for v in sources.values()))
|
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 name in sources.keys():
|
||||||
for key in keys:
|
for key in keys:
|
||||||
result[name][key] = [0] * (end_frame - begin_frame)
|
result[name][key] = [0] * (end_frame - begin_frame)
|
||||||
|
|
Loading…
Reference in a new issue