Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Warmuptill

Active Member
Hello, thank you for the amazing plugin! I am wondering, how are the If Conditions evaluated in macros when there are multiple? Is there an order of precedence, like AND gets evaluated before OR? It is very confusing without a way to group together conditions like you can in a programming language with parenthesis.

For example, I believe i tried something like below but it did not work at all as I would hope:

If scene = intro
AND File contents matches ABC
OR File contents matches DEF
OR File contents matches GHI
Th conditions are evaluated in order from top to bottom so your example would evaluate to:
((((scene == intro) && File matches ABC) || File matches DEF) || File matches GHI)
Note that you can also nest other macros' conditions inside a macro to simplify your setups.
For example you can set one macro to just check the file content:
File Content Macro: (((File matches ABC) || File matches DEF) || File matches GHI)
And then use this condition in another macro:
Example Macro: ((scene == intro) && "File Content Macro" evaluates to true)

NestedMacro.PNG

I assume something similar to this is probably what you tried to achieve.
Let me know if you have questions! :)
 

petjo10

Member
Ah I see.

In theory you could set up macros to import the plugin settings from a specified path every few minutes, ("Timer condition" and "Plugin state" action).
Then you could directly modify the plugin's settings file to achieve what you are looking to to.

However, I am not sure how practical that approach would be as the settings file can be rather complex and if you mess up the syntax no new settings will be loaded.
If you want to have a look at the settings file format you can save your current settings to a file using the "export settings" button on the General tab.

But if you are already messing with manually modifying json files it is probably easier to just try to set up a simple script as suggested by @khaver.

Would it be possible to add a import fuction to import a textfile with the "right" time?
1645048058895.png
 

Warmuptill

Active Member
I don't have that folder?View attachment 80358
Make sure you are not looking into your user's home directory Library folder, but the system's Library folder.

Would it be possible to add a import fuction to import a textfile with the "right" time?
View attachment 80341
I want to focus most of my development time on the macro tab.
And this is a very niche use case so I don't think many users will find this functionality to be helpful.
Even for your described purpose it would not really save much time as you would still have to manually press this button every few minutes to make sure you are always up to date.
So I doubt that I will get around to implementing such a functionality.
I am sorry to disappoint, but I hope you understand. :(

I would suggest to instead look into setting up a custom basic script to achieve what you are looking to do.
 

Bygrilinho

New Member
Hello there!
Could you make it possible to transition to the same scene in the Switch scene action? Would be very useful for showing/hiding items in studio mode, currently I'm hiding, setting it as preview and swaping preview/program. Making this possible would simplify things!

Also, is it possible to automate renaming scenes? I don't need the macros to adjust automatically, it's simply to help with a remote control program I'm using, more of a visual thing, not really important. Yeah it's pretty stupid but asking won't hurt I guess :P
 

Warmuptill

Active Member
Could you make it possible to transition to the same scene in the Switch scene action? Would be very useful for showing/hiding items in studio mode, currently I'm hiding, setting it as preview and swaping preview/program. Making this possible would simplify things!
I hope I understood your request correctly.
PreviewCurrentScene.PNG

I now enabled selecting "Current scene" (and "Previous scene") as a target for the "Switch preview scene" action:

A build with this change can be found here in a few minutes:
Note that you have to be logged into GitHub to be able to download the build.

Also, is it possible to automate renaming scenes? I don't need the macros to adjust automatically, it's simply to help with a remote control program I'm using, more of a visual thing, not really important. Yeah it's pretty stupid but asking won't hurt I guess :P
At the moment I have not planned on adding something like this - not sure how much use it would find.
But thanks for the suggestion.
 

RoGra

New Member
I got around to working on your request.
I modified the date condition to also support switching based on just the day of the week and a time as shown in your screenshot.
View attachment 80009
You can switch between the old, more detailed view and this new one by pressing the "Show advanced settings" button.

A build with this change should be available here in a few minutes:
(Note that you have to be logged into GitHub to be able to download it - let me know if that is an issue)

Let me know if everything works as expected! :)

Thank you, working as expected!
 

Bygrilinho

New Member
I hope I understood your request correctly.
View attachment 80625
I now enabled selecting "Current scene" (and "Previous scene") as a target for the "Switch preview scene" action:

A build with this change can be found here in a few minutes:
Note that you have to be logged into GitHub to be able to download the build.


At the moment I have not planned on adding something like this - not sure how much use it would find.
But thanks for the suggestion.
Sorry, I should have worded it better... Let's say I have a scene called "Scene A". Scene A is already in program view.
Suppose I used a macro to hide some text, but since I'm in studio mode it doesn't hide immediately.

So I make it "switch" to the same scene, like this:
1645397041380.png

However, the transition never happens because I'm already in the scene

I want the transition to happen even if I'm already in the scene, so I can make changes inside the same scene while in studio mode.

At the moment I have not planned on adding something like this - not sure how much use it would find.
But thanks for the suggestion.
That's fair. If you're curious, I'm using an Android app to control my stream, and I can set icons for scenes. The icons are saved based on the scene name. I wanted to make a toggle-like scene, and make the icon switch accordingly (show on/off)
1645397426021.png

Like I said, pretty stupid, do as you please :)
 

lindenkron

Member
Sorry, I should have worded it better... Let's say I have a scene called "Scene A". Scene A is already in program view.
Suppose I used a macro to hide some text, but since I'm in studio mode it doesn't hide immediately.

So I make it "switch" to the same scene, like this:
View attachment 80650
However, the transition never happens because I'm already in the scene

I want the transition to happen even if I'm already in the scene, so I can make changes inside the same scene while in studio mode.


