FusionSDK

Quick Reference for DaVinci Resolve Fusion Tags

General tags for Inputs & Outputs

TagTypeDescription
LINKID_DataTypeStringInputs & Outputs can only connect when they share the same DataType.
LINKS_NameStringThe name of this Link. Also used for labels in the Inspector.
LINKID_IDStringThe ID of this Link. Also its key in the UserControls object in macros. Should not contain spaces.
LINK_MainNumberInputs/Outputs with LINK_Main set to a positive integer show up as Inputs/Outputs on the Node in the flow view. The first 4 Main input's have a special color assigned to them. LINK_Main also works on non-Image outputs!
LINK_NotColoredBoolOverride the Default Yellow, Green etc. colors for LINK_Main Inputs.
LINK_ForceSaveBoolAlways save this Link, even if it has not changed from it's default value.
{
    LINKID_DataType = "Image",
    LINK_Main = 1,
}

DataType

Available DataTypes for Inputs & Outputs

DataTypeTypeRelated Classes
ImageImageImage
NumberNumberSliderControl, ScrewControl, CheckboxControl, ComboIDControl, AngleControl, RectangleControl, EllipseControl, ColorControl, RangeControl
PointPointOffsetControl, CrosshairControl
TextTextTextEditControl
FuIDFuIDFuID, FuIDParam, ComboIDControl
ScriptValTableScriptVal, ScriptValParam
{
    LINKID_DataType = "Number"
}

AddInput

In Fuses, Inputs & Outputs are created with the self:AddInput() and self:AddOutput() functions.

self:AddInput(name, id, tags) | self:AddOutput(name, id, tags)
ArgumentTypeDescription
nameStringInput/Output display name.
idStringInput/Output script ID (no spaces).
tagsTableA table of {tag = value} entries.
InControl = self:AddInput("ControlName", "ControlID", {
    LINKID_DataType = "Number",
    INPID_InputControl = "SliderControl",
})

UserControls

In Macros, user created Inputs are stored in the UserControls table.

{
    Tools = ordered() {
        Background1 = Background {
            UserControls = ordered() {
                ControlID = {
                    LINKS_Name = "ControlName",
                    LINKID_DataType = "Number",
                    INPID_InputControl = "SliderControl",
                }
            }
        }
    }
}

Input

General tags for Inputs.

TagTypeDescription
INP_ExternalBoolExternal Inputs can be connected to an external source for Animation and Expressions.
INP_PassiveBoolChanges to this input don't change the output of this tool.
INP_InteractivePassiveBoolLike INP_Passive but keeps Undo events.
INP_AddModifierStringClass ID of a CT_Modifier to create connected to this Input.
INP_DoNotifyChangedBoolChanges to this input fire the NotifyChanged event.
INP_InitialNotifyBoolAre NotifyChanged events fired when the tool is first added to the flow.
INP_RequiredBoolThis Input is required, and the tool will automatically fail if it is not connected.
INP_SendRequestBoolSend requests to connected tools for this Input prior to calling Process().

Number

General tags for Inputs with DataType "Number".

TagTypeDescription
INP_DefaultNumberDefault value for Number Inputs.
INP_MinAllowedNumberDo not allow this Number to be set below this value.
INP_MaxAllowedNumberDo not allow this Number to be set above this value.
INP_MinScaleNumberThe highest value on a slider.
INP_MaxScaleNumberThe lowest value on a slider.
INP_IntegerBoolMust be integer values only.
INP_SplineTypeStringWhat type of easing is used when interpolating between keyframes.

Point

General tags for Inputs with DataType "Point"

TagTypeDescription
INP_DefaultXNumberDefault X value for Point Inputs.
INP_DefaultYNumberDefault Y value for Point Inputs.

FuID

General tags for Inputs with DataType "FuID"

TagTypeDescription
INPID_DefaultIDStringDefault value for FuID Inputs.

Text

General tags for Inputs with DataType "Text"

TagTypeDescription
INPS_DefaultTextStringDefault value for Text Inputs.

InputControl

General tags for Inputs in the Inspector window

