ObsSetFilterState

Modify the visibility state of a filter

Signature

public void ObsSetFilterState(string scene, string filterName, int state, int connection = 0)

Parameters

scene
string required

The name of the scene in OBS

filterName
string required

The name of the filter in OBS Studio

state
int required

The new filter state

ValueDescription
0

Visible

1

Hidden

2

Toggle existing state

connection
int
Default:
0

Optional index of the OBS connection, defaults to the first connection.

Zero-indexed based on the order you see in Stream Apps > OBS Studio

e.g. The first client in the list is 0, the second client in the list is 1, and so on...

Return Type

void

Example

CPH.ObsSetFilterState(scene, filterName, state);
CPH.ObsSetFilterState(scene, filterName, state, connection);