That's fair. If you're curious, I'm using an Android app to control my stream, and I can set icons for scenes. The icons are saved based on the scene name. I wanted to make a toggle-like scene, and make the icon switch accordingly (show on/off)
View attachment 80652
Like I said, pretty stupid, do as you please :)
This entire post confuses me.

If I go to Scene A in my OBS and have a text file showing. I enable Studio mode. Change to another scene, then use my stream deck to hide that text => It hides it immediately.
 

Bygrilinho

New Member
This entire post confuses me.

If I go to Scene A in my OBS and have a text file showing. I enable Studio mode. Change to another scene, then use my stream deck to hide that text => It hides it immediately.
But I DON'T change to another scene.
That's my whole point, I want the transition to happen, because while it hides immediately in PREVIEW, I still need to transition to PROGRAM
 

lindenkron

Member
But I DON'T change to another scene.
That's my whole point, I want the transition to happen, because while it hides immediately in PREVIEW, I still need to transition to PROGRAM
That's not how transitions work. They go from A > B.

So is what you're saying that you want to hide your screen while you enable or disable a text?

In that case, could you not just put something on your screen (like the transition) in a Media Source file, drag it to the top of the scene (in sources) and enable that? Then it would play, and you could do whatever you want with text files.
 

AaronD

Active Member
That's not how transitions work. They go from A > B.

So is what you're saying that you want to hide your screen while you enable or disable a text?

In that case, could you not just put something on your screen (like the transition) in a Media Source file, drag it to the top of the scene (in sources) and enable that? Then it would play, and you could do whatever you want with text files.

I think he wants to show/hide sources in a scene while the scene is live. When he tries that, it works in Preview, but Program (and the audience) stays as it is. In order to make that change visible to the audience, he has to change scenes ("transition"), even if it's the same scene. (select and fire scene A, while scene A is already live)

Mine does that too, by the way. I have the same text overlay on at least 3 different scenes, and hotkeys to show/hide it. If I show one of those scenes to the audience (Program), cue up the same scene again in Preview, and use that hotkey; the Preview changes, but not the Program/audience. If I then fire ("transition to") the Previewed scene, which is technically the same scene as Program, *then* the overlay shows/hides to the audience.

It seems like this is not really a problem with Adv-SS, but rather a (sometimes useful) quirk in OBS itself. (a "be careful of what the audience sees, and allow for a final check and correction before committing," sort of mentality) There might be some API tricks to get around it though, that Adv-SS can use; or maybe a function that just does this and is only accessible from the API and not the UI.
 

Warmuptill

Active Member
Sorry, I should have worded it better... Let's say I have a scene called "Scene A". Scene A is already in program view.
Suppose I used a macro to hide some text, but since I'm in studio mode it doesn't hide immediately.

So I make it "switch" to the same scene, like this:
View attachment 80650
However, the transition never happens because I'm already in the scene

I want the transition to happen even if I'm already in the scene, so I can make changes inside the same scene while in studio mode.


That's fair. If you're curious, I'm using an Android app to control my stream, and I can set icons for scenes. The icons are saved based on the scene name. I wanted to make a toggle-like scene, and make the icon switch accordingly (show on/off)
View attachment 80652
Like I said, pretty stupid, do as you please :)
I see what you mean.
A build where switching to the already active scene is enabled (while studio mode is active) can be found here in a few minutes:
Let me know if everything works as expected.

Just in case you are not aware and it might be useful for your setup:
A separate action exists to allow you to swap the preview and progam scene.
Swap.PNG
 

BeoMulf

New Member
Hi, thanks for making such an awesome plugin! I have a VLC source playlist of unknown length (some amount of game highlights from a recent match) - is there a way to transition to a different scene just before the last video in the playlist ends? I understand the media transition has a "played to end" source, but that leaves a brief instant of black screen before the stinger rolls in. I would ideally set the transition to happen 500ms or something prior to the final video in the playlist finishing playing.
 

Warmuptill

Active Member
Hi, thanks for making such an awesome plugin! I have a VLC source playlist of unknown length (some amount of game highlights from a recent match) - is there a way to transition to a different scene just before the last video in the playlist ends? I understand the media transition has a "played to end" source, but that leaves a brief instant of black screen before the stinger rolls in. I would ideally set the transition to happen 500ms or something prior to the final video in the playlist finishing playing.
Glad you like the plugin!
I am afraid I don't think this is possible at the moment.
Last time I checked there was no OBS API to query the total length of a playlist.
But as you were not the first one to request this functionality in regards to playlists of unknown length I will try to see if I can maybe find a workaround.
I can't promise a solution soon though.
 

BeoMulf

New Member
Glad you like the plugin!
I am afraid I don't think this is possible at the moment.
Last time I checked there was no OBS API to query the total length of a playlist.
But as you were not the first one to request this functionality in regards to playlists of unknown length I will try to see if I can maybe find a workaround.
I can't promise a solution soon though.
That makes sense! I figured it wasn't hooked out, so I guess I just need to manually do it. Is there a way to prevent the black screen that pops up as the playlist ends? It doesn't happen if the playlist just runs to end, only shows up with advanced scene switcher active
 

Warmuptill

Active Member
That makes sense! I figured it wasn't hooked out, so I guess I just need to manually do it. Is there a way to prevent the black screen that pops up as the playlist ends? It doesn't happen if the playlist just runs to end, only shows up with advanced scene switcher active
Hm, I am a bit surprised by that.
The plugin should not really affect the video output of the media source in any way, so I am not sure why the black screen is happening only when using the advanced scene switcher.
What is displayed instead of the black screen when not using the plugin?
What exactly have you configured in the advanced scene switcher in regards to that media source?
 
Top