< Previous | Contents | Next >

Tool Instances

Tools are uniquely named operators of a particular type. Internally a tool is a subset of an Operator that is visible on the flow. It can be a Creator or Filter, 3D Tool, etc. Another example of Operator is a Modifier. It is a like a Tool but deals with Number or Text data instead of Image data. Still you can connect it to Inputs and other Modifiers.

For simplicity, we will talk about Tools most of the time while the techniques may also apply to different Operator types.

Read access to the name and its type is given with tool.Name and tool.ID. For read and write access of the name, use the attribute called TOOLS_Name. Note that the attribute TOOLB_NameSet indicates if the name was manually changed. If not, some tools will show additional information on the tile next to its name. For example, the loader will show the clip’s filename.

Other important attributes are its PassThrough-State with TOOLB_PassThrough and Lock-State with

TOOLB_Locked.

image

==flow:SetPos(Blur1, 5, 1) -- sets the position of Blur1 to x = 5 y = 1

-- prints the position of Blur1

==flow:GetPos(Blur1)

flow = comp.CurrentFrame.FlowView

Similar to the selection state the position of the tool on the FlowView is not part of the tool instance but of the flow.


image

-- Repositions all tools in a column


flow = comp.CurrentFrame.FlowView

flow:QueueSetPos()

If many tools are repositioned, the shown method will be slow. You can queue re-positioning of multiple tools and apply it in one batch like this:



flow:FlushSetPosQueue()

end

flow:QueueSetPos(tool, 0, i)

for i, tool in ipairs(comp:GetToolList()) do

Tools have Inputs and Outputs that are discussed in detail next.


image