OBS_FRONTEND_EVENT_FINISHED_LOADING not available?

Flynn Church

New Member
OBS Studio 25.0.8/64-bit, latest version, Windows 10.

Trying to work up a Python script to set a particular scene active every time OBS is started, and it seems it's necessary to wait until everything's loaded before running that part (otherwise the scenes list is empty when it's executed). Going by the API list, OBS_FRONTEND_EVENT_FINISHED_LOADING seems like the right event to watch for, but it's unavailable in 25.0.8, along with a number of other events that are listed in the API and some versions of obs-frontend-api.h.

Github's current version is missing:
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTING
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTED
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPING
OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPED
OBS_FRONTEND_EVENT_STUDIO_MODE_ENABLED
OBS_FRONTEND_EVENT_STUDIO_MODE_DISABLED
OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED
OBS_FRONTEND_EVENT_SCENE_COLLECTION_CLEANUP
OBS_FRONTEND_FINISHED_LOADING
OBS_FRONTEND_EVENT_RECORDING_PAUSED
OBS_FRONTEND_EVENT_RECORDING_UNPAUSED

I'm not sure if this was some sort of deliberate decision or if I'm misunderstanding something about the system here. Have reviewed documentation, not finding anything of help.

No log attached as it's a script execution error:
11:49:32.627: [Python] Python failure in frontend_event_callback:353:
11:49:32.630: [Python: filechange test.py] Traceback (most recent call last):
11:49:32.632: [Python: filechange test.py] File "C:/python\filechange test.py", line 39, in on_event
11:49:32.634: [Python: filechange test.py] if (event == obs.OBS_FRONTEND_FINISHED_LOADING):
11:49:32.637: [Python: filechange test.py] AttributeError: module 'obspython' has no attribute 'OBS_FRONTEND_FINISHED_LOADING'
 

upgradeQ

Member
It is mistake in docs, fixed by this commit, the correct one is - OBS_FRONTEND_EVENT_FINISHED_LOADING.
You can get latest version of docs by searching in github repo
https://github.com/obsproject/obs-studio/search?q={search_term}+path%3Adocs%2Fsphinx&type=code
 
Top