Skip to content

Commit

Permalink
Handling -PassThru in filters
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating authored and StartAutomating committed May 29, 2023
1 parent 8532576 commit 8d951b7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Commands/Filters/Set-OBSSharpnessFilter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,15 @@ function Set-OBSSharpnessFilter {
filterKind = "Sharpness_filter"
filterSettings = $myParameterData
}
# If -SceneItemEnabled was passed,
if ($myParameters.Contains('SceneItemEnabled')) {
# propagate it to Add-OBSInput.
$addSplat.SceneItemEnabled = $myParameters['SceneItemEnabled'] -as [bool]
if ($MyParameters["PassThru"]) {
$addSplat.Passthru = $MyParameters["PassThru"]
if ($MyInvocation.InvocationName -like 'Add-*') {
Add-OBSSourceFilter @addSplat
} else {
$addSplat.Remove('FilterKind')
Set-OBSSourceFilterSettings @addSplat
}
return
}
# Add the input.
$outputAddedResult = Add-OBSSourceFilter @addSplat *>&1
Expand Down

0 comments on commit 8d951b7

Please sign in to comment.