EyeonTips:Script/Reference/Applications/Fuse/Classes/ScriptOperator/BeginControlNest

From VFXPedia

Jump to: navigation, search
  • A ControlNest is just a LabelControl with a dropdown button that shows/hides a certain number of inputs that follow. This means, you can save what is returned by self:BeginControlNest() and hide the dropdown button of the ControlNest by setting IC_Visible to false. Unfortunately, this will not automatically hide all inputs inside the ControlNest. You have to do this yourself. The upside of this is that you can now indent a number of controls using a hidden control nest:
-- hide by default:
InTestNest = self:BeginControlNest("Nest1", "Nest1", true, {IC_Visible = false})
   -- indented controls go here...
self:EndControlNest
-- show dropdown button again
InTestNest:SetAttrs({IC_Visible = true})
  • The little pick buttons that had been introduced for 3D positions in Fusion 6.14 can also be added to a ControlNest. You have to add LBLC_PickButton = true as an attribute to add a pick button that feeds its values to all the inputs inside the ControlNest. Each input needs an appropriate IC_ControlID parameter that defines which channel of the image gets picked (a list of channel numbers can be found here). This is an example for picking XYZ position values:
self:BeginControlNest("Something", "SomethingNest", true, {LBLC_PickButton = true });
 
   Input1 = self:AddInput("X Offset", "XOffset", {
       LINKID_DataType = "Number",
       INPID_InputControl = "SliderControl",
       IC_ControlID = 25 })
   Input2 = self:AddInput("Y Offset", "YOffset", {
       LINKID_DataType = "Number",
       INPID_InputControl = "SliderControl",
       IC_ControlID = 26 })
   Input3 = self:AddInput("Z Offset", "ZOffset", {
       LINKID_DataType = "Number",
       INPID_InputControl = "SliderControl",
       IC_ControlID = 27 })
self:EndControlNest()