mirror of
https://github.com/DarklightGames/io_scene_psk_psa.git
synced 2024-11-28 00:20:48 +01:00
Fixed a bug where 0 frames could be output for a sequence if the compression ratio was less than 1.0
This commit is contained in:
parent
ff74f47178
commit
1f2ec4c76b
@ -155,7 +155,7 @@ def build_psa(context: bpy.types.Context, options: PsaBuildOptions) -> Psa:
|
|||||||
# Calculate the frame step based on the compression factor.
|
# Calculate the frame step based on the compression factor.
|
||||||
frame_extents = abs(frame_end - frame_start)
|
frame_extents = abs(frame_end - frame_start)
|
||||||
frame_count_raw = frame_extents + 1
|
frame_count_raw = frame_extents + 1
|
||||||
frame_count = max(export_sequence.key_quota, int(frame_count_raw * export_sequence.compression_ratio))
|
frame_count = max(1, max(export_sequence.key_quota, int(frame_count_raw * export_sequence.compression_ratio)))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
frame_step = frame_extents / (frame_count - 1)
|
frame_step = frame_extents / (frame_count - 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user