TagTypeDescription
INPID_InputControlStringThe Class ID of an InputControl to use in the Inspector window.
IC_NoResetBoolDisable the keyframe column for this control.
IC_NoLabelBoolDisable the label column for this control.
ICD_WidthNumberA width of 1 fills an entire row. Multiple controls can share a row when their widths add up to 1.
ICD_CenterNumberIf a center position is defined a slider will have different scales to the left and right of it, depending on INP_MinScale and INP_MaxScale.
IC_ControlGroupNumberInputControls with the same ControlGroup number are in the same group.
IC_ControlIDNumberControlID specifies which Input this is within the ControlGroup.
IC_VisibleBoolHides the Input from the Inspector window.
IC_DisabledBoolDisables controls from the Inspector window.
IC_DisplayedPrecisionNumberHow many digits are shown after the decimal point in the Inspector.
IC_ControlPageNumberControl page number to add this InputControl to. A special control page, numbered -1, is always visable at the top of the inspector.
ICS_ControlPageStringID of a control page to add this InputControl to.
{
    INPID_InputControl = "SliderControl",
}

LabelControl

An InputControl for adding extra info to the Inspector window. LabelControl can also be used to create Control Nests using the self:BeginControlNest() and self:EndControlNest() methods in Fuses. LabelControl can be used with any DataType.

TagTypeDescription
LBLC_MultiLineBoolThe height of this LabelControl adapts to fit the content. <br> starts a new line.
LBLC_DropDownButtonBoolHides/Shows the Dropdown Arrow for NestControls.
LBLC_NumInputsNumberHow many inputs are Hidden with this Nest.
<br>HTMLLine break in LINKS_Name.
<b>HTMLBold text in LINKS_Name.
<i>HTMLItalic text in LINKS_Name.
<h1,h2,h3,h4,h5>HTMLHeaders in LINKS_Name.
<font color=#ffffff>HTMLFont color in LINKS_Name.
{
    LINKS_Name = "<b>My Bold Title</b>",
    LINKID_DataType = "Number",
    INPID_InputControl = "LabelControl",
    INP_External = false,
    INP_Passive = true,
}

SliderControl

An InputControl for Number Inputs.

TagTypeDescription
SLCS_LowNameStringAn extra label below the left side of the slider.
SLCS_HighNameStringAn extra label below the right side of the slider.
SLCS_MidNameStringAn extra label below the middle of the slider.
{
    LINKID_DataType = "Number",
    INPID_InputControl = "SliderControl",
    INP_Default = 1.0,
    INP_MinScale = 0.0,
    INP_MaxScale = 5.0,
    ICD_Center = 1.0,
}

ScrewControl

An InputControl for Number Inputs.

{
    LINKID_DataType = "Number",
    INPID_InputControl = "ScrewControl",
    INP_Default = 0.0,
    INP_MinScale = 0.0,
    INP_MaxScale = 360.0,
}

ColorControl

An InputControl for Color Input ControlGroups. ControlID (0,1,2,3) is used to set the channel of each input in the group.

Shows a color wheel.
TagTypeDescription
CLRC_ColorSpaceStringHSL, HLS, YUV
CLRC_NoSlidersBoolHide the sliders below the color picker.
CLRC_ShowWheelBool

RangeControl

An InputControl for pairs of Number Input ControlGroups representing a Low to High range. ControlID (0,1) is used for each input.

TagTypeDescription
RNGCS_LowNameStringAdds an additional label below the left side of the slider.
RNGCS_MidNameStringAdds an additional label below the middle of the slider.
RNGCS_HighNameStringAdds an additional label below the right side of the slider.

CheckboxControl

An InputControl for Number Inputs.

TagTypeDescription
CBC_TriStateBoolAdds a third state beyond On/Off.
{
    LINKID_DataType = "Number",
    INPID_InputControl = "CheckboxControl",
    INP_Integer = true,
    INP_Default = 1.0, -- start enabled
}

ButtonControl

An InputControl for momentary push buttons.

TagTypeDescription
BTNCS_ExecuteStringA lua script to be run when the button is pressed.
{
    LINKS_Name = "Press Me!",
    INPID_InputControl = "ButtonControl",
    INP_External = false,
    BTNCS_Execute = "print('hello lua')",
}

OffsetControl

An InputControl for Point Inputs.

{
    LINKID_DataType = "Point",
    INPID_InputControl = "OffsetControl",
    INP_DefaultX = 0.5,
    INP_DefaultY = 0.5,
}

ComboControl

An InputControl for DataType Number dropdown Inputs. Holds the item number selected.

TagTypeDescription
CCS_AddStringString+Add a new entry to the dropdown.
CCS_AddSeparatorString+Add a separator to the dropdown, value is ignored.
{
    LINKID_DataType = "Number",
    INPID_InputControl = "ComboControl",
    INP_Default = 0,
    [1] = { CCS_AddString = "Cavas" },
    [2] = { CCS_AddString = "Wrap" },
    [3] = { CCS_AddString = "Duplicate" },
}

