Eyeon:Script/Reference/Applications/Fuse/Classes/ScriptOperator/AddControlPage
From VFXPedia
< Eyeon:Script | Reference | Applications | Fuse | Classes | ScriptOperator
Contents |
Summary
The AddControlPage function is found in the Create portion of the Fuse tool. It is used to organize tool controls into separate tabs. If this function is not used then all of the controls described in the Create() function will appear in the Control Window under a single default tab titled "Controls". All controls defined under the AddControlPage function will appear in that control page until the AddControlPage function is called again.
Usage
self:AddControlPage(string tabname)
- tabname (string, required)
- The tabname argument is a string value used to set the label that describes the Tab in the control window.
Example
The following code shows a portion of the Create section of a tool that presents two sliders, one on a tab called 'Controls', and the second on a tab called 'Other'.
function Create() self:AddControlPage("Controls") InStrength = self:AddInput("Strength", "Strength", { LINKID_DataType = "Number", INPID_InputControl = "SliderControl", INP_Default = 0.1, INP_MinScale = -1.0, INP_MaxScale = 1.0, }) self:AddControlPage("Other") InPower = self:AddInput("Power", "Power", { LINKID_DataType = "Number", INPID_InputControl = "SliderControl", INP_Default = 2.0, INP_MinScale = 1.0, INP_MaxScale = 5.0, })
Tips for AddControlPage (edit)
- Each fuse gets a "Controls" tab by default. If you want to rename your first tab, you can hide "Controls" like this (taken from RealFastNoise.fuse):
self:AddControlPage("Controls", { CT_Visible = false }) self:AddControlPage("Noise")