Skip to content

Commit 52a768d

Browse files
StartAutomatingStartAutomating
authored andcommitted
Add-OBS*Source Commands: Supporting -SceneItemEnabled (Fixes #70)
1 parent 925c14a commit 52a768d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Commands/Sources/Add-OBSDisplaySource.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ dynamicParam {
123123
Where-Object SourceName -eq $myParameters["Name"] |
124124
Remove-OBSInput -InputName { $_.SourceName }
125125
}
126-
126+
# If -SceneItemEnabled was passed,
127+
if ($myParameters.Contains('SceneItemEnabled')) {
128+
# propagate it to Add-OBSInput.
129+
$addSplat.SceneItemEnabled = $myParameters['SceneItemEnabled'] -as [bool]
130+
}
127131
$outputAddedResult = Add-OBSInput @addObsInputParams
128132
if ($outputAddedResult) {
129133
Get-OBSSceneItem -sceneName $myParameters["Scene"] |

0 commit comments

Comments
 (0)