ComboIDControl

An InputControl for DataType FuID dropdown Inputs.

TagTypeDescription
CCS_AddStringString+Add a new entry to the dropdown.
CCID_AddIDFuID+Insert after CCS_AddString to set the FuID value it returns when selected.
CCS_AddSeparatorString+Add a separator to the dropdown, value is ignored.

MultiButtonControl

An InputControl for mutually exclusive buttons.

TagTypeDescription
MBTNC_AddButtonString+Add a new button to the group.
MBTNCS_ToolTipString+Follows MBTNC_AddButton, sets the hover text.
MBTNC_StretchToFitBoolStretch buttons to fill the width of the control.
MBTNC_TypeBoolNormal, Toggle, TriState

TextEditControl

An InputControl for DataType Text.

TagTypeDescription
TEC_LinesNumberNumber of lines to display.
{
    LINKID_DataType = "Text",
    INPID_InputControl = "TextEditControl",
    INPS_DefaultText = "Hello World",
    TEC_Lines = 1,
}

FileControl

An InputControl for Selecting a File Path.

TagTypeDescription
FC_PathBrowseBoolSelect files or folders.
FC_ClipBrowseBoolSelect single Images or Image sequences.
FCS_FilterStringStringOnly show certain file types. Example: "png files (*.png)"

PreviewControl

General tags for Inputs in the viewer

TagTypeDescription
INPID_PreviewControlStringThe Class ID of a PreviewControl to use in the Viewer.
PC_VisibleBoolHides the PreviewControl from the viewer.
PC_DisabledBoolDisables teh PreviewControl.
PC_ControlGroupNumberPreviewControls with the same ControlGroup number are in the same group.
PC_ControlIDNumberThis PreviewControls ID within its ControlGroup.
PC_GrabPriorityNumberThe highest GrabPriority control is used when clicking an area with mulitiple PreviewControls in the viewer.
{
LINKID_DataType = "Point",
INPID_PreviewControl = "CrosshairControl",
}

CrosshairControl

A PreviewControl for Point Inputs.

TagTypeDescription
CHC_StyleFuIDNormalCross, DiagonalCross, Rectangle, Circle, Rays
{
LINKID_DataType = "Point",
INPID_InputControl = "OffsetControl",
INPID_PreviewControl = "CrosshairControl",
}

RectangleControl

A PreviewControl for Rectangles. Connects to multiple inputs, but lives on the Width Input.

TagTypeDescription
PC_ControlIDNumber0 = Width, 1 = Height (see PreivewControl)

TagTypeDescription
RCID_CenterStringID of an Input on this Node to be used as the center position.
RCID_CenterXStringID of an Input on this Node to be used for the X coordinate.
RCID_CenterYStringID of an Input on this Node to be used for the Y coordinate.
RCID_AngleStringID of an Input on this Node to be used for the angle of the rectangle.

TagTypeDescription
RCP_CenterInputReference to an Input object to be used as the center position.
RCP_CenterXInputReference to an Input object to be used as the X coordinate.
RCP_CenterYInputReference to an Input object to be used as the Y coordinate.
RCP_AngleInputReference to an Input object to be used as the angle.

TagTypeDescription
RCD_LockAspectNumberUse a fixed aspect ratio instead of a Height Input.
RCD_SetXNumberSet a fixed X position.
RCD_SetYNumberSet a fixed Y position.
RCD_SetAngleNumberSet a fixed rotation.

{
    LINKS_Name = "Width",
    LINKID_DataType = "Number",
    INPID_InputControl = "SliderControl",
    INPID_PreviewControl = "RectangleControl",
    INP_Default = 0.5,
    PC_ControlGroup = 0,
    PC_ControlID = 0,
}
{
    LINKS_Name = "Height",
    LINKID_DataType = "Number",
    INPID_InputControl = "SliderControl",
    INPID_PreviewControl = "RectangleControl",
    INP_Default = 0.5,
    PC_ControlGroup = 0,
    PC_ControlID = 1,
}

EllipseControl

A PreviewControl for Ellipses & Circles. Connects to multiple inputs, but lives on the Width Input.

TagTypeDescription
PC_ControlIDNumber0 = Width, 1 = Height (see PreivewControl)

