Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Under OBS 30.0.0 CreateScene reverses the order of sequentially added scenes #1181

Open
david672orford opened this issue Nov 16, 2023 · 3 comments

Comments

@david672orford
Copy link

Operating System Info

Ubuntu 22.04 LTS

Other OS

No response

OBS Studio Version

Other

OBS Studio Version (Other)

30.0.0

obs-websocket Version

5.1.0

OBS Studio Log URL

https://obsproject.com/logs/ZIUV78SDfp9RcGp3

OBS Studio Crash Log URL

No response

Expected Behavior

I expect that if I call CreateScene repeatedly to create a series of scenes they will appear in the OBS Studio scene list in the order they were added from top to bottom. I also expect that they will appear at the end of the list as they did under OBS Studio 29.x.

Current Behavior

Under OBS Studio 30.0.0 OBS-Websocket adds each scene after the currently active scene pushing the scene previously below the currently selected scene down to make room. As a result, if you add a series of scenes, they will end up in the reverse order.

Steps to Reproduce

  1. Start OBS Studio 30.0.0
  2. Call CreateScene to create a scene called "Scene A".
  3. Call CreateScene to create a scene called "Scene B".
  4. Observe that Scene A is appears in the scene list below Scene B.
  5. Rerun the test under OBS Studio 29.x
  6. Observe that Scene B is listed below Scene A as one would expect.

Anything else we should know?

In the long term CreateScene should take a parameter such as sceneIndex to specify the position at which the new scene is to be added.

@tt2468
Copy link
Member

tt2468 commented Dec 5, 2023

This is behavior working as intended. Scenes are now inserted at the current row instead of the top. See commit obsproject/obs-studio@5e198db for more info. Will not close this issue yet in case anyone cares to argue whether we should try to artificially preserve the old behavior.

@david672orford
Copy link
Author

I understand that this change was made deliberately to improve usability in the GUI. It is a good change. What I am suggesting is that this change should have been made only in the GUI and that its (presumably unintended) effect on the behavior of the CreateScene calls is a regression.

It now means when we run a script to add a series of scenes (videos and slides) during a live program they get splatted into the middle of the scene list totally disorienting the operator. And they are in reverse order! To the untrained eye it seems like everything has been scrambled.

I think the change in the behavior or CreateScene really is a regression and a serious one. I hope it can be fixed in the next point release.

@david672orford
Copy link
Author

david672orford commented Feb 5, 2024

I have been trying to figure out how to fix this problem in the hope of submitting a merge request. However, I have been unable to fully trace the path from CreateScene to OBSBasic::AddScene(). This is what I have so far:

  • OBS-Websocket's CreateScene calls
  • obs_scene_create() which calls
  • create_id("scene", name) which calls
  • obs_source_create() which calls
  • obs_source_create_internal() which calls
  • source_create() where I lose the track

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants