File tree Expand file tree Collapse file tree
Types/OBS.GetSceneItemList.Response Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ $cropTable = [Ordered ]@ {
2+ cropBottom = 0
3+ cropLeft = 0
4+ cropRight = 0
5+ cropTop = 0
6+ }
7+
8+ $MatchingKey = [Regex ]::new(" (?>$ (
9+ @ ($cropTable.Keys -join ' |'
10+ ' |'
11+ $cropTable.Keys -replace ' ^crop' -join ' |' ) -join ' '
12+ ) )" , ' IgnoreCase' )
13+
14+
15+ $currentKey = ' '
16+ foreach ($arg in $args ) {
17+ if ($arg -is [Collections.IDictionary ]) {
18+ foreach ($keyValue in $arg.GetEnumerator ()) {
19+ if ($keyValue.Key -match $MatchingKey ) {
20+ $cropTable [$matches.0 -replace ' ^crop' -replace ' ^' , ' crop' ] = $keyValue.Value
21+ }
22+ }
23+ }
24+ if ($arg -is [string ] -and $arg -match $MatchingKey ) {
25+ $currentKey = $matches.0 -replace ' ^crop' -replace ' ^' , ' crop'
26+ }
27+ if ($arg -is [int ] -and $currentKey ) {
28+ $cropTable [$currentKey ] = $arg
29+ $currentKey = ' '
30+ }
31+ }
32+
33+ $this | Set-OBSSceneItemTransform - SceneItemTransform $cropTable
You can’t perform that action at this time.
0 commit comments