< Previous | Contents | Next >

Methods

PlainInput.ConnectTo()

Note: This method is overloaded and has alternative parameters. See other definitions. Connect the Input to an Output.

Note that ConnectTo is not needed to connect inputs and outputs. Setting an input equal to an output behaves the same.

out is equal to an output of some sort that will be connected to the input that the function is run on. Will disconnect the input from any outputs if connected to a nil value.


image

myblur = comp.Blur()

# Connect

myblur.Input.ConnectTo(mybg.Output)

# Disconnect

# Now the same with the = operator

# Connect

# Disconnect

myblur.Input = None

myblur.Input = mybg.Output

myblur.Input.ConnectTo()

mybg = comp.Background()

> Python usage:



image

myblur = Blur()

-- Connect

myblur.Input:ConnectTo(mybg.Output)

-- Disconnect

myblur.Input:ConnectTo()

mybg = Background()

> Lua usage:



image



image


-- Now the same with the = operator

-- Connect

myblur.Input = mybg.Output

-- Disconnect

myblur.Input = nil

> Returns: success

> Return type: boolean

PlainInput.ConnectTo(out)

Note: This method is overloaded and has alternative parameters. See other definitions. Connect the Input to an Output.

Note that ConnectTo is not needed to connect inputs and outputs. Setting an input equal to an output behaves the same.

out is equal to an output of some sort that will be connected to the input that the function is run on. Will disconnect the input from any outputs if connected to a nil value.


image

myblur = comp.Blur()

# Connect

myblur.Input.ConnectTo(mybg.Output) # Disconnect

# Now the same with the = operator

# Connect

# Disconnect

myblur.Input = None

myblur.Input = mybg.Output

myblur.Input.ConnectTo()

mybg = comp.Background()

> Python usage:



image


image

myblur = Blur()

-- Connect

myblur.Input:ConnectTo(mybg.Output)

-- Disconnect

-- Now the same with the = operator

-- Connect

-- Disconnect

myblur.Input = nil

myblur.Input = mybg.Output

myblur.Input:ConnectTo()

mybg = Background()

> Lua usage:



> Parameters:

out (Output) – out

> Returns: success

> Return type: boolean

PlainInput.GetConnectedOutput()

Returns the output that this input is connected to.

Note by design an Input can only be connected to a single Output, while an Output might be branched and connected to multiple Inputs.

> Returns: out

> Return type: Output

PlainInput.GetExpression()

Returns the expression string shown within the Input’s Expression field, if any, or nil if not.

Simple expressions can be very useful for automating the relationship between controls, especially in macros and commonly-used comps.

PlainInput.GetKeyFrames()

Return a table of all keyframe times for this input. If a tool control is not animated with a spline this function will return nil.


image


The GetKeyFrames() function is used to determine what frames of an input have been keyframed on a spline. It returns a table that shows at what frames the user has defined key frames for the input.

> Returns: keyframes

> Return type: table

PlainInput.HideViewControls(hide)

Hides or shows the view controls for this input.

Use this function to hide or expose a view control in the display view.

hide if set or true then hide the controls else show them.


image

# Hide Center position transform controls


comp.Transform1.Center.HideViewControls()

# Show Center position transform controls


comp.Transform1.Center.HideViewControls(False)

> Python usage:



image


-- Show Center position transform controls

Transform1.Center:HideViewControls(false)

Transform1.Center:HideViewControls()

-- Hide Center position transform controls

> Lua usage:



> Parameters:

hide (boolean) – hide

PlainInput.HideWindowControls(hide)

Hides or shows the window controls for this input.

Use this function to hide or expose a window control in the tool properties window. For instance, this could be used to hide all gamma controls on Brightness / Contrasts to prevent user manipulation.

hide if set or true then hide the controls else show them.


image


image

# Hide Center from properties


comp.Transform1.Center.HideWindowControls()


# Show Center in properties


comp.Transform1.Center.HideWindowControls(False)

> Python usage:



image

-- Hide Center from properties


Transform1.Center:HideWindowControls()


-- Show Center in properties


Transform1.Center:HideWindowControls(false)

> Lua usage:



> Parameters:

hide (boolean) – hide

PlainInput.SetExpression()

This function reveals the expression field for the Input, and sets it to the given string.

Simple expressions can be very useful for automating the relationship between controls, especially in macros and commonly-used comps.


comp.BrightnessContrast1.Gamma.SetExpression(“Gain * 0.4”)

comp.BrightnessContrast1.Lift.SetExpression(“Gain * 0.7”)

# Make Lift and Gamma relate to Gain

> Python usage:



BrightnessContrast1.Gamma:SetExpression(“Gain * 0.4”)

BrightnessContrast1.Lift:SetExpression(“Gain * 0.7”)

-- Make Lift and Gamma relate to Gain

> Lua usage:



image


PlainInput.ViewControlsVisible()

Returns the visible state of the view controls for this input.

> Returns: hidden

> Return type: boolean

PlainInput.WindowControlsVisible()

Returns the visible state of the window controls for this input.

> Returns: hidden

> Return type: boolean