Eyeon:Script/Reference/Applications/Fusion/Classes/Link/GetTool
From VFXPedia
< Eyeon:Script | Reference | Applications | Fusion | Classes | Link
Contents |
Link : GetTool()
Arguments
GetTool()
Returns
Returns the Tool handle that this Link belongs to.
Remarks
This function is used to determine the owner Tool of a Link (Input or Output).
One of its applications is that it could find the tool associated with the value of a control that still uses the tool source mechanic in Fusion 5. for instance, a Tracker Modifier's (positioned on a polygon's center control, for instance) TrackerSource.
Requirements
- eyeonScript 5.0
- Fusion 5.0
Examples
-- Get Tracker Modifier's source. -- Tool script used to find a tracker modifier's source. -- Get the tool's attributes. var1=tool:GetAttrs() -- If the tool's RegID is equal to that of a tracker modifier's. if var1.TOOLS_RegID == "TrackerModifier" then -- The tool that we're searching for is the tool that's listed in the "TrackerSource" foundtool = tool.TrackerSource -- Get its connected output. x=foundtool:GetConnectedOutput() -- The GetTool() function gets a tool based on an input or output. thetool=x:GetTool() z=thetool:GetAttrs() foundmaskname=z.TOOLS_Name if foundmaskname==nil then print("ERRORED: EMPTY SOURCE.") else -- Set the comp's focus on the tool that was found by the above code. composition:SetActiveTool( thetool ) print("Found "..foundmaskname) end else print("This is not a bitmap mask.") end
Tips for GetTool (edit)
EyeonTips:Script/Reference/Applications/Fusion/Classes/Link/GetTool