Hi there,
I'm having problems updating for example a button inside a script depending on whether in was clicked or not.
This code sets the stop button to disabled on default just fine. But when I want to change anything after the loading of the script it doesnt work.
Can anyone give a clue?
Thanks in advance
I'm having problems updating for example a button inside a script depending on whether in was clicked or not.
This code sets the stop button to disabled on default just fine. But when I want to change anything after the loading of the script it doesnt work.
Can anyone give a clue?
Thanks in advance
Python:
started = False
def script_properties():
global started
props = obs.obs_properties_create()
start_button = obs.obs_properties_add_button(props, "start", "Start", start_pressed)
stop_button = obs.obs_properties_add_button(props, "stop", "Stop", stop_pressed)
obs.obs_property_set_enabled(stop_button, False)
return props
def stop_pressed(props,settings):
global started
started = False
obs.obs_property_set_enabled(start_button, True)
obs.obs_property_set_enabled(stop_button, False)
def start_pressed(props,settings):
global started
started = True
obs.obs_property_set_enabled(start_button, False)
obs.obs_property_set_enabled(stop_button, True)