events(SceneCollectionChanged): add new scene collection name

This commit is contained in:
Stéphane Lepin
2020-11-27 16:46:33 +01:00
parent f7616ade1f
commit d87a7e896b

View File

@ -479,13 +479,17 @@ void WSEvents::OnSceneListChange() {
/** /**
* Triggered when switching to another scene collection or when renaming the current scene collection. * Triggered when switching to another scene collection or when renaming the current scene collection.
* *
* @return {String} `sceneCollection` Name of the new current scene collection.
*
* @api events * @api events
* @name SceneCollectionChanged * @name SceneCollectionChanged
* @category scenes * @category scenes
* @since 4.0.0 * @since 4.0.0
*/ */
void WSEvents::OnSceneCollectionChange() { void WSEvents::OnSceneCollectionChange() {
broadcastUpdate("SceneCollectionChanged"); OBSDataAutoRelease fields = obs_data_create();
obs_data_set_string(fields, "sceneCollection", obs_frontend_get_current_scene_collection());
broadcastUpdate("SceneCollectionChanged", fields);
OnTransitionListChange(); OnTransitionListChange();
OnTransitionChange(); OnTransitionChange();