
- Posts: 245
- Joined: Mon May 13, 2019 10:38 pm
- Real Name: Ben Hall
I've tried a few different ways to get the value from the Render Frame In and pass it to a script on another button. Tried GetAttribs, set the tool to implicitly be a number before adding it into the script but it's not working. What am I missing here?
- Screenshot 2023-06-07 145230.png (40.23 KiB) Viewed 783 times
- Code: Select all
{
Tools = ordered() {
RangeSaver_1 = Saver {
Inputs = {
Blend = Input {
Value = 0,
},
ProcessWhenBlendIs00 = Input { Value = 0, },
Clip = Input {
Value = Clip {
Length = 0,
Saving = true,
TrimIn = 0,
ExtendFirst = 0,
ExtendLast = 0,
Loop = 1,
AspectMode = 0,
Depth = 0,
TimeCode = 0,
GlobalStart = -2000000000,
GlobalEnd = -2000000000
},
},
OutputFormat = Input { Value = FuID { "OpenEXRFormat" }, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
renderFrameIn = Input { Value = 10, },
renderFrameOut = Input { Value = 20, },
},
ViewInfo = OperatorInfo {
Pos = { 11110, 1897.5 },
Flags = {
ShowPic = true
}
},
UserControls = ordered() {
renderFrameIn = {
INP_Integer = true,
INP_MinAllowed = 0,
LINKID_DataType = "Number",
ICS_ControlPage = "File",
INPID_InputControl = "ScrewControl",
LINKS_Name = "Render Frame In",
},
renderFrameOut = {
INP_Integer = true,
INP_MinAllowed = 0,
LINKID_DataType = "Number",
ICS_ControlPage = "File",
INPID_InputControl = "ScrewControl",
LINKS_Name = "Render Frame Out",
},
SOLO = {
LINKS_Name = "Solo",
ICS_ControlPage = "File",
BTNCS_Execute = " \n function check_selected(tool)\n return tool:GetAttrs('TOOLB_Selected')\n end\n\n function check_enabled(tool)\n return tool:GetAttrs('TOOLB_PassThrough')\n end\n\n local comp = fu:GetCurrentComp()\n local selectedSavers = comp:GetToolList(true, \"Saver\")\n local allSavers = comp:GetToolList(false, \"Saver\")\n\n comp:StartUndo(\"Solo Saver\")\n \n for _, currentSaver in pairs(allSavers) do\n if not check_selected(currentSaver) then\n currentSaver:SetAttrs( { TOOLB_PassThrough = true } )\n end\n end\n \n for _, sel in pairs(selectedSavers) do\n if check_enabled(sel) then\n sel:SetAttrs({ TOOLB_PassThrough = false})\n end\n end \n comp:EndUndo()\n ",
LINKID_DataType = "Number",
INPID_InputControl = "ButtonControl",
INP_Default = 0,
},
RENDER = {
LINKS_Name = "Render",
ICS_ControlPage = "File",
BTNCS_Execute = "composition:Render(true, 23, 53, 1)",
LINKID_DataType = "Number",
INPID_InputControl = "ButtonControl",
INP_Default = 0,
}
}
}
}
}