Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion frontend/components/SourceTreeItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,13 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_) : tre
OBSSourceAutoRelease s = obs_get_source_by_uuid(uuid.c_str());
obs_scene_t *sc = obs_group_or_scene_from_source(s);
obs_sceneitem_t *si = obs_scene_find_sceneitem_by_id(sc, id);
if (si)
if (si) {
obs_sceneitem_set_visible(si, val);
const char *item_name = obs_source_get_name(obs_sceneitem_get_source(si));
const char *name = obs_source_get_name(s);
blog(LOG_INFO, "User set sceneitem '%s' (%li) on scene '%s' to %s (undo_redo)",
item_name, (long)id, name, val ? "enabled" : "disabled");
}
};

QString str = QTStr(val ? "Undo.ShowSceneItem" : "Undo.HideSceneItem");
Expand All @@ -149,6 +154,10 @@ SourceTreeItem::SourceTreeItem(SourceTree *tree_, OBSSceneItem sceneitem_) : tre

QSignalBlocker sourcesSignalBlocker(this);
obs_sceneitem_set_visible(sceneitem, val);

const char *item_name = obs_source_get_name(obs_sceneitem_get_source(sceneitem));
blog(LOG_INFO, "User set sceneitem '%s' (%li) on scene '%s' to %s", item_name, (long)id, name,
val ? "enabled" : "disabled");
};

auto setItemLocked = [this](bool checked) {
Expand Down
9 changes: 8 additions & 1 deletion frontend/components/VisibilityItemWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ VisibilityItemWidget::VisibilityItemWidget(obs_source_t *source_)

setLayout(itemLayout);

connect(vis, &QCheckBox::clicked, this, [this](bool visible) { obs_source_set_enabled(source, visible); });
connect(vis, &QCheckBox::clicked, this, [this](bool visible) {
obs_source_set_enabled(source, visible);
const char *filter_name = obs_source_get_name(source);
obs_source_t *parent = obs_filter_get_parent(source);
const char *source_name = obs_source_get_name(parent);
blog(LOG_INFO, "User set filter '%s' on source '%s' to %s", filter_name, source_name,
visible ? "enabled" : "disabled");
});
}

void VisibilityItemWidget::OBSSourceEnabled(void *param, calldata_t *data)
Expand Down
6 changes: 4 additions & 2 deletions frontend/widgets/OBSBasic_SceneCollections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,27 +1049,29 @@ static void LogFilter(obs_source_t *, obs_source_t *filter, void *v_val)
{
const char *name = obs_source_get_name(filter);
const char *id = obs_source_get_id(filter);
const char *enabled = obs_source_enabled(filter) ? "" : "(disabled)";
int val = (int)(intptr_t)v_val;
string indent;

for (int i = 0; i < val; i++)
indent += " ";

blog(LOG_INFO, "%s- filter: '%s' (%s)", indent.c_str(), name, id);
blog(LOG_INFO, "%s- filter: '%s' (%s) %s", indent.c_str(), name, id, enabled);
}

static bool LogSceneItem(obs_scene_t *, obs_sceneitem_t *item, void *v_val)
{
obs_source_t *source = obs_sceneitem_get_source(item);
const char *name = obs_source_get_name(source);
const char *id = obs_source_get_id(source);
const char *enabled = obs_sceneitem_visible(item) ? "" : "(disabled)";
int indent_count = (int)(intptr_t)v_val;
string indent;

for (int i = 0; i < indent_count; i++)
indent += " ";

blog(LOG_INFO, "%s- source: '%s' (%s)", indent.c_str(), name, id);
blog(LOG_INFO, "%s- source: '%s' (%s) %s", indent.c_str(), name, id, enabled);

obs_monitoring_type monitoring_type = obs_source_get_monitoring_type(source);

Expand Down
Loading