Resource icon

OBS Lua Transformer 1.0

bromagosa submitted a new resource:

Transformer - Animate a size, position and rotation transformation over a source (or group)

Fill in the origin and destination positions, dimensions and rotations for a source or group of sources, select an easing function among the 22 available ones and click on "Do it!" to trigger the animation.

You can also trigger the animation via a hotkey.

Thanks to Mun Films for sponsoring the creation of this script.
Read more about this resource...
I am trying a two-phase animation, launching second animation with a delay on a second copy of script.

once the second script starts getting a "failed to call tick for lua_tick" error, OBS hangs, makes OBS crash and make fine tuning animation "miserable"
i would like the script to stop on errors so that oBS can recover.
to make this script alot more user firendly, is it possible to select a different source and send a command like "get current transforms for "in" and for "out"

ps:I think i am over-utilizing your script;

In my usage scenario, i am using multiple copies of the script by renaming and adding them again.

but the problem is, the script inputs the original dimensions/positions as soon as the script is launched. I would rather have it input the initials just before the delay ends.

I overcame the problem by using 3 copies of the script.

first one makes it "0" pixel width
second one makes it appear but stay still
and the third one takes it from visible state to animated state.

very dirty i know...
Last edited:
That's quite an impressive use of the script! Thanks for using it and sharing the video!

You're totally right, this wasn't meant to be used to concatenate several transitions (or run them at the same time). I'm not even sure it's possible to pull the current dimensions and position into the script UI. Scrips have a limited API...

Maybe someone with more experience in OBS scripting can shed a light, though!
Glad you liked it.
i would like to suggest an easy upgrade for this script:
currently script moves the source from A to B and there is a hotkey assigned for it.

How about:
You let us have three hotkeys instead of one, first hotkey does the "A to B" thing, and second hotkey does the "B to A" thing. like a reverse mode which uses origin as destination and destination as origin.
Third one is a ping-pong hotkey, "A to B" or if it s already at "B", "B to A".

I tried my best to explain myself , really :)

The example i showed had a "one frame glitch" that prematurely showed the source even though it was not supposed to. Sometimes it does it sometimes not, but i totally fixed it by having a blank png as a starting image.
I added this on tick so I could send similar OSC animation commands.
It's still something simple, just send 1 data. but it works.

function script_tick(seconds)
local handle = io.popen("nc 8080")
    result = handle:read("*a")
    if (result > "" ) then
        obs.obs_sceneitem_set_rot(sceneItem, result)
        local pos = obs.vec2()
        pos.x = result
        pos.y = result
        obs.obs_sceneitem_set_pos(sceneItem, pos)
        local bounds = obs.vec2()
        bounds.x = result
        bounds.y = result
        obs.obs_sceneitem_set_bounds(sceneItem, bounds)

echo "$[RANDOM % 1000]" | nc -l 8080