Example #1
0
def script_properties():
    global props
    props = obs.obs_properties_create()
    d = obs.obs_properties_add_list(props, "device_ip", "Device IP:",
                                    obs.OBS_COMBO_TYPE_EDITABLE,
                                    obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_properties_add_button(props, "find_nanoleafs",
                                  "Find Nanoleafs Devices", find_nanoleafs)
    a = obs.obs_properties_add_list(props, "auth_key", "Authorization Key:",
                                    obs.OBS_COMBO_TYPE_EDITABLE,
                                    obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_properties_add_button(props, "authorize", "Get Authorization Key",
                                  authorize_device)
    s1 = obs.obs_properties_add_list(props, "scene_on", "Activate Scene:",
                                     obs.OBS_COMBO_TYPE_EDITABLE,
                                     obs.OBS_COMBO_FORMAT_STRING)
    s2 = obs.obs_properties_add_list(props, "scene_off", "Deactivate Scene:",
                                     obs.OBS_COMBO_TYPE_EDITABLE,
                                     obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_properties_add_bool(props, "use_last_light_scene",
                                "Use Last Scene")
    obs.obs_properties_add_button(props, "get_scenes", "Get Scenes",
                                  get_scenes)
    obs.obs_properties_add_bool(props, "use_last_light_scene",
                                "Use Last Scene")
    return props
Example #2
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
def script_properties():  # ui
    props = S.obs_properties_create()
    p = S.obs_properties_add_list(
        props,
        "source",
        "Text Source",
        S.OBS_COMBO_TYPE_EDITABLE,
        S.OBS_COMBO_FORMAT_STRING,
    )
    sources = S.obs_enum_sources()
    if sources is not None:
        for source in sources:
            source_id = S.obs_source_get_unversioned_id(source)
            name = S.obs_source_get_name(source)
            S.obs_property_list_add_string(p, name, name)

        S.source_list_release(sources)

    _p = S.obs_properties_add_list(
        props,
        "scene",
        "Scene",
        S.OBS_COMBO_TYPE_EDITABLE,
        S.OBS_COMBO_FORMAT_STRING,
    )

    scenes = S.obs_frontend_get_scenes()
    for scene in scenes:
        name = S.obs_source_get_name(scene)
        S.obs_property_list_add_string(_p, name, name)
    S.source_list_release(scenes)

    S.obs_properties_add_button(props, "button", "Duplicate", button_pressed)
    return props
Example #4
0
def script_properties():
    global Debug_Mode
    if Debug_Mode: print("Calling properties")

    now = datetime(2018, 1, 1, 0, 0)
    props = obs.obs_properties_create()
    obs.obs_properties_add_bool(props, "enabled", "Enabled")
    obs.obs_properties_add_int(props, "duration",
                               "Recording Duration (Minutes)", 1, 120, 1)
    st = obs.obs_properties_add_list(props, "start_time", "Record Start Time",
                                     obs.OBS_COMBO_TYPE_LIST,
                                     obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_property_list_add_string(st, "None", "None")
    et = obs.obs_properties_add_list(props, "end_time", "Record End Time",
                                     obs.OBS_COMBO_TYPE_LIST,
                                     obs.OBS_COMBO_FORMAT_STRING)
    dy = obs.obs_properties_add_list(props, "avoid_days",
                                     "Avoid Recording Day(s)",
                                     obs.OBS_COMBO_TYPE_EDITABLE,
                                     obs.OBS_COMBO_FORMAT_STRING)
    for x in range(96):
        obs.obs_property_list_add_string(
            st, str(datetime.time(now).strftime("%I:%M %p")),
            str(datetime.time(now)))
        obs.obs_property_list_add_string(
            et, str(datetime.time(now).strftime("%I:%M %p")),
            str(datetime.time(now)))
        now += timedelta(minutes=15)

    obs.obs_properties_add_bool(props, "enabled_stream", "Include Streaming")
    obs.obs_properties_add_bool(props, "debug_mode", "Debug Mode")
    return props
Example #5
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)
def script_properties():
    props = obs.obs_properties_create()
    obs.obs_properties_add_text(props, "url", "Stream URL",
                                obs.OBS_TEXT_DEFAULT)

    p = obs.obs_properties_add_list(props, "source", "Media 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_id(source)
            if source_id == "ffmpeg_source" or source_id == "vlc_source":
                name = obs.obs_source_get_name(source)
                obs.obs_property_list_add_string(p, name, name)

    obs.source_list_release(sources)

    r = obs.obs_properties_add_list(props, "res", "Preferred Resolution",
                                    obs.OBS_COMBO_TYPE_LIST,
                                    obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_property_list_add_string(r, "best", "best")
    obs.obs_property_list_add_string(r, "1080p", "1080p")
    obs.obs_property_list_add_string(r, "720p", "720p")
    obs.obs_property_list_add_string(r, "480p", "480p")
    obs.obs_property_list_add_string(r, "360p", "360p")
    obs.obs_property_list_add_string(r, "160p", "160p")
    obs.obs_property_list_add_string(r, "worst", "worst")

    obs.obs_properties_add_button(props, "set", "Open Stream in Media Source",
                                  open_source)

    return props
Example #7
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
def script_properties():
    props = obs.obs_properties_create()
    obs.obs_properties_add_int(props, "xMaxSize", "Max x size:", 0, 10000, 1)
    obs.obs_properties_add_int(props, "yMaxSize", "Max y size:", 0, 10000, 1)
    obs.obs_properties_add_int(props, "followRate", "Follow speed %:", 0, 100,
                               1)
    obs.obs_properties_add_int(props, "zoomRate", "Zoom speed %:", 0, 100, 1)
    obs.obs_properties_add_bool(props, "keepAspectRatio",
                                "Keep aspect ratio on select rectangle:")
    sourceList1 = obs.obs_properties_add_list(props, "sourceName1",
                                              "Screen source 1:",
                                              obs.OBS_COMBO_TYPE_EDITABLE,
                                              obs.OBS_COMBO_FORMAT_STRING)
    sourceList2 = obs.obs_properties_add_list(props, "sourceName2",
                                              "Screen source 2:",
                                              obs.OBS_COMBO_TYPE_EDITABLE,
                                              obs.OBS_COMBO_FORMAT_STRING)
    sources = obs.obs_enum_sources()
    obs.obs_property_list_add_string(sourceList1, "", "")
    obs.obs_property_list_add_string(sourceList2, "", "")
    if sources is not None:
        for source in sources:
            source_id = obs.obs_source_get_unversioned_id(source)
            if source_id == "monitor_capture":
                name = obs.obs_source_get_name(source)
                obs.obs_property_list_add_string(sourceList1, name, name)
                obs.obs_property_list_add_string(sourceList2, name, name)
        obs.source_list_release(sources)
    return props
Example #9
0
def script_properties():
    props = obs.obs_properties_create()

    obs.obs_properties_add_text(props, "counter_text1", "[1]Set counter text",
                                obs.OBS_TEXT_DEFAULT)

    p1 = obs.obs_properties_add_list(
        props,
        "source1",
        "[1]Text Source",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )

    obs.obs_properties_add_text(props, "counter_text2", "[2]Set counter text",
                                obs.OBS_TEXT_DEFAULT)
    p2 = obs.obs_properties_add_list(
        props,
        "source2",
        "[2]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(p1, name, name)
                obs.obs_property_list_add_string(p2, name, name)

        obs.source_list_release(sources)
    return props
def script_properties():
    props = obs.obs_properties_create()

    obs.obs_properties_add_text(props, "scripted_text", "Scripted text",
                                obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_int(props, "refresh_rate", "Refresh rate(ms)", 15,
                               5 * 1000, 1)
    obs.obs_properties_add_int(props, "duration", "Duration shown(ms)",
                               1 * 1000, 3600 * 1000, 1)

    p = obs.obs_properties_add_list(
        props,
        "source",
        "Text Source",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )
    sp = obs.obs_properties_add_list(
        props,
        "playsound",
        "Media Source",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )
    tp = obs.obs_properties_add_list(
        props,
        "text_effect",
        "Text effect",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )

    for i in scripted_text_driver.txt_efcts.keys():
        obs.obs_property_list_add_string(tp, i, i)

    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)
            if source_id == "ffmpeg_source":
                name = obs.obs_source_get_name(source)
                obs.obs_property_list_add_string(sp, name, name)

        obs.source_list_release(sources)

    obs.obs_properties_add_button(
        props, "button1", "PREVIEW",
        lambda *props: scripted_text_driver.hotkey_hook())

    obs.obs_properties_add_button(
        props, "button2", "RESET",
        lambda *props: scripted_text_driver.reset_duration())

    return props
Example #11
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
Example #12
0
def script_properties():
    "https://obsproject.com/docs/reference-properties.html"
    props = obs.obs_properties_create()

    obs.obs_properties_add_text(props, "scripted_text", "Scripted text",
                                obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_int(props, "refresh_rate", "Refresh rate(ms)", 50,
                               5000, 1)
    obs.obs_properties_add_int(props, "duration", "Duration shown(ms)", 5000,
                               15000, 1)

    p = obs.obs_properties_add_list(
        props,
        "source",
        "Text Source",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )
    sp = obs.obs_properties_add_list(
        props,
        "playsound",
        "Media Source",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )
    tp = obs.obs_properties_add_list(
        props,
        "text_effect",
        "Text effect",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )

    for i in ["rainbow", "static", "random_chars", "blink"]:
        obs.obs_property_list_add_string(tp, i, i)

    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)
            if source_id == "ffmpeg_source":
                name = obs.obs_source_get_name(source)
                obs.obs_property_list_add_string(sp, name, name)
                print(name)

        obs.source_list_release(sources)

    obs.obs_properties_add_button(props, "button", "Refresh and preview(5s)",
                                  refresh)
    return props
Example #13
0
    def _add(self, props, on_changed):
        self._scenes = p1 = _obs.obs_properties_add_list(
            props, self.name, self.text, _obs.OBS_COMBO_TYPE_LIST,
            _obs.OBS_COMBO_FORMAT_STRING)
        super()._add(p1, self._update)
        self._items = p2 = _obs.obs_properties_add_list(
            props, self.item_name, self.item_text,
            _obs.OBS_COMBO_TYPE_EDITABLE, _obs.OBS_COMBO_FORMAT_STRING)
        super()._add(p2, on_changed, clear=False)

        _obs.obs_property_list_add_string(p1, "(None)", None)
        for n in sorted(_helper.get_scene_names()):
            _obs.obs_property_list_add_string(p1, n, n)
        _obs.obs_property_list_add_string(p2, "(None)", None)
Example #14
0
def script_properties():
    props = obs.obs_properties_create()
    devicesList = obs.obs_properties_add_list(props, "midiDevice",
                                              "MIDI Device",
                                              obs.OBS_COMBO_TYPE_LIST,
                                              obs.OBS_COMBO_FORMAT_STRING)
    midiIn = rtmidi.MidiIn()
    availablePorts = midiIn.get_ports()
    obs.obs_property_list_add_string(devicesList, "", "")
    for port in availablePorts:
        obs.obs_property_list_add_string(devicesList, port, port)

    transitionMidiType = obs.obs_properties_add_list(
        props, "transitionMidiType", "Transition midi type",
        obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_property_list_add_string(transitionMidiType, "Control Change",
                                     "CC")
    obs.obs_property_list_add_string(transitionMidiType, "Note On", "Note")

    transitionAddress = obs.obs_properties_add_int(props,
                                                   "transitionMidiAddress",
                                                   "Transition Midi Address",
                                                   0, 127, 1)

    scenesMidiType = obs.obs_properties_add_list(props, "scenesMidiType",
                                                 "Scene set midi type",
                                                 obs.OBS_COMBO_TYPE_LIST,
                                                 obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_property_list_add_string(scenesMidiType, "Control Change", "CC")
    obs.obs_property_list_add_string(scenesMidiType, "Note On", "Note")

    scenesAddress = obs.obs_properties_add_int(props, "scenesMidiAddress",
                                               "First scene midi address", 0,
                                               127, 1)

    transitionsMidiType = obs.obs_properties_add_list(
        props, "transitionsMidiType", "Transition set midi type",
        obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_property_list_add_string(transitionsMidiType, "Control Change",
                                     "CC")
    obs.obs_property_list_add_string(transitionsMidiType, "Note On", "Note")

    transitionsAddress = obs.obs_properties_add_int(
        props, "transitionsMidiAddress", "First transition Midi Address", 0,
        127, 1)

    obs.obs_properties_add_bool(props, "logMidiInput", "Log MIDI input")

    return props
Example #15
0
def script_coop_settings(props, rtgg_obs: RacetimeObs):
    lang = gettext.translation("racetime-obs",
                               localedir=os.environ['LOCALEDIR'])
    _ = lang.gettext

    p = obs.obs_properties_add_bool(props, "use_coop",
                                    _("Display coop information?"))
    obs.obs_property_set_modified_callback(p, coop_toggled)
    coop_group = obs.obs_properties_create()
    obs.obs_properties_add_group(props, "coop_group", _("Co-op Mode"),
                                 obs.OBS_GROUP_NORMAL, coop_group)
    obs.obs_property_set_visible(obs.obs_properties_get(props, "coop_group"),
                                 rtgg_obs.coop.enabled)
    p = obs.obs_properties_add_list(coop_group, "coop_partner",
                                    _("Co-op Partner"),
                                    obs.OBS_COMBO_TYPE_LIST,
                                    obs.OBS_COMBO_FORMAT_STRING)
    p = obs.obs_properties_add_list(coop_group, "coop_opponent1",
                                    _("Co-op Rival 1"),
                                    obs.OBS_COMBO_TYPE_LIST,
                                    obs.OBS_COMBO_FORMAT_STRING)
    p = obs.obs_properties_add_list(coop_group, "coop_opponent2",
                                    _("Co-op Rival 2"),
                                    obs.OBS_COMBO_TYPE_LIST,
                                    obs.OBS_COMBO_FORMAT_STRING)
    fill_coop_entrant_lists(props, rtgg_obs)
    p = obs.obs_properties_add_list(coop_group, "coop_our_source",
                                    _("Our Team's Timer"),
                                    obs.OBS_COMBO_TYPE_EDITABLE,
                                    obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_property_set_long_description(p, (
        _("This text source will display your team's timer when you finish.")))
    fill_source_list(p)
    p = obs.obs_properties_add_list(coop_group, "coop_opponent_source",
                                    "Rival Team's Timer",
                                    obs.OBS_COMBO_TYPE_EDITABLE,
                                    obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_property_set_long_description(
        p,
        (_("This text source will be use to display your rival's timer when "
           "they finish")))
    obs.obs_properties_add_color(coop_group, "coop_winner_color",
                                 _("Winner Color:"))
    obs.obs_properties_add_color(coop_group, "coop_loser_color",
                                 _("Loser Color:"))
    obs.obs_properties_add_color(coop_group, "coop_undetermined_color",
                                 _("Winner Undetermined Color"))
    fill_source_list(p)
Example #16
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_text(props, 'format', 'Text Format:', obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_button(props, 'start_button', 'Start Timer', start_pressed)
    obs.obs_properties_add_bool(props, 'auto_start', 'Start Automatically with Stream')

    return props
def script_properties():
    """Adds elements to script configuration panel"""

    props = obs.obs_properties_create()

    serv_l = obs.obs_properties_add_list(props, "world", "Server",
                                         obs.OBS_COMBO_TYPE_LIST,
                                         obs.OBS_COMBO_FORMAT_STRING)
    obs.obs_property_list_add_string(serv_l, "Connery",
                                     "Connery")  # Server list
    obs.obs_property_list_add_string(serv_l, "Miller", "Miller")
    obs.obs_property_list_add_string(serv_l, "Cobalt", "Cobalt")
    obs.obs_property_list_add_string(serv_l, "Emerald", "Emerald")
    obs.obs_property_list_add_string(serv_l, "Jaeger", "Jaeger")
    obs.obs_property_list_add_string(serv_l, "Apex", "Apex")
    obs.obs_property_list_add_string(serv_l, "Soltech", "Soltech")

    obs.obs_properties_add_int(props, "target_zone",
                               "Desolation Instance Zone ID", 0, 999999, 1)

    obs.obs_properties_add_button(props, "button2", "Start Tracker",
                                  start_tracker)  # Buttons
    obs.obs_properties_add_button(props, "button3", "Stop Tracker",
                                  stop_tracker)
    obs.obs_properties_add_button(props, "button", "Reset Relics",
                                  reset_relics)

    return props
def script_properties():
    """
    Called to define user properties associated with the script. These
    properties are used to define how to show settings properties to a user.
    """
    props = obs.obs_properties_create()

    mh = obs.obs_properties_add_bool(props, "match_history",
                                     "Show Match History")

    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_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(props, "blink_rate", "Blink Rate(ms)", 1000,
                               10000, 1)
    obs.obs_properties_add_button(props, "button", "Reset Match History",
                                  refresh_pressed)

    return props
def script_properties():  # ui
    props = obs.obs_properties_create()
    p = obs.obs_properties_add_list(
        props,
        "source",
        "Browser source",
        obs.OBS_COMBO_TYPE_EDITABLE,
        obs.OBS_COMBO_FORMAT_STRING,
    )
    obs.obs_properties_add_button(props, "button1", "Press tab", press_tab)
    obs.obs_properties_add_button(props, "button2", "Press shift+tab",
                                  press_shift_tab)
    obs.obs_properties_add_button(props, "button3", "Send LMB at [100,200]",
                                  click_at)
    obs.obs_properties_add_button(props, "button4", "Move to 0,0 ",
                                  move_mouse0)
    obs.obs_properties_add_button(props, "button5", "Move to 100,200 ",
                                  move_mouse1)
    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 == "browser_source":
                name = obs.obs_source_get_name(source)
                obs.obs_property_list_add_string(p, name, name)

        obs.source_list_release(sources)
    return props
def script_properties():
    """
    Create properties for script settings dialog
    """

    props = obs.obs_properties_create()

    for _k, _v in script_state.properties.items():

        if _v.type == script_state.OBS_COMBO:

            _p = obs.obs_properties_add_list(props, _k, _v.name, _v.type,
                                             obs.OBS_COMBO_FORMAT_STRING)

            for _item in _v.items:
                obs.obs_property_list_add_string(_p, _item, _item)

        elif _v.type == script_state.OBS_BOOLEAN:

            obs.obs_properties_add_bool(props, _k, _v.name)

        else:

            obs.obs_properties_add_text(props, _k, _v.name, _v.type)

    obs.obs_properties_add_button(props, 'reset', 'Reset',
                                  reset_button_clicked)

    script_state.obs_properties = props

    return props
Example #21
0
def script_properties():
    props = obs.obs_properties_create()

    obs.obs_properties_add_text(props, "strftime", "时间格式", obs.OBS_TEXT_DEFAULT)

    obs.obs_properties_add_text(props, "prefix", "前缀", obs.OBS_TEXT_DEFAULT)

    obs.obs_properties_add_text(props, "suffix", "后缀", obs.OBS_TEXT_DEFAULT)

    obs.obs_properties_add_float(props, "interval", "刷新间隔 (秒)", 0, 3600, 0.5)

    obs.obs_properties_add_float(props, "time_offset", "时间偏移 (小时)", -24, 24, 1)

    p = obs.obs_properties_add_list(props, "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_id(source)
            if source_id.startswith("text"):
                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_button(props, "button", "刷新", refresh_pressed)
    return props
Example #22
0
def script_properties():
    props = obs.obs_properties_create()

    obs.obs_properties_add_text(props, "host", "MPD Host Address",
                                obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_int(props, "port", "Port", 0, 65535, 1)
    obs.obs_properties_add_text(props, "password", "Password",
                                obs.OBS_TEXT_PASSWORD)
    obs.obs_properties_add_int(props, "interval",
                               "Update Interval (milliseconds)", 1, 30000, 1)

    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_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_button(props, "refresh_button", "Refresh",
                                  refresh_pressed)

    return props
Example #23
0
    def addConfig(cls, props):
        devicesList = obs.obs_properties_add_list(props, cls.Keys.port, "MIDI Device", obs.OBS_COMBO_TYPE_LIST, obs.OBS_COMBO_FORMAT_STRING)

        availablePorts = rtmidi.MidiIn().get_ports()
        obs.obs_property_list_add_string(devicesList, "None", "")
        for port in availablePorts:
            obs.obs_property_list_add_string(devicesList, port, port)
Example #24
0
def script_properties():
    props = obs.obs_properties_create()

    obs.obs_properties_add_text(props, "counter_text", "Set counter text",
                                obs.OBS_TEXT_DEFAULT)

    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_button(props, "button", "Refresh", refresh)
    return props
Example #25
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
Example #26
0
def script_properties():
    props = obs.obs_properties_create()

    obs.obs_properties_add_text(
        props, "username", "Showdown Username", obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_int(
        props, "interval", "Update interval (seconds)", 5, 3600, 1)

    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_id(source)
            if source_id == "text_gdiplus" or source_id == "text_gdiplus_v2" 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", "Format (OU, UU etc.)", obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_text(
        props, "str_format", "Text format (see website for details)", obs.OBS_TEXT_DEFAULT)
    return props
Example #27
0
def script_properties():
    debug("[CS] Loaded properties.")

    props = obs.obs_properties_create()
    obs.obs_properties_add_bool(props, "enabled", "Enabled")
    obs.obs_properties_add_bool(props, "debug_mode", "Debug Mode")
    obs.obs_properties_add_int(props, "check_frequency", "Check frequency",
                               150, 10000, 100)
    obs.obs_properties_add_text(props, "display_text", "Display text",
                                obs.OBS_TEXT_DEFAULT)
    for i in filter(lambda x: not x.startswith('_'), calcingfunc.keys()):
        obs.obs_properties_add_bool(props,
                                    globals()[i].id,
                                    globals()[i].display_name)

    p = obs.obs_properties_add_list(props, "source_name", "Text source",
                                    obs.OBS_COMBO_TYPE_EDITABLE,
                                    obs.OBS_COMBO_FORMAT_STRING)

    sources = obs.obs_enum_sources()
    if sources:
        for source in sources:
            source_id = obs.obs_source_get_unversioned_id(source)
            if source_id in ("text_gdiplus", "text_ft2_source"):
                name = obs.obs_source_get_name(source)
                obs.obs_property_list_add_string(p, name, name)
    obs.source_list_release(sources)

    return props
Example #28
0
def script_properties():
    props = obs.obs_properties_create()

    # obs_property_t *obs_properties_add_text(obs_properties_t *props, const char *name, const char *description, enum obs_text_type type)
    obs.obs_properties_add_text(
        props, "api_endpoint", "API Endpoint", obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_text(
        props, "jsonpath", "Path to json string (ex menu.state)", obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_text(
        props, "format_rule", "Formatting rule (python format)", obs.OBS_TEXT_MULTILINE)
    # obs_property_t *obs_properties_add_int(obs_properties_t *props, const char *name, const char *description, int min, int max, int step)

    p = obs.obs_properties_add_list(
        props, "text_source", "Text Source (old FreeType 2)", 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_ft2_source":
            # gdiplus lags!!!!!! 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_button(
        props, "button", "Save/Refresh", save_pressed)
    return props
Example #29
0
def script_properties():
    props = obs.obs_properties_create()

    # There seems to be an issue with the SWIG interop that prevents us from
    # enumerating over the scenes. As a result, the user will have to type in the scene name.
    # However, for multiple scene selection, that is probably the only possible way.
    obs.obs_properties_add_text(props, scenes_property, "Scene(s)",
                                obs.OBS_TEXT_MULTILINE)

    comports_list = obs.obs_properties_add_list(props, comport_property,
                                                "COM Port",
                                                obs.OBS_COMBO_TYPE_LIST,
                                                obs.OBS_COMBO_FORMAT_STRING)
    [
        obs.obs_property_list_add_string(comports_list, str(comport),
                                         comport.device)
        for comport in discover_comports()
    ]

    obs.obs_properties_add_text(props, on_value_property, "Value when live",
                                obs.OBS_TEXT_DEFAULT)
    obs.obs_properties_add_text(props, off_value_property,
                                "Value when not live", obs.OBS_TEXT_DEFAULT)

    obs.obs_properties_add_bool(props, debug_value_property, "Debug")

    obs.obs_frontend_add_event_callback(frontend_event_callback)

    return props
def script_properties():  # ui
    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)
    number = obs.obs_properties_add_int(props, "_int", "Number", 1, 100, 1)
    text_value = obs.obs_properties_add_text(props, "_text",
                                             "Additional input:",
                                             obs.OBS_TEXT_DEFAULT)
    obs.obs_property_set_visible(text_value, False)
    obs.obs_property_set_modified_callback(number, callback)
    return props
Example #31
0
def script_properties():
	props = obs.obs_properties_create()

	obs.obs_properties_add_text(props, "url", "URL", obs.OBS_TEXT_DEFAULT)
	obs.obs_properties_add_int(props, "interval", "Update Interval (seconds)", 5, 3600, 1)

	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_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_button(props, "button", "Refresh", refresh_pressed)
	return props