< Previous | Contents | Next >

Usage

Input:SetSource(various value, number time)

value (object, required)

The value which should be assigned to the input. The type will vary according to the inputs LINKID_DataType attribute. The value should be one of Fusion’s datatypes, like

Number, Text, or Point. This means a call like Input:SetSource("some text", 0) would fail, but Input:SetSource(Text("some text"), 0) would work.

time (number, required)

The frame at which to set the input value. If an input is animated, this will ensure the value sets the appropriate keyframe.


function Create()

InRed = self:AddInput("Red", "Red", { INPID_InputControl = "SliderControl", INP_Default = 1.0, INP_DoNotifyChanged = true, INP_External = false

})

--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function Process(req)

InRed:SetSource(Number(5.0),0)--This will set the slider to 5.0