AcademySoftwareFoundation / xstudio

xSTUDIO is a modern, high performance and feature rich playback and review application designed for organisations and individuals in the post production, VFX and Animation industries.
Apache License 2.0
640 stars 82 forks source link

Playlist demo code not behaving as expected #33

Open edi-spaghetti opened 1 year ago

edi-spaghetti commented 1 year ago

Following the demo code from this tutorial; file:///home/centos/xstudio/build/bin/docs/user_docs/appendix/python_scripting.html

I have minorly adapted it to run media on our own system like so;

from xstudio.connection import Connection
from xstudio.core import MediaType, FrameRate

XSTUDIO = Connection(auto_connect=True)

frames = '/home/centos/images/sequence/test.####.exr'
frames2 = '/home/centos/images/sequence2/test.####.exr'
playlist_uuid, playlist = XSTUDIO.api.session.create_playlist(name='Test')
XSTUDIO.api.session.set_on_screen_source(playlist)
media = playlist.add_media(frames)
media2 = playlist.add_media(frames2)
playhead = playlist.create_playhead()
playhead_selector = playlist.playhead_selection
playhead_selector.set_selection([media.uuid, media2.uuid])
playhead.playing = True

With an xstudio player already launched from another shell and running the above code, I would expect a playlist with two images sequences to be playing one after the other. However what I actually see is just the first media item playing. It seems to be coming from the Panels > Settings > Begin Playback on Startup option though, because with that unchecked then the first media item is loaded in the viewport, but isn't playing.

In fact, I can't seem to find any UI options that allow me to play media items sequentially.

What needs to be changed in this demo code to view multiple media items? To be clear, both the items are loaded in the playlist, and I can manually swap to each of them in the xstudio UI, it just seems to be playback is not what I was expecting.

alatdneg commented 1 year ago

This was originally supported, but I think the backend changed, and the python code hadn't been updated. I'll log a ticket internally to get this fixed.

edi-spaghetti commented 1 year ago

OK, do I need to wait a new release and rebuild then? Or is this functionality achievable a different way?