Jaded-Encoding-Thaumaturgy / vs-preview

Previewer for VapourSynth scripts.
Apache License 2.0
57 stars 16 forks source link

vstools set_output with audio nodes inbetween breaks vspreview videonodes #111

Closed jsaowji closed 8 months ago

jsaowji commented 10 months ago

If there is a audio node in between video nodes, it breaks a video preview starting from last index.

This works

set_output([
    core.std.BlankClip(width=1920,height=1080),
    core.std.BlankClip(width=1920,height=1080),
    core.std.BlankAudio(),
])

This breaks last video

set_output([
    core.std.BlankClip(width=1920,height=1080),
    core.std.BlankAudio(),
    core.std.BlankClip(width=1920,height=1080),
])

This breaks last and 2nd last video

set_output([
    core.std.BlankClip(width=1920,height=1080),
    core.std.BlankAudio(),
    core.std.BlankAudio(),
    core.std.BlankClip(width=1920,height=1080),
    core.std.BlankClip(width=1920,height=1080),
])

Same behaviour with split set_output calls.


  File "/usr/lib/python3.11/site-packages/vspreview/main/window.py", line 722, in switch_output
    graphics_view.current_scene.show()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vspreview/core/custom/graphicsview.py", line 161, in current_scene
    return self.graphics_scene.current_scene
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vspreview/core/custom/graphicsview.py", line 94, in current_scene
    return self.graphics_items[self.main.current_output.index]
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range```