1) Copy and paste the following code into AnimateBackground.lua (save it somewhere on your filesystem)
-- lua
fps = lxeval( "time.fpsCustom ?" )
frametime = lxeval( "select.time ?" )
ok = lx( "octane.selectKernel" )
local str = string.format("c:\\MyDocuments\\MyBackgroundImage_%04i.jpg", frametime[1] * fps[1]);
ok = lx( "item.channel oc_backgroundImageFilename {".. str .."}" )
2) Each time you move the Modo frame slider, run the above script (via Modo -> System -> Run Script -> AnimateBackground.lua). For frame 0 it will load MyBackgroundImage_0000.jpg. For frame 1, MyBackgroundImage_0001.jpg, etc. You may need to adjust the code to select the correct file.
You can also run the script from the Modo command panel via the following command:
@{c:\PathToTheLuaScript\AnimateBackground.lua}You could also use python code instead of LUA to achieve the same result.
No comments:
Post a Comment