EyeonTips:Script/Tutorials/Command Line

From VFXPedia

Jump to: navigation, search

The manual page for eyeon.executebg() contains this useful snippet which can be used to launch Fusion from a command line script in case it isn't running yet:

-- Connect to Fusion, starting it first if necessary
 
function StartFusion()
   local fusion = Fusion("127.0.0.1")
   if not fusion then
      if executebg("C:\\Program Files\\eyeon\\Fusion 6.1\\Fusion.exe") then
         while fusion == nil do
            wait(1)
            fusion = Fusion("127.0.0.1")
         end
      else
         return nil
      end
   end
   return fusion
end