UI: Add obs_frontend_add_scene_collection API call

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)

Closes obsproject/obs-studio#1232
This commit is contained in:
Ilya Melamed
2018-05-04 15:36:01 -07:00
committed by jp9000
parent 3eec139b2e
commit c768f703ad
6 changed files with 37 additions and 4 deletions

View File

@@ -167,6 +167,19 @@ struct OBSStudioAPI : obs_frontend_callbacks {
}
}
bool obs_frontend_add_scene_collection(
const char *name) override
{
bool success = false;
QMetaObject::invokeMethod(main,
"AddSceneCollection",
WaitConnection(),
Q_RETURN_ARG(bool, success),
Q_ARG(bool, true),
Q_ARG(QString, QT_UTF8(name)));
return success;
}
void obs_frontend_get_profiles(
std::vector<std::string> &strings) override
{