Page 1 of 1

Add tool inputs via lua script

PostPosted: Tue Jan 07, 2020 3:11 am
by Justin Robinson
Hi,

I'm looking for some help with Fusion scripting. A tool I'm working on would benefit significantly if I was able to add tool inputs via lua script. I've found stuff like self:AddInput but this seem to be only for creating a Fuse and can't modify a already created tool like the "Edit Control" tool can. Any recommendations?

My goal is to add a function into a lua script that adds new predefined inputs on a already existing tool.

Re: Add tool inputs via lua script

PostPosted: Tue Jan 07, 2020 2:52 pm
by Bryan Ray
The Edit Controls feature used to be a tool script, and that code can still be found in the VFXPedia archive here:

https://www.steakunderwater.com/VFXPedi ... yeonscript

That script is old enough that it won't run in Fusion 8 or later, but you can glean some useful information from it. Specifically, look for the function AddControl().

Each User Control is described by a Lua table assigned to a variable, which is the control's script name. This page has a description of most controls and the attributes used to set them up:

https://www.steakunderwater.com/VFXPedi ... r_Controls