项目作者: upgradeQ

项目描述 :
Text effects and media.Set hotkey, duration.
高级语言: Python
项目地址: git://github.com/upgradeQ/Scripted-text.git
创建时间: 2020-06-04T16:11:21Z
项目社区:https://github.com/upgradeQ/Scripted-text

开源协议:Mozilla Public License 2.0

下载


Scripted text

Trigger hotkey get scripted text effect + sound
For windows install python3.6 64 or 32 bit depending on your OBS

Usage

Create text source.
Optionally create media source

  • Open Tools>Scripts
  • select this script
  • set settings for it, change duration and refresh rate
  • preview it if needed,
  • reset if needed,
  • set hotkey in File>Settings

If you need additional effects , copy paste scripted_text.py , and add it again.

Example text effects

  • static

    just show text
    cycle threw colors

  • preview

    blinking text

  • preview

    loading text

  • preview

    tremor effect

  • preview

    sanic effect

  • preview

    How it works

    There is two classes:

    • TextContent - updates text
    • Driver - interacts with obs properties and controls execution

    Interaction with obs happens on instance of Driver - std it will update source name, scirpted text, selected effect and more according to settings from UI. Hotkey handling via script_save and script_load with callback on std hotkey_hook. Note: this callback is also attached to PREVIEW button in settings. It will trigger obs_timer , set lock to False (to run single callback at time). obs_timer will execute ticker with interval aka refresh_rate. ticker will execute selected text effect from settings ,substract refresh_rate from duration , check if its <= 0,then reset everything to initial state,remove itself via obs.remove_current_callback.
    To create a text effect , this naming someefect_effect is required. Text effects use inherited method update_text to update text one tick at time.

Contribute

Forks are a great way to contribute to a repository.
After forking a repository, you can send the original author a pull request