Esempio n. 1
0
def timer_media_trigger_settings(props, index: int):
    lang = gettext.translation("racetime-obs",
                               localedir=os.environ['LOCALEDIR'])
    _ = lang.gettext

    obs.obs_properties_add_float_slider(props, f"trigger_timer_time_#{index}",
                                        _("Start playing at "), -15.0, 60, 0.1)
Esempio n. 2
0
def script_properties():
    #global props
    props = obs.obs_properties_create()

    text1 = obs.obs_properties_add_list(props, "source 1", "Text Source 1", obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)
    text2 = obs.obs_properties_add_list(props, "source 2", "Text Source 2", obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)

    background = obs.obs_properties_add_list(props, "background", "Background for Transition", obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)

    obs.obs_property_list_add_string(text1, "None", "")
    obs.obs_property_list_add_string(text2, "None", "")
    obs.obs_property_list_add_string(background, "None", "")

    sources = obs.obs_enum_sources()
    if sources is not None:
        for source in sources:
            source_id = obs.obs_source_get_id(source)
            if source_id == "text_gdiplus" or source_id == "text_ft2_source" or source_id == "text_gdiplus_v2":
                name = obs.obs_source_get_name(source)
                obs.obs_property_list_add_string(text1, name, name)
                obs.obs_property_list_add_string(text2, name, name)
            if source_id == "color_source":
                name = obs.obs_source_get_name(source)
                obs.obs_property_list_add_string(background, name, name)
    obs.source_list_release(sources)

    obs.obs_properties_add_float_slider(props, "transition_time", "Transition time (S)", 0.1, 5.0, 0.1)

    obs.obs_properties_add_text(props, "host", "Host ip", obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_int(props, "port", "Port", 1, 100000, 1)
    obs.obs_properties_add_text(props, "password", "Password", obs.OBS_TEXT_PASSWORD)
    obs.obs_properties_add_button(props, "connect_button", "Connect to server", connect_button_clicked)
    obs.obs_properties_add_bool(props, "autoconnect", "Automatically try to (re)connect to server")

    return props
Esempio n. 3
0
def script_properties():

    props = obs.obs_properties_create()

    obs.obs_properties_add_list(props, "files_path", "Overlay files path",
                                obs.OBS_COMBO_TYPE_EDITABLE,
                                obs.OBS_COMBO_FORMAT_STRING)

    obs.obs_properties_add_list(props, "league_folder", "Auto-League Folder",
                                obs.OBS_COMBO_TYPE_EDITABLE,
                                obs.OBS_COMBO_FORMAT_STRING)

    obs.obs_properties_add_button(props, "start_button", "Start Script",
                                  start_script)

    obs.obs_properties_add_float_slider(props, 'delay', 'Goal delay', 0, 5,
                                        0.05)
    obs.obs_properties_add_float_slider(props, 'end_delay', 'End delay', 0, 20,
                                        0.5)

    obs.obs_properties_add_button(props, "reset_button", "Reset Bar",
                                  reset_bar)

    obs.obs_properties_add_button(props, "setup_button", "Setup", auto_setup)

    #scriptpath = script_path()

    return props
Esempio n. 4
0
def script_properties():
    props = obs.obs_properties_create()

    obs.obs_properties_add_int(props, "interval", "Update Interval (ms)", 16,
                               300, 1)
    p = obs.obs_properties_add_list(
        props,
        "source",
        "Select display source",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )
    sources = obs.obs_enum_sources()
    if sources is not None:
        for source in sources:
            name = obs.obs_source_get_name(source)
            obs.obs_property_list_add_string(p, name, name)
        obs.source_list_release(sources)

    monitors_prop_list = obs.obs_properties_add_list(
        props,
        "Monitor",
        "Select monitor to use base for zooming",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )
    for monitor in get_monitors():
        obs.obs_property_list_add_string(monitors_prop_list, monitor.name,
                                         monitor.name)
    obs.obs_property_list_add_string(monitors_prop_list,
                                     USE_MANUAL_MONITOR_SIZE,
                                     USE_MANUAL_MONITOR_SIZE)
    obs.obs_properties_add_int(props, "Use Manual Monitor Width/Height",
                               "Use Manual Monitor Width/Height", 0, 1, 1)
    obs.obs_properties_add_int(props, "Manual Monitor Width",
                               "Manual Monitor Width", 320, 3840, 1)
    obs.obs_properties_add_int(props, "Manual Monitor Height",
                               "Manual Monitor Height", 240, 3840, 1)

    obs.obs_properties_add_int(props, "Output Resolution Width",
                               "Output Resolution Width", 320, 3840, 1)
    obs.obs_properties_add_int(props, "Output Resolution Height",
                               "Output Resolution Height", 240, 3840, 1)

    obs.obs_properties_add_int(props, "Width", "Zoom Window Width", 320, 3840,
                               1)
    obs.obs_properties_add_int(props, "Height", "Zoom Window Height", 240,
                               3840, 1)
    obs.obs_properties_add_float_slider(props, "Border", "Active Border", 0,
                                        0.33, 0.01)
    obs.obs_properties_add_int(props, "Speed", "Max Scroll Speed", 0, 540, 10)
    obs.obs_properties_add_float_slider(props, "Smooth", "Smooth", 0, 10, 0.01)
    obs.obs_properties_add_int_slider(props, "Zoom", "Zoom Duration (ms)", 0,
                                      1000, 1)

    return props
Esempio n. 5
0
def script_properties():
  props = obs.obs_properties_create()

  # Drop-down list of sources
  list_property = obs.obs_properties_add_list(props, "source_name", "Source name",
                    obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)
  populate_list_property_with_source_names(list_property)
  # obs.obs_properties_add_text(props, "source_name", "Source name", obs.OBS_TEXT_DEFAULT)

  # Button to refresh the drop-down list
  obs.obs_properties_add_button(props, "button", "Refresh list of sources",
    lambda props,prop: True if populate_list_property_with_source_names(list_property) else True)

  obs.obs_properties_add_float_slider(props, "frequency", "Shake frequency", 0.1, 20, 0.1)
  obs.obs_properties_add_int_slider(props, "amplitude", "Shake amplitude", 0, 90, 1)
  return props
Esempio n. 6
0
def script_properties():
	props = obs.obs_properties_create()

	p = obs.obs_properties_add_list(props, "slide_scene", "Slide Scene", obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)
	obs.obs_property_list_add_string(p, "--Disabled--", "")
	scene_names = obs.obs_frontend_get_scene_names()
	if scene_names != None:
		for scene_name in scene_names:
			obs.obs_property_list_add_string(p, scene_name, scene_name)

	p = obs.obs_properties_add_list(props, "monitor", "Monitor", obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_INT)
	for i, monitor in enumerate(monitors):
		obs.obs_property_list_add_int(p, str(monitor.szDevice), i)

	p = obs.obs_properties_add_list(props, "screen_sourcename", "Screen Source", obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)
	obs.obs_property_list_add_string(p, "--Disabled--", "")
	sources = obs.obs_enum_sources()
	if sources != None:
		for source in sources:
			name = obs.obs_source_get_name(source)
			obs.obs_property_list_add_string(p, name, name)
	obs.source_list_release(sources)

	obs.obs_properties_add_int_slider(props, "slide_visible_duration", "Slide Visible Duration", 5, 120, 5)	

	obs.obs_properties_add_float_slider(props, "fadeout_duration", "Fade Out Duration", 0.05, 1.25, 0.05)

	obs.obs_properties_add_float_slider(props, "refresh_interval", "Refresh Interval", 0.1, 5, 0.1)

	obs.obs_properties_add_int_slider(props, "camera_blur", "Camera Blur", 1, 128, 1)

	p = obs.obs_properties_add_list(props, "camera_sourcename", "Camera Source", obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)
	obs.obs_property_list_add_string(p, "--Disabled--", "")
	sources = obs.obs_enum_sources()
	if sources != None:
		for source in sources:
			name = obs.obs_source_get_name(source)
			obs.obs_property_list_add_string(p, name, name)
	obs.source_list_release(sources)

	return props
Esempio n. 7
0
 def add_float_slider(self, name, description, vals):
     obs.obs_properties_add_float_slider(self.prop_obj, name, description,
                                         *vals)