SetupNewProfile is used to create new profiles when OBS is already
running, which requires resetting program state for the new profile.
This function cannot be used to create a new profile as a fallback
for either a non-existing profile or for a fresh installation of OBS
Studio because by the point this is called from OBSBasic::OBSInit, the
runtime modules are not loaded yet and as such no services exist.
Activating the new profile without a profile reset fixes this issue
as the reset will be done explicitly by OBSBasic::OBSInit later.
When a starting scene collection or profile is provided, current code
would crash as the corresponding collections and management functions
do not exist yet (they are tied to OBSBasic, which is not initialized
that early in the program execution).
This change moves the checks for command line arguments into OBSBasic
into the parts responsible for initializing profiles and scene
collections and check for arguments provided via command line there.
Scene collection names that are not considered "safe" by OBS Studio
get a changed JSON file name with incompatible characters replaced.
The refactored scene collection implementation uses the Load function to
either activate an existing scene collection or create a new one if it
does not exist.
The Load function however overwrote the scene collection name set in
the profile with its own variant based off the "safe" file name, which
created a mismatch with the code that created the collection data
model.
As the Load function is only called by ActivateSceneCollection (which
itself already sets the name and filename for the collection), removal
of this superfluous code in the Load function also fixes the issue.
This change enables loading scene collections from locations different
than OBS' own configuration directory.
It also rewrites profile management in the app to work off an in-memory
collection of profiles found on disk and does not require iterating
over directory contents for most profile interactions by the app.
This change enables loading profiles from locations different than
OBS' own configuration directory.
It also rewrites profile management in the app to work off an in-memory
collection of profiles found on disk and does not require iterating
over directory contents for most profile interactions by the app.
This introduces a split of the current single ConfigFile instance for
all configuration into two separate instances.
The app config instance contains system-wide settings that mainly
concern the working of the app itself, whereas the user config instance
contains settings actually exposed to the user for the configuration.
This adds scrollbars to the preview, so users can move around the
preview without using the spacebar + clicking.
Co-Authored-By: Clayton Groeneveld <19962531+cg2121@users.noreply.github.com>
Currently, when adding a filter to a source and then right-clicking it
or using the menu bar edit menu, it's not possible to copy the source's
filters. This is because the edit menu does not update on filter
changes.
Listening to the new global filters add/remove signal and updating the
edit menu will enable the copy option if a filter get added or disable
the option if the last filter gets removed.
Copy-Pasting filters on a scene or on a source via the audio mixer
context menu would not add an undo/redo action. This commit factors the
undo/redo logic out into a generic paste filters function that can be
used for pasting filters everywhere.
When clicking Grid Mode or List Mode from the context menu within the
Scenes list, whether or not Grid Mode is enabled persists between OBS
sessions. When clicking Grid or List from the View Menu, the setting
does not persist between OBS sessions. This seems to be a regression
from fc8c428521.
Previously, SceneTree's SetGridMode would set this config value. If the
intent is to not have SetGridMode directly set the config value, then
any function that calls SetGridMode other than the OBSBasic constructor
must instead set the config value.