Skip to content

Commit 925c14a

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

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Commands/Sources/Add-OBSColorSource.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ dynamicParam {
136136
Where-Object SourceName -eq $myParameters["Name"] |
137137
Remove-OBSInput -InputName { $_.SourceName }
138138
}
139+
# If -SceneItemEnabled was passed,
140+
if ($myParameters.Contains('SceneItemEnabled')) {
141+
# propagate it to Add-OBSInput.
142+
$addObsInputParams.SceneItemEnabled = $myParameters['SceneItemEnabled'] -as [bool]
143+
}
139144
$outputAddedResult = Add-OBSInput @addObsInputParams
140145
if ($outputAddedResult) {
141146
Get-OBSSceneItem -sceneName $myParameters["Scene"] |

0 commit comments

Comments
 (0)