# Changing transform with lua



## Ghiaha (May 7, 2018)

Is it possible to change the transform of a source (resize, translate etc) using a lua script? If not what is the best approach to achieve this programmatically.
Thanks.


----------



## wondible (May 7, 2018)

Not something I've done personally yet, but looks like it is under scene items, since sources can be transformed differently in each scene.

https://obsproject.com/docs/reference-scenes.html


----------



## Ghiaha (May 7, 2018)

wondible said:


> Not something I've done personally yet, but looks like it is under scene items, since sources can be transformed differently in each scene.
> 
> https://obsproject.com/docs/reference-scenes.html


Thanks a lot for the answer, I don't suppose you'd happen to know where I could find an example of this?


----------



## Ghiaha (May 8, 2018)

Bump?


----------



## MacTartan (May 9, 2018)

Check out UP Deck in the resources section.  There's an OBS Lua script you can download (http://8up.uk/doc/26 - currently UPDeck_1-12.lua) with code that changes position, size, rotation of scene items.

Check out line 317 - 355
elseif cmd == "position" or cmd == "resize" or cmd == "rotate" then
  ..........
  ..........

Hope this gets you started!


P.S. - there's some really good documentation : https://obsproject.com/docs/genindex.html


----------

