When using certain transition types repeated scene switches to the same target scene will restart a transition that is already in progress.
This can be avoided by using obs_frontend_get_current_scene() instead of switcher->currentScene during the check if the target scene is already active.
obs_frontend_get_current_scene() will already point to the new scene, even if the transition is still in progess, while switcher->currentScene will only be updated once a transition is finished.
The idea is to avoid repeated calls to the same functions which lead to
the same outcome, but just calling them once in the precondition checks.
For now move repeated calls of GetCurrentWindowTitle() and ignoreWindow
checks to this function.
Wait scene was not set while waiting for scene changes on the random
tab.
If wait scene was ever set by other means (sequence) the scene switcher
would immediately wake up as the wait scene is not the expected value.
This change is to avoid spamming the connected clients with scene change
messages which might not even do anything as the scene change already
took place.
Additionally it allows scene switch messages to be sent by just calling
the switchScene() function.
If a duration for a transition is used that is longer than the scene
switcher check interval it could happen that the "incorrect" previous
scene could be chosen for uninterruptible scene sequences, as at the
time the sequence check was preformed the "previous scene" variable
was not yet updated as the transition was still ongoing.
* Adjust switchScene() signature to support adjustActiveTransitionType and verbose parameters and only change the transition type if adjustActiveTransitionType, otherwise rely on transition overrides
* Add new adjustActiveTransitionType checkbox
* save and load adjustActiveTransitionType
* Add check to either enable transition type change or use of transition
overrides
* Add locale
* Adjust layout and locale
The network tab allows you to open a web-socket or connect to web-socket to synchronize the active scene between two or more instances of OBS.
The functionality is mostly based on https://github.com/Palakis/obs-websocket.
An OBS instance running a server will send its currently active scene to all connected clients on scene change.
By default all scene switches will trigger a message to be sent to all clients, but you also have the option to limit sending these messages only when an automated scene change is triggered by the advanced scene switcher.
Extending a scene sequence allows for more complex switching setups, but should also simplify some setups.
Sequences like "A -> B -> A -> C", which previously were only possible by creating a copy of A, can now be specified in a single entry.
To extend a sequence either select the sequence you want to modify and click the extend sequence button or simply double click the entry.
* move addSelectionEntry to AdvSceneSwitcher class and allow select entry to be 'selectable'
Can be useful for implementing 'current transition' as an option or just allowing to select 'None' for screen region ignore
* Add option to select 'current transition'
* use GetWeakSourceName() where possible
* add getCurrentScene() to scene group
* silence OBS warning log and fix typo in audio switch
* extract showing initial status of widgets to function in generic switch
* adapt UI for i18n
* add placeWidgets() helper function to ease translation
* add hint about Transition Matrix plugin on Transition tab
* translate
* rework UI of file tab
* write status of plugin to scene info file
A deadlock could occur if the save callback is called just before the frontend set functions are used.
Thus unlock() is necessary before setting current scene or transition.
(e.g. if start recording is activated just before using the above functions, as this apparently triggers a save() call)
* rework general tab UI
* rework audio tab UI
* rework media tab UI
* rework time tab UI
* rework random tab UI
* rework window tab UI
* rework sreen region tab UI
* rework sequence tab UI
* rework transition tab UI
* adjust log messages to new format
* fix include path and warning
* highlight widgets to guide users (can be disabled)
* add helper frame for screen region tab
* rename main SceneSwitcher widget to AdvSceneSwitcher to resolve naming conflicts with the frontend tools on certain platforms (e.g. Debian 10)
* add media state 'any'
* adjust media switch handling to support vlc source
* move definitions of switcher structs to separate files
* remove useless comment
* cleanup and silence warnings
* add generic switch
* removed delay on main thread startup as it served no purpose
* clean up ultility.hpp
* do not save switchStr to file as it could cause issues when scenes are renamed
* rename sceneRoundTrip to sceneSequence
* add option to switch if window is maximized to title tab
use double internally instead of two ints
rework save / load to file to reuse existing functionality
add option to select between seconds / minutes / hours