TagTypeDescription
ECID_CenterStringID of an Input on this Node to be used as the center position.
ECID_CenterXStringID of an Input on this Node to be used for the X coordinate.
ECID_CenterYStringID of an Input on this Node to be used for the Y coordinate.
ECID_AngleStringID of an Input on this Node to be used for the angle of the ellipse.

TagTypeDescription
ECP_CenterInputReference to an Input object to be used as the center position.
ECP_CenterXInputReference to an Input object to be used as the X coordinate.
ECP_CenterYInputReference to an Input object to be used as the Y coordinate.
ECP_AngleInputReference to an Input object to be used as the angle.

TagTypeDescription
ECD_LockAspectNumberUse a fixed aspect ratio instead of a Height Input.
ECD_SetXNumberSet a fixed X position.
ECD_SetYNumberSet a fixed Y position.
ECD_SetAngleNumberSet a fixed rotation.

{
    LINKS_Name = "Width",
    LINKID_DataType = "Number",
    INPID_InputControl = "SliderControl",
    INPID_PreviewControl = "EllipseControl",
    INP_Default = 0.5,
    PC_ControlGroup = 0,
    PC_ControlID = 0,
}
{
    LINKS_Name = "Height",
    LINKID_DataType = "Number",
    INPID_InputControl = "SliderControl",
    INPID_PreviewControl = "EllipseControl",
    INP_Default = 0.5,
    PC_ControlGroup = 0,
    PC_ControlID = 1,
}

AngleControl

A PreviewControl for Numbers.

TagTypeDescription
ACID_CenterStringID of an Input on this Node to be used as the center position.
{
    LINKID_DataType = "Number",
    INPID_InputControl = "ScrewControl",
    INPID_PreviewControl = "AngleControl",
    ACID_Center = "Center",
}

Examples

Adding a UserControls slider to a Macro setting.

UserControls = ordered() {
    MyControl = {
        LINKS_Name = "MyControl",
        LINKID_DataType = "Number",
        INPID_InputControl = "SliderControl",
        INP_Default = 0,
        INP_MinScale = 0,
        INP_MaxScale = 1,
    }
}

Adding a slider control to a Fuse.

InMyControl = self:AddInput("MyControl", "MyControl", {
    LINKID_DataType = "Number",
    INPID_InputControl = "SliderControl",
    INP_Default = 0,
    INP_MinScale = 0,
    INP_MaxScale = 1,
})

Transform controls in a fuse.


InCenter = self:AddInput("Center", "Center", {
    LINKID_DataType = "Point",
    INPID_InputControl = "OffsetControl",
    INPID_PreviewControl = "CrosshairControl",
})

InSize = self:AddInput("Size", "Size", {
    LINKID_DataType = "Number",

    INPID_InputControl = "SliderControl",
    INP_Default = 1.0,
    INP_MaxScale = 5.0,
    ICD_Center = 1.0,

    INPID_PreviewControl = "RectangleControl",
    RCID_Center = "Center",
    RCID_Angle = "Angle",
    RCD_LockAspect = 1.0,
})

InAngle = self:AddInput("Angle", "Angle", {
    LINKID_DataType = "Number",

    INPID_InputControl = "ScrewControl",
    INP_MaxScale = 360,

    INPID_PreviewControl = "AngleControl",
    ACID_Center = "Center",
})

Registry

General tags for FuRegisterClass

TagTypeDescription
REGS_NameStringNode name
REGS_URLStringProduct / Company URL.
REGS_HelpTopicStringDocumentation / Support URL.
REGS_VersionStringStringUsually a build date.
REG_VersionNumberVersion number.
REGS_OpIconStringStringString used in Toolbars (short).
REGS_CompanyStringCompany name used in about page.
REG_TimeVariantBoolThe output of the tool changes with the frame number.
REG_UnpredictableBoolAvoid caching this tool.
REGB_TemporalBoolSynonym for REG_TimeVariant.
REG_NoCommonCtrlsBoolDisable all common controls (such as Blend).
REG_OpNoMaskBoolDisable the mask Input.
REG_NoPreCalcProcessBoolUse the main Process() function instead of PreCalcProcess().

Modifier specific tags for FuRegisterClass

REGID_DataTypeFuIDMain Operator Output DataType.
REGID_InputDataTypeFuIDMain Operator Input DataType.

Fuse specific tags for FuRegisterClass

TagTypeDescription
REG_Fuse_NoEditBoolDisable the Edit button in inspector.
REG_Fuse_NoReloadBoolDisable the Reload button in inspector.