Eyeon:Script/Reference/Applications/Fusion/Classes/Composition/GetToolList
From VFXPedia
< Eyeon:Script | Reference | Applications | Fusion | Classes | Composition
Contents |
Composition : GetToolList
Arguments
GetToolList ( selected, toolID )
- selected (optional, boolean)
If the selected argument is set to true then GetToolList returns a list of handles to the selected tools in the composition. If no tools are selected then the table returned is null. If the selected argument is false, or empty then a table with handles to all tools in the composition are returned.
- toolID(optional, String)
This string value will limit the return of the GetToolList function to tools of a specific type (this type is related to the TOOLS_RegID attribute).
Returns
Returns a table containing handles to tools in the composition
Remarks
Requirements
- eyeonScript 5.0
- Fusion 5.0
Examples
-- outputs the name of every tool in the composition local toollist = composition:GetToolList() for i, tool in toollist do print( tool:GetAttrs().TOOLS_Name ) end -- Get all loaders lds = comp:GetToolList(false, "Loader") -- Composition script that flattens xforms on all selected tools local toollist = composition:GetToolList(true) for i, tool in toollist do if tool.FlattenTransform then tool.FlattenTransform = 1 end end
Tips for GetToolList (edit)
Workaround for hidden tools
Fusion 5.1 seems to also return hidden tools (curves on CCVs e.g). Here is a workaround:
-- ### Workaround for Fusions Way of handling Inputs as Tools in GetToolList (hidden Tools are selected) local oToollist = composition:GetToolList(true) -- # insert true or false here local oVisibleToollist = {} -- # Table for(not-hidden) tools for i, tool in oToollist do if tool:GetAttrs().TOOLB_Visible == true then table.insert( oVisibleToollist , tool ) end end -- ### Process oVisibleToollist -- ...