Skip to content

Commit

Permalink
fix: OBS.Input.Disable/EnableAllFilter(s) ( Fixes #183 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Feb 13, 2024
1 parent cfd7330 commit 993a2f1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Types/OBS.Input/Alias.psd1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@{
SourceName = 'inputName'
EnableAllFilters = 'EnableAllFilter'
DisableAllFilters = 'DisableAllFilter'
}
16 changes: 16 additions & 0 deletions Types/OBS.Input/DisableAllFilter.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<#
.SYNOPSIS
Quickly disables all filters
.DESCRIPTION
Quickly disables all filters, except for a list of provided names
#>
param(
# A list of filter names to leave disabled.
[string[]]
$ExceptFilterName
)

$this.Filters |
Where-Object FilterName -NotIn $ExceptFilterName |
Foreach-Object { $_.Enable($true) } |
Send-OBS
16 changes: 16 additions & 0 deletions Types/OBS.Input/EnableAllFilter.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<#
.SYNOPSIS
Quickly enables all filters
.DESCRIPTION
Quickly enables all filters, except for a list of provided names
#>
param(
# A list of filter names to leave disabled.
[string[]]
$ExceptFilterName
)

$this.Filters |
Where-Object FilterName -NotIn $ExceptFilterName |
Foreach-Object { $_.Enable($true) } |
Send-OBS

0 comments on commit 993a2f1

Please sign in to comment.