This replaces the previous Open File dialog for importing collections
with a window for importing many collections at once, based on the remux
window, along with support for importing from OBS Classic, XSplit
Broadcaster and from Streamlabs' fork. This also translates sources
between OSes that Studio supports.
In the current user interface code, OBSBasic::AddSceneCollection has a
qname parameter to allow explicitly specifying a name, but that code
path is unused in the UI code itself, and qname is typically empty. If
qname is not empty, it does not properly generate a file name associated
with that specified scene collection name. This fixes that issue.
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed. Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
Allows the ability to add a new scene collection via the frontend API.
Blocks until the scene collection has been successfully added to ensure
synchronization between the calling thread and the UI thread.
(Jim: Added detailed description to commit message)
Closesobsproject/obs-studio#1232
Due to the commit 34c14829b6, source loading is now deferred
to after OBSInit(), which would cause saved scene/source projectors to
no longer load on startup. This fixes that issue by moving the
OpenSavedProjectors call to OBSBasic::Load().
This code was originally tested with visual C, which supports using
__FUNCTION__ in this way. These potential error cases shouldn't
technically happen anyway, so just remove __FUNCTION__.
OBS assumes the name of the imported json file is also the name
of the scene collection, if the filename is different this can result
in duplicate scene collections after importing.
Closesjp9000/obs-studio#1177
When running the program for the first time, no scene collections will
show up in the scene collection menu. This changes it to forcibly save
the first scene collection on the first run of the program, and then
re-enumerates the list to ensure it's listed.
This commit fixes a bug that would cause the frontend API function
obs_frontend_set_current_scene_collection to never be successful. Due
to the bug, the following null pointer check would always fail, so the
action would never be triggered.
Modification by Jim: Instead of fixing the typo that caused this to
occur, make it so both scene collection menus and profile menus both use
"file_name" consistently.
Closesjp9000/obs-studio#712