def script_properties(): props = obs.obs_properties_create() obs.obs_properties_add_text(props, "_text1", "_text1:", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_text(props, "_text2", "_text2:", obs.OBS_TEXT_DEFAULT) return props
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, "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
def script_properties(): props = obs.obs_properties_create() rf = obs.obs_properties_add_text(props, "rf", "Recording folder", obs.OBS_TEXT_DEFAULT) obs.obs_property_set_long_description(rf, "The recording folder in your settings (must be the same). OBS doesn't allow the script to get it") wf = obs.obs_properties_add_text(props, "wf", "Watch folder", obs.OBS_TEXT_DEFAULT) obs.obs_property_set_long_description(wf, "The folder where bench outputs. Usually TF2_FOLDER/tf/results") # Auto-move completed demos cb_b = obs.obs_properties_add_bool(props, "cb", "Auto-move completed demos?") obs.obs_property_set_long_description(cb_b, "Enabling will move recorded .dem, .json, & .vdm files to the archive folder directory to avoid double recording") obs.obs_property_set_modified_callback(cb_b, cb_pressed) # Auto restart al_b = obs.obs_properties_add_bool(props, "al", "(LINUX ONLY) Auto relaunch TF2 demo recording on crash?") obs.obs_property_set_long_description(al_b, "Currently only supports GNU/Linux. Will attempt to auto restart demo recording if TF2 crashes on the next clip") obs.obs_property_set_modified_callback(al_b, al_pressed) df = obs.obs_properties_add_text(props, "df", "Demo folder", obs.OBS_TEXT_DEFAULT) obs.obs_property_set_long_description(df, "The folder containing your .dem files") visible_prop(props, "df", al or cb) af = obs.obs_properties_add_text(props, "af", "Archive folder", obs.OBS_TEXT_DEFAULT) obs.obs_property_set_long_description(af, "The folder to move completed .dem files") visible_prop(props, "af", cb) obs.obs_properties_add_button(props,"b1","Start", b_start) return props
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
def script_properties(): props = obs.obs_properties_create() obs.obs_properties_add_text(props, "_text", "text", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_int(props, "_int", "int", 1, 100, 1) obs.obs_properties_add_button(props, "save", "Save", save) return props
def script_properties(): print('script_properties') props = obs.obs_properties_create() obs.obs_properties_add_text(props, "stream_url", "Stream URL", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_int(props, "interval", "Update Interval (milliseconds)", 1, 500, 1) 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": name = obs.obs_source_get_name(source) obs.obs_property_list_add_string(p, name, name) elif 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) obs.obs_properties_add_button(props, "button", "Refresh", refresh_pressed) return props
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
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
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, "reset_button", "Reset/Stop Timer", reset_pressed) obs.obs_properties_add_button(props, "start_button", "Start Timer", start_pressed) obs.obs_properties_add_bool(props, "auto_start", "Start Automatically with Stream/Recording") obs.obs_properties_add_bool(props, "auto_stop", "Stop Automatically with Stream/Recording") obs.obs_properties_add_bool(props, "recording", "Enable for Recording") obs.obs_properties_add_bool(props, "visible", "Text Visible Only While Timer Running") return props
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(): if debug_mode: print("[CS] 配置已加载。") props = obs.obs_properties_create() obs.obs_properties_add_bool(props, "enabled", "启用该脚本") obs.obs_properties_add_bool(props, "debug_mode", "调试模式") obs.obs_properties_add_int( props, "check_frequency", "检查频率(毫秒)", 150, 10000, 100) obs.obs_properties_add_text( props, "display_text", "显示文本", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_bool(props, "spotify", "Spotify") obs.obs_properties_add_bool(props, "vlc", "VLC") obs.obs_properties_add_bool(props, "yt_firefox", "Youtube for Firefox") obs.obs_properties_add_bool(props, "yt_chrome", "Youtube for Chrome") obs.obs_properties_add_bool(props, "foobar2000", "Foobar2000") obs.obs_properties_add_bool(props, "necloud", "网易云音乐") obs.obs_properties_add_bool(props, 'aimp', 'AIMP') p = obs.obs_properties_add_list( props, "source_name", "使用文本框", 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
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
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
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() # True/False checkbox (checked == True) obs.obs_properties_add_bool(props, "clock_24hr", "Use 24-hour clock") # Text field entry obs.obs_properties_add_text(props, "timezone_text", "Timezone (optional)", obs.OBS_TEXT_DEFAULT) # Drop down menu of Text sources 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 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) # Button in OBS script menu to interact with script obs.obs_properties_add_button(props, "button", "Refresh", refresh_pressed) return props
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
def script_properties(): props = obs.obs_properties_create() obs.obs_properties_add_text(props, "asdf", "LABEL?", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_button(props, "button", "We'll Be Right Back", do_stuff) return props
def script_properties(): #global props props = obs.obs_properties_create() obs.obs_properties_add_text(props, "host", "Host IP", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_int(props, "port", "Host port", 1, 400000, 1) obs.obs_properties_add_bool(props, "logOscOutput", "Log OSC output") # obs.obs_properties_add_int(props, "serverPort", "Listen port", 1, 400000, 1) return props
def script_properties(): props = obs.obs_properties_create() obs.obs_properties_add_text(props, "data folder", "Data folder", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_int(props, "save period", "Save period (minutes)", 1, 20, 1) 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
def script_properties(): props = obs.obs_properties_create() obs.obs_properties_add_text(props, "access_token", "Access Token (ex: 'oauth:xxxxxxxxxxxxxxx')", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_text(props, "nickname", "Bot Account Name", obs.OBS_TEXT_DEFAULT) return props
def script_properties(): props = obs.obs_properties_create() obs.obs_properties_add_editable_list(props, "list", "GStreamer Pipelines List", obs.OBS_EDITABLE_LIST_TYPE_STRINGS, '', '') obs.obs_properties_add_text(props, "obs_ip_address", "obs_ip_address", obs.OBS_TEXT_DEFAULT) return props
def script_properties(): props = obs.obs_properties_create() obs.obs_properties_add_text(props, "config_path", "Path to config file", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_bool(props, "verbose", "Verbose logging") obs.obs_properties_add_button(props, "reload", "Reload config", reload_pressed) return props
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
def script_properties(): props = obs.obs_properties_create() obs.obs_properties_add_text(props, "c_ipA", "Custom Ip Adress", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_text(props, "c_port", "Custom Port", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_button(props, "button", "Start/Stop Server", startstop_server) 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() obs.obs_properties_add_text(props, "url", "URL", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_text(props, "secret", "secret", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_int(props, "cycle_rate", "Cycle Rate(ms)", 1000, 1000000, 1000) return props
def script_properties(): props = obs.obs_properties_create() obs.obs_properties_add_button(props, "button1", "Start", start_pressed) obs.obs_properties_add_button(props, "button2", "Clip Now", clip_pressed) obs.obs_properties_add_button(props, "button3", "Edit Last Clip", clipedit_pressed) p = obs.obs_properties_add_list(props, "source", "CC 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_text(props, "twitchUsername", "Twitch Username", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_text(props, "apiClientID", "API Client ID", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_text(props, "chromeDriverPath", "Chrome Driver Path", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_text(props, "chromeProfilePath", "Chrome Profile Path", obs.OBS_TEXT_DEFAULT) return props
def script_properties(): properties = obs.obs_properties_create() obs.obs_properties_add_text(properties, "api_base", "Biliomi's Api base url", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_text(properties, "username", "Username", obs.OBS_TEXT_DEFAULT) obs.obs_properties_add_text(properties, "password", "Password", obs.OBS_TEXT_PASSWORD) obs.obs_properties_add_int(properties, "update_interval", "Update Interval (seconds)", 30, 3600, 1) follower_source = obs.obs_properties_add_list(properties, "latest_follower_source", "Latest Follower Source", obs.OBS_COMBO_TYPE_EDITABLE, obs.OBS_COMBO_FORMAT_STRING) obs.obs_properties_add_text(properties, "prefix", "Prefix", obs.OBS_TEXT_DEFAULT) 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(follower_source, name, name) obs.source_list_release(sources) return properties
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
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