def script_update(settings):
    global INTERVAL_LIST

    if obs.obs_data_get_bool(settings, "enabled"):
        obs.obs_hotkey_register_frontend("Space",
                                         "enable_space_to_start_script",
                                         space_callback)

    elif not obs.obs_data_get_bool(settings, "enabled"):
        obs.obs_hotkey_unregister(space_callback)

    path = obs.obs_data_get_string("interval_path")

    if path != "" and path.endswith(".txt"):
        with open(path, "r") as f:
            line = f.readline()
            while line != "":
                raw = line.split(":")
                if (len(raw) == 3):
                    hour = int(raw[0])
                    minute = int(raw[1])
                    second = int(raw[2])
                    milisec = (hour * 3600 + minute * 60 + second) * 1000
                    INTERVAL_LIST.append(milisec)
                line = f.readline()
def script_unload():
    obs.obs_hotkey_unregister(toggle_zoom)
    obs.obs_hotkey_unregister(toggle_follow)
示例#3
0
 def deregister_hotkey(self):
     obs.obs_hotkey_unregister(self.callback)
示例#4
0
def script_unload():
	obs.obs_frontend_remove_event_callback(on_event)
	for hot_key in hot_keys:
		obs.obs_hotkey_unregister(hot_key['callback'])
示例#5
0
def script_unload():
    config.stopThread = True
    print("closed")
    time.sleep(0.1)
    obs.obs_hotkey_unregister(displayNextHotkey)
    obs.obs_hotkey_unregister(displayPrevHotkey)
def script_unload():
    """
    Run when the script is about to be unloaded.
    """
    obs.obs_hotkey_unregister(handleORLY)
示例#7
0
def script_unload():
    for function in scriptSettings['tweenerFunctions']:
        obs.obs_hotkey_unregister(function)
    obs.obs_hotkey_unregister(printSceneData)
    obs.obs_hotkey_unregister(printBaseData)
    obs.obs_data_release(obsSettings)