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

From VFXPedia

Jump to: navigation, search

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