diff --git a/obs/window-basic-filters.cpp b/obs/window-basic-filters.cpp index 2eeb437c2375ed9dd225656c83b59b232dde820a..f055d6168ba3bd6c75c12746643c98be94073d79 100644 --- a/obs/window-basic-filters.cpp +++ b/obs/window-basic-filters.cpp @@ -201,6 +201,16 @@ void OBSBasicFilters::RemoveFilter(OBSSource filter) } } + const char *filterName = obs_source_get_name(filter); + const char *sourceName = obs_source_get_name(source); + if (!sourceName || !filterName) + return; + + const char *filterId = obs_source_get_id(filter); + + blog(LOG_INFO, "User removed filter '%s' (%s) from source '%s'", + filterName, filterId, sourceName); + main->SaveProject(); } @@ -373,6 +383,12 @@ void OBSBasicFilters::AddNewFilter(const char *id) obs_source_t *filter = obs_source_create(id, name.c_str(), nullptr, nullptr); if (filter) { + const char *sourceName = obs_source_get_name(source); + + blog(LOG_INFO, "User added filter '%s' (%s) " + "to source '%s'", + name.c_str(), id, sourceName); + obs_source_filter_add(source, filter); obs_source_release(filter); } @@ -670,6 +686,11 @@ void OBSBasicFilters::FilterNameEdited(QWidget *editor, QListWidget *list) QTStr("NoNameEntered.Text")); } } else { + const char *sourceName = obs_source_get_name(source); + + blog(LOG_INFO, "User renamed filter '%s' on source '%s' to '%s'", + prevName, sourceName, name.c_str()); + listItem->setText(QT_UTF8(name.c_str())); obs_source_set_name(filter, name.c_str()); } diff --git a/obs/window-basic-main-transitions.cpp b/obs/window-basic-main-transitions.cpp index 212b3162e4fa2f95dea5c34ae994a8a71f36e8d7..1467866a6045266e8790c84e1d672c68c6f8770d 100644 --- a/obs/window-basic-main-transitions.cpp +++ b/obs/window-basic-main-transitions.cpp @@ -562,6 +562,11 @@ void OBSBasic::SetCurrentScene(obs_source_t *scene, bool force) } UpdateSceneSelection(scene); + + bool userSwitched = (!force && !disableSaving); + blog(LOG_INFO, "%s to scene '%s'", + userSwitched ? "User switched" : "Switched", + obs_source_get_name(scene)); } void OBSBasic::CreateProgramDisplay() diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index 0211a8eae8d23d5b7480897f2e9c86a88b61a1b3..5b8b654ab829e128604f0fdbc42531fb258d508a 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -1674,6 +1674,12 @@ void OBSBasic::AddScene(OBSSource source) }, &addSceneItem); SaveProject(); + + if (!disableSaving) { + obs_source_t *source = obs_scene_get_source(scene); + blog(LOG_INFO, "User added scene '%s'", + obs_source_get_name(source)); + } } void OBSBasic::RemoveScene(OBSSource source) @@ -1699,6 +1705,11 @@ void OBSBasic::RemoveScene(OBSSource source) } SaveProject(); + + if (!disableSaving) { + blog(LOG_INFO, "User Removed scene '%s'", + obs_source_get_name(source)); + } } void OBSBasic::AddSceneItem(OBSSceneItem item) @@ -1709,6 +1720,15 @@ void OBSBasic::AddSceneItem(OBSSceneItem item) InsertSceneItem(item); SaveProject(); + + if (!disableSaving) { + obs_source_t *sceneSource = obs_scene_get_source(scene); + obs_source_t *itemSource = obs_sceneitem_get_source(item); + blog(LOG_INFO, "User added source '%s' (%s) to scene '%s'", + obs_source_get_name(itemSource), + obs_source_get_id(itemSource), + obs_source_get_name(sceneSource)); + } } void OBSBasic::RemoveSceneItem(OBSSceneItem item) @@ -1723,6 +1743,16 @@ void OBSBasic::RemoveSceneItem(OBSSceneItem item) } SaveProject(); + + if (!disableSaving) { + obs_scene_t *scene = obs_sceneitem_get_scene(item); + obs_source_t *sceneSource = obs_scene_get_source(scene); + obs_source_t *itemSource = obs_sceneitem_get_source(item); + blog(LOG_INFO, "User Removed source '%s' (%s) from scene '%s'", + obs_source_get_name(itemSource), + obs_source_get_id(itemSource), + obs_source_get_name(sceneSource)); + } } void OBSBasic::UpdateSceneSelection(OBSSource source) @@ -2231,6 +2261,8 @@ void OBSBasic::SourceRenamed(void *data, calldata_t *params) "RenameSources", Q_ARG(QString, QT_UTF8(newName)), Q_ARG(QString, QT_UTF8(prevName))); + + blog(LOG_INFO, "Source '%s' renamed to '%s'", prevName, newName); } void OBSBasic::DrawBackdrop(float cx, float cy)