def script_properties():
    props = obs.obs_properties_create()
    p = obs.obs_properties_add_list(
        props,
        'source',
        'Text 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:
            source_id = obs.obs_source_get_unversioned_id(source)
            if source_id == 'text_gdiplus' or source_id == 'text_ft2_source':
                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_text(props, 'format', 'Text Format:',
                                obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_int_slider(props, 'seconds_between_lines',
                                      'Seconds Between:', 1, 60, 1)
    obs.obs_properties_add_button(props, 'start_button', 'Start Cycling',
                                  start_pressed)

    return props
Ejemplo n.º 2
0
def script_properties():
    props = obs.obs_properties_create()
    p = obs.obs_properties_add_list(
        props,
        'source',
        'Text 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:
            source_id = obs.obs_source_get_unversioned_id(source)
            if source_id == 'text_gdiplus' or source_id == 'text_ft2_source':
                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, 'timer_duration',
                                      'Timer Duration (Mins):', 1, 120, 1)
    obs.obs_properties_add_button(props, 'start_button', 'Start Countdown',
                                  start_pressed)

    return props
Ejemplo n.º 3
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
Ejemplo n.º 4
0
def script_qualifier_settings(props, rtgg_obs: RacetimeObs):
    lang = gettext.translation("racetime-obs",
                               localedir=os.environ['LOCALEDIR'])
    _ = lang.gettext

    p = obs.obs_properties_add_bool(
        props, "use_qualifier",
        _("Display race results as tournament qualifier?"))
    obs.obs_property_set_modified_callback(p, qualifier_toggled)
    qualifier_group = obs.obs_properties_create()
    obs.obs_properties_add_group(props, "qualifier_group", _("Qualifier Mode"),
                                 obs.OBS_GROUP_NORMAL, qualifier_group)
    obs.obs_property_set_visible(
        obs.obs_properties_get(props, "qualifier_group"),
        rtgg_obs.qualifier.enabled)
    p = obs.obs_properties_add_int_slider(qualifier_group, "qualifier_cutoff",
                                          _("Use Top X as par time, where X="),
                                          3, 10, 1)
    p = obs.obs_properties_add_list(qualifier_group, "qualifier_par_source",
                                    _("Qualifier Par Time Source"),
                                    obs.OBS_COMBO_TYPE_EDITABLE,
                                    obs.OBS_COMBO_FORMAT_STRING)
    fill_source_list(p)
    p = obs.obs_properties_add_list(qualifier_group, "qualifier_score_source",
                                    _("Qualifier Score Source"),
                                    obs.OBS_COMBO_TYPE_EDITABLE,
                                    obs.OBS_COMBO_FORMAT_STRING)
    fill_source_list(p)
Ejemplo n.º 5
0
def script_properties():
	logger.debug('script_properties')
	props = obs.obs_properties_create()
	enabled = obs.obs_properties_add_bool(props, "enabled", "Enabled")
	obs.obs_property_set_long_description(enabled, "Whether to save the file when recording or not.")

	long_default_fps_description = "Use this option to achieve higher accuracy than every video frame."

	default_fps = obs.obs_properties_add_bool(props, "use_default_fps", "Use video's FPS to capture cursor")
	obs.obs_property_set_long_description(default_fps, long_default_fps_description)

	custom_fps = obs.obs_properties_add_int_slider(props, "custom_fps", "Custom FPS", 1, 200, 1)
	obs.obs_property_set_long_description(custom_fps, long_default_fps_description)

	install_modules = obs.obs_properties_add_button(
		props,
		"install_modules",
		"Install Python modules",
		install_modules_button_click
	)

	obs.obs_property_set_long_description(
		install_modules,
		"Installs pip, pyautogui and keyboard Python modules in your specified Python interpreter."
	)

	return props
Ejemplo n.º 6
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
def script_properties():
    props = obs.obs_properties_create()
    p = obs.obs_properties_add_list(props, "source", "Microphone",
                                    obs.OBS_COMBO_TYPE_LIST,
                                    obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_properties_add_int_slider(props, "update_interval",
                                      "Update Interval (s):", min_slider_value,
                                      max_slider_value, slider_inverval)
    sources = obs.obs_enum_sources()
    if sources:
        for source in sources:
            source_id = obs.obs_source_get_id(source)
            print(f"Device type found: {source_id}.")
            if source_id in mic_types:
                name = obs.obs_source_get_name(source)
                obs.obs_property_list_add_string(p, name, name)
    obs.source_list_release(sources)
    return props
Ejemplo n.º 8
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
Ejemplo n.º 9
0
def script_properties():
    props = obs.obs_properties_create()

    obs.obs_properties_add_color(props, "tally^IdleColor", "Idle Color")
    obs.obs_properties_add_int_slider(props, "tally^IdleBrightness",
                                      "Idle Brightness", 0, 10, 1)
    obs.obs_properties_add_color(props, "tally^PreviewColor", "Queued Color")
    obs.obs_properties_add_int_slider(props, "tally^PreviewBrightness",
                                      "Queued Brightness", 0, 10, 1)
    obs.obs_properties_add_color(props, "tally^ProgramColor", "Live Color")
    obs.obs_properties_add_int_slider(props, "tally^ProgramBrightness",
                                      "Live Brightness", 0, 10, 1)

    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 == 'av_capture_input':
                source_name = obs.obs_source_get_name(source)
                obs.script_log(obs.LOG_INFO, "Found source: " + source_name)
                obs.obs_properties_add_text(props, source_name,
                                            source_name + " light addr:",
                                            obs.OBS_TEXT_DEFAULT)

    obs.source_list_release(sources)

    return props