Eyeon:Script/Reference/Applications/Fusion/Classes/Operator/GetOutputList

From VFXPedia

Jump to: navigation, search

Contents

Tool : GetOutputList

Summary

This function returns a list of Outputs for the specified tool.


Arguments

GetOutputList(string filter)

filter (string, optional)
This argument can be used to filter the results to return only a specific datatype. Valid values include "Image", "Number", "Point", "Gradient" and "Text".
this argument was added in fusion 5.21


Returns

Returns a table containing handles for the Outputs associated with a tool.


Requirements

  • eyeonScript 5.0
  • Fusion 5.0


Examples

-- this Tool script prints out the name
-- of every output on the selected tool
 
x = tool:GetOutputList()
 
for i,out in pairs(x) do
 
   print(out:GetAttrs().OUTS_Name)
 
end

See Also

GetInputList()


Tips for GetOutputList (edit)

Get connected Tools

This funciton returns all tools that are connected to the given tool.

function GetConnectedNodes(oTool)
	
	local toConnected = {}
	oCurTool = oTool
	bNoEnd = true
	
	while bNoEnd do
		table.insert(toConnected, oCurTool)

		toOutputs = oCurTool:GetOutputList()
		for i = 1, table.getn(toOutputs) do
			y = toOutputs[i]:GetConnectedInputs()
			if y[1] == nil then
				bNoEnd = false
			else
				oCurTool = y[1]:GetTool()
			end
		end
	end
	
	return toConnected
end