Refactor
This commit is contained in:
parent
30bd30e038
commit
71c8ea7bbd
41 changed files with 375 additions and 284 deletions
16
OBS/ResolutionUtils/Py/OBS.py
Normal file
16
OBS/ResolutionUtils/Py/OBS.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from subprocess import Popen
|
||||
from pathlib import Path
|
||||
|
||||
cwd = Path(__file__).parent.parent.resolve()
|
||||
print(f"cwd={cwd}")
|
||||
|
||||
def on_event(event):
|
||||
if event == obspython.OBS_FRONTEND_EVENT_SCRIPTING_SHUTDOWN:
|
||||
proc = Popen(["MonitorSwitcher.exe", "-load:Normal.xml"], cwd=cwd, shell=True)
|
||||
_ = proc.communicate()
|
||||
|
||||
|
||||
def script_load(settings):
|
||||
obspython.obs_frontend_add_event_callback(on_event)
|
||||
proc = Popen(["MonitorSwitcher.exe", "-load:Recording.xml"], cwd=cwd, shell=True)
|
||||
_ = proc.communicate()
|
||||
BIN
OBS/ResolutionUtils/Py/__pycache__/OBS.cpython-310.pyc
Normal file
BIN
OBS/ResolutionUtils/Py/__pycache__/OBS.cpython-310.pyc
Normal file
Binary file not shown.
Loading…
Reference in a new issue