Eyeon:Script/Reference/Applications/Fusion/Classes/FlowView/Select

From VFXPedia

Jump to: navigation, search

Contents

FlowView : Select

Usage

FlowView:Select([object tool, boolean select] )


Arguments

  • tool (object, optional)

This argument should contain the tool that will be selected or deselected in the FlowView.

  • select (boolean, optional)

Setting this argument to false will deselect the tool specified in the first argument. Otherwise the default value of true is used, which selects the tool.


Returns

This function does not return a value.


Remarks

This function will add or remove the tool specified in it's first argument from the current tool selection set. The second argument should be set to false to remove the tool from the selection, or to true to add it. If called with no arguments, the function will clear all tools from the current selection.


Example

The following toolscript would select all tools upstream of (before) the current tool.

function recurseSelect(t)
	-- if the current tool has image inputs, select them, otherwise return nil
	flow:Select(t)
	
	for i, inp in t:GetInputList() do 
 
		if valid_types[inp:GetAttrs().INPS_DataType] then
			local output = inp:GetConnectedOutput()
			if output then
				recurseSelect(output:GetTool())
			end
		end
	end
	
end
 
-- table containing boolean values for the input types we want to follow. 
valid_types = {
	Image = true, 
	Particles = true, 
	Mask = true,
	DataType3D = true,
	}
 
flow = comp.CurrentFrame.FlowView
flow:Select() -- clear current selections
 
recurseSelect(tool)


Tips for Select (edit)

EyeonTips:Script/Reference/Applications/Fusion/Classes/FlowView/Select