EyeonTips:Script/Reference/Applications/Fusion/Classes/Operator/FindMainInput

From VFXPedia

< EyeonTips:Script | Reference/Applications/Fusion/Classes/Operator
Revision as of 11:43, 22 November 2011 by Milho (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Loop through all main inputs. LUA:

tool = comp.ActiveTool
i = 1
while true do
  inp = (tool:FindMainInput(i))
  if inp == nil then
        break
  end
 
  -- Got input
  print (inp:GetAttrs().INPS_Name)
  i = i + 1
end

PYTHON:

tool = comp.ActiveTool
 
i = 1
while True:
        inp = tool.FindMainInput(i)
        if inp is None:
                break
 
        # Got input
        print(inp.GetAttrs()["INPS_Name"])
        i+=1