Welcome to WSL!

Make yourself at home, but before posting, please may I ask you to read the following topics.


Posting 101
Server space, screenshots, and you

Thank you!

PS. please pretty please:


Image

Modifier nodes

Moderator: Chad

User avatar
Chad
Fusionator
Posts: 1538
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 21 times

Modifier nodes

#1

Post by Chad » Sun Aug 28, 2016 11:40 am

Officially move modifiers to the flow. We've had a fun time hacking it ourselves but it's 80% of the way there. Paint might be the tricky one, but ignoring that, it almost works now, maybe just needs better tile thumbnails. The viewer for gradients makes a 3D histogram instead of rendering the gradient, but yeah, it's so close to working...

JPDoc
Fusionista
Posts: 261
Joined: Tue Sep 02, 2014 8:26 am
Answers: 1
Been thanked: 4 times

Re: Modifier nodes

#2

Post by JPDoc » Sun Aug 28, 2016 12:15 pm

Moving modifiers into the flow is also a great idea.

User avatar
Firebird
Posts: 26
Joined: Thu Nov 20, 2014 2:07 am
Location: Austria,Vienna
Contact:

Re: Modifier nodes

#3

Post by Firebird » Mon Aug 29, 2016 4:48 am

Thats a great Idea +1

Would make it a lot easier to work with modifiers, and for me fits better into the fusion style of doing things, then they are now.

User avatar
thibaud
Fusioneer
Posts: 203
Joined: Thu Sep 04, 2014 1:23 am
Been thanked: 7 times
Contact:

Re: Modifier nodes

#4

Post by thibaud » Mon Aug 29, 2016 5:38 am

yeah this has been longstanding and really makes sense

User avatar
Kristof
Fusionista
Posts: 835
Joined: Thu Aug 07, 2014 1:30 pm
Answers: 3
Been thanked: 29 times

Re: Modifier nodes

#5

Post by Kristof » Mon Aug 29, 2016 5:57 am

Yeah, definitely! But break it open completely and expose much more in the flow editor. (have a post about that).

User avatar
Chad
Fusionator
Posts: 1538
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 21 times

Re: Modifier nodes

#6

Post by Chad » Mon Aug 29, 2016 10:01 am

I've got an example of one, took Pieter's TimeMachine modifier and created a flow tool out of it. Took all of maybe 3 minutes to do. Lemme see if I can find it... It kind of gives you an idea of what is already possible and what is still missing.

User avatar
Dunn
Moderator
Posts: 495
Joined: Mon Aug 04, 2014 4:27 am
Location: Hamburg, Germany
Been thanked: 8 times
Contact:

Re: Modifier nodes

#7

Post by Dunn » Mon Aug 29, 2016 5:52 pm

Oh yeah, Chad, please share it ( if you find it ) .. would be nice to see how its done.

User avatar
Chad
Fusionator
Posts: 1538
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 21 times

Re: Modifier nodes

#8

Post by Chad » Mon Aug 29, 2016 7:43 pm

This is the raw first version. I didn't do any cleanup on this, it's just to show how easy it is to make.
Code: [Select all] [Expand/Collapse] [Download] (TimeMachine.fuse)
  1. --[[
  2.  
  3. Time Machine Modifier Fuse
  4.  
  5. -------------------------------------------------------------------
  6. Copyright (c) 2012-2015,  Pieter Van Houte
  7. <pieter[at]secondman[dot]com>
  8. -------------------------------------------------------------------
  9.  
  10. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  11.  
  12. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  13.  
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  15. -------------------------------------------------------------------
  16.  
  17. --]]
  18.  
  19. version = "Time Machine v1.6 - Pi Day 2015"
  20.  
  21. FuRegisterClass("TimeMachineTest", CT_Tool, {
  22.     REGS_Category       = "Fuses",
  23.     REGS_OpIconString   = "TMn",
  24.     REGS_OpDescription  = "Advanced Retime Modifier",
  25.     REGS_Name           = "Time Machine Test",
  26.     REGID_DataType      = "Number",
  27.     REGID_InputDataType = "Number",
  28.     REG_TimeVariant     = true,         -- required to disable caching of the current time parameter
  29.     REGS_Company        = "Pieter Van Houte",
  30.     REGS_URL            = "http://www.secondman.com",
  31.     REGS_HelpTopic      = "https://www.steakunderwater.com/wesuckless/viewtopic.php?f=6&t=74",
  32.     REG_OpNoMask = true,
  33.     REG_NoBlendCtrls = true,
  34.     REG_NoObjMatCtrls = true,
  35.     REG_NoCommonCtrls = true,
  36.     --REG_Fuse_NoEdit     = true,
  37.     --REG_Fuse_NoReload   = true,
  38.     })
  39.    
  40. function Create()
  41.    
  42.     InNumber = self:AddInput("Input", "Input", {
  43.         LINKID_DataType = "Number",
  44.         LINK_Main = 1,
  45.         INPID_InputControl = "ScrewControl",
  46.         INP_Required = true,
  47.         }) 
  48.        
  49.     InMode = self:AddInput("Mode", "Mode", {
  50.         LINKID_DataType = "FuID",
  51.         INPID_InputControl = "MultiButtonIDControl",
  52.         INPID_DefaultID = "Warp",
  53.         INP_DoNotifyChanged  = true,
  54.         { MBTNCD_ButtonWidth = 0.33333, MBTNC_AddButton = "Warp", MBTNCID_AddID = "Warp", },
  55.         { MBTNC_AddButton = "Remap", MBTNCID_AddID = "Remap", },
  56.         { MBTNC_AddButton = "Delta", MBTNCID_AddID = "Delta", },
  57.         { MBTNC_AddButton = "Lock Start", MBTNCID_AddID = "LockStart"},
  58.         { MBTNC_AddButton = "Lock End", MBTNCID_AddID = "LockEnd", },
  59.         { MBTNC_AddButton = "Random", MBTNCID_AddID = "Random", },
  60.         { MBTNC_AddButton = "Hold", MBTNCID_AddID = "Hold", },
  61.         { MBTNC_AddButton = "Skip", MBTNCID_AddID = "Skip", },
  62.         { MBTNC_AddButton = "Offset", MBTNCID_AddID = "Offset", },
  63.         { MBTNC_AddButton = "Trigger", MBTNCID_AddID = "Trigger", },
  64.         { MBTNC_AddButton = "Switch", MBTNCID_AddID = "Switch", },
  65. --      { MBTNC_AddButton = "Pattern", MBTNCID_AddID = "Pattern", },
  66.         { MBTNC_AddButton = "XSheet", MBTNCID_AddID = "XSheet", },
  67.         })
  68.        
  69.     InDeltaMode = self:AddInput("Delta Mode", "DeltaMode", {
  70.         { MBTNC_AddButton = "Sum", MBTNCID_AddID = "Sum", },
  71.         { MBTNC_AddButton = "Slope", MBTNCID_AddID = "Slope", },
  72.         INPID_DefaultID = "Sum",
  73.         LINKID_DataType = "FuID",
  74.         INPID_InputControl = "MultiButtonIDControl",
  75.         MBTNC_StretchToFit = true,
  76.         INP_External = false,
  77.         })
  78.        
  79.     InTriggerMode = self:AddInput("Trigger Mode", "TriggerMode", {
  80.         { MBTNCD_ButtonWidth = 0.5, MBTNC_AddButton = "Reset", MBTNCID_AddID = "Reset", },
  81.         { MBTNC_AddButton = "Hold", MBTNCID_AddID = "Hold", },
  82.         { MBTNC_AddButton = "Hold And Reset", MBTNCID_AddID = "Hold And Reset", },
  83.         { MBTNC_AddButton = "Bounce", MBTNCID_AddID = "Bounce", },
  84.         INPID_DefaultID = "Reset",
  85.         LINKID_DataType = "FuID",
  86.         INPID_InputControl = "MultiButtonIDControl",
  87.         MBTNC_StretchToFit = true,
  88.         INP_External = false,
  89.         })
  90.    
  91.     InSourceStartFrame = self:AddInput("Source Start Frame", "SourceStartFrame", {
  92.         LINKID_DataType = "Number",
  93.         INPID_InputControl = "ScrewControl",
  94.         INP_MaxScale = 100,
  95.         INP_Integer = true,
  96.         })
  97.        
  98.     InSourceEndFrame = self:AddInput("Source End Frame", "SourceEndFrame", {
  99.         LINKID_DataType = "Number",
  100.         INPID_InputControl = "ScrewControl",
  101.         INP_Default = 50,
  102.         INP_MaxScale = 100,
  103.         INP_Integer = true,
  104.         })
  105.        
  106.     InReverse = self:AddInput("Reverse", "Reverse", {
  107.         INPID_InputControl  = "CheckboxControl",
  108.         })
  109.        
  110.     InTimeWarp = self:AddInput("Time Warp", "TimeWarp", {
  111.         LINKID_DataType = "Number",
  112.         INPID_InputControl = "SliderControl",
  113.         })
  114.        
  115.     InDelta = self:AddInput("Delta", "Delta", {
  116.         LINKID_DataType = "Number",
  117.         INPID_InputControl = "ScrewControl",
  118.         INP_Default = 1,
  119.         })
  120.        
  121.     InDeltaScale = self:AddInput("Delta Scale", "DeltaScale", {
  122.         LINKID_DataType = "Number",
  123.         INPID_InputControl = "ScrewControl",
  124.         INP_Default = 1,
  125.         })
  126.        
  127.     InDeltaThreshold = self:AddInput("Delta Threshold", "DeltaThreshold", {
  128.         LINKID_DataType = "Number",
  129.         INPID_InputControl = "ScrewControl",
  130.         INP_Default = 0,
  131.         })
  132.        
  133.     InDeltaDirection = self:AddInput("Delta Direction", "DeltaDirection", {
  134.         { MBTNC_AddButton = "Up", MBTNCID_AddID = "Up", },
  135.         { MBTNC_AddButton = "Down", MBTNCID_AddID = "Down", },
  136.         INPID_DefaultID = "Up",
  137.         LINKID_DataType = "FuID",
  138.         INPID_InputControl = "MultiButtonIDControl",
  139.         MBTNC_StretchToFit = true,
  140.         INP_External = false,
  141.         })
  142.        
  143.     InSpeed = self:AddInput("Speed", "Speed", {
  144.         LINKID_DataType = "Number",
  145.         INPID_InputControl = "ScrewControl",
  146.         INP_MaxScale = 24,
  147.         INP_Default = 1,
  148.         })
  149.        
  150.     InStep = self:AddInput("Step", "Step", {
  151.         LINKID_DataType = "Number",
  152.         INPID_InputControl = "SliderControl",
  153.         INP_MinScale = 1,
  154.         INP_MaxScale = 24,
  155.         INP_Default = 1,
  156.         INP_Integer = true,
  157.         })
  158.        
  159.     InSpeedMode = self:AddInput("Speed Mode", "SpeedMode", {
  160.         { MBTNC_AddButton = "Speed", MBTNCID_AddID = "Speed", },
  161.         { MBTNC_AddButton = "Step", MBTNCID_AddID = "Step", },
  162.         INPID_DefaultID = "Speed",
  163.         LINKID_DataType = "FuID",
  164.         INPID_InputControl = "MultiButtonIDControl",
  165.         MBTNC_StretchToFit = true,
  166.         })
  167.        
  168.     InRandomSeed = self:AddInput("Random Seed", "Randomseed", {
  169.         INP_Integer = true,
  170.         INPID_InputControl = "SliderControl",
  171.         LINKID_DataType = "Number",
  172.         INP_MaxScale = 16000,
  173.         INP_Default = 0,
  174.         })
  175.            
  176.     InSkip = self:AddInput("Skip", "Skip", {
  177.         INP_Integer = true,
  178.         INP_MinAllowed = 1,
  179.         LINKID_DataType = "Number",
  180.         INPID_InputControl = "SliderControl",
  181.         INP_MaxScale = 24,
  182.         INP_MinScale = 1,
  183.         })
  184.        
  185.     InOffset = self:AddInput("Offset", "Offset", {
  186.         INP_Integer = true,
  187.         INPID_InputControl = "ScrewControl",
  188.         INP_MaxScale = 100,
  189.         LINKID_DataType = "Number",
  190.         })
  191.  
  192.     InHold = self:AddInput("Hold", "Hold", {
  193.         INP_Integer = true,
  194.         LINKID_DataType = "Number",
  195.         INP_MaxScale = 100,
  196.         INPID_InputControl = "ScrewControl",
  197.         })
  198.        
  199.     InXSheetSize = self:AddInput("Xsheet Size", "XSheetSize", {
  200.         INP_DoNotifyChanged  = true,
  201.         INP_Integer = true,
  202.         LINKID_DataType = "Number",
  203.         INP_MaxScale = 100,
  204.         INP_MinAllowed = 1,
  205.         INP_Default = 30,
  206.         INPID_InputControl = "ScrewControl",
  207.         })
  208.        
  209.     InXSheet = self:AddInput("", "XSheet", {
  210. --      INP_DoNotifyChanged  = true,
  211.         ICD_Width = 0.7,
  212.         INP_External = false,
  213.         LINKID_DataType = "Text",
  214.         INPID_InputControl = "TextEditControl",
  215.         INPS_DefaultText = "",          -- use instead of INP_Default!
  216.         TEC_Lines = 30,                 -- height of text entry (default is 8)
  217. --      TEC_DeferSetInputs = true,      -- call NotifyChanged when focus is lost (default is false, call on every key stroke)
  218.         })
  219.        
  220.     OutXFrameNumbers = self:AddInput("", "XFrameNumbers", {
  221.         ICD_Width = 0.3,
  222.         INP_External = false,
  223.         INP_Disabled = true,
  224.         INP_Passive = true,
  225.         LINKID_DataType = "Text",
  226.         INPID_InputControl = "TextEditControl",
  227.         INPS_DefaultText = "",
  228.         TEC_Lines = 30,
  229.         })
  230.                
  231.     InTrigger = self:AddInput("Trigger", "Trigger", {
  232.         LINKID_DataType = "Number",
  233.         INPID_InputControl = "SliderControl",
  234.         INP_Default = 0,
  235.         })
  236.        
  237.     InOnTriggerThreshold = self:AddInput("On Trigger Threshold", "OnTriggerThreshold", {
  238.         LINKID_DataType = "Number",
  239.         INPID_InputControl = "SliderControl",
  240.         INP_Default = 0.8,
  241.         })
  242.  
  243.     InOffTriggerThreshold = self:AddInput("Off Trigger Threshold", "OffTriggerThreshold", {
  244.         LINKID_DataType = "Number",
  245.         INPID_InputControl = "SliderControl",
  246.         INP_Default = 0.2,
  247.         })
  248.    
  249.     InRunSpeed = self:AddInput("Run Speed", "RunSpeed", {
  250.         LINKID_DataType = "Number",
  251.         INPID_InputControl = "ScrewControl",
  252.         INP_MaxScale = 24,
  253.         INP_Default = 1,
  254.         })
  255. --[[       
  256.     InMinRunLength = self:AddInput("Min Run Length", "MinRunLength", {
  257.         LINKID_DataType = "Number",
  258.         INPID_InputControl = "ScrewControl",
  259.         INP_MinAllowed = 1,
  260.         INP_MinScale = 1,
  261.         INP_MaxScale = 100,
  262.         INP_Integer = true,
  263.         INP_Default = 1,
  264.         })
  265.        
  266.     InMaxRunLength = self:AddInput("Max Run Length (0 For No Max)", "MaxRunLength", {
  267.         LINKID_DataType = "Number",
  268.         INPID_InputControl = "ScrewControl",
  269.         INP_MinAllowed = 0,
  270.         INP_MinScale = 0,
  271.         INP_MaxScale = 100,
  272.         INP_Integer = true,
  273.         INP_Default = 0,
  274.         })
  275. --]]
  276.     InTriggerDirection = self:AddInput("Trigger Direction", "TriggerDirection", {
  277.         { MBTNC_AddButton = "Up", MBTNCID_AddID = "Up", },
  278.         { MBTNC_AddButton = "Down", MBTNCID_AddID = "Down", },
  279.         INPID_DefaultID = "Up",
  280.         LINKID_DataType = "FuID",
  281.         INPID_InputControl = "MultiButtonIDControl",
  282.         MBTNC_StretchToFit = true,
  283.         INP_External = false,
  284.         })
  285.    
  286.     InSwitchStartFrames = self:AddInput("Switch Start Frames", "SwitchStartFrames", {
  287.         INP_External = false,
  288.         LINKID_DataType = "Text",
  289.         INPID_InputControl = "TextEditControl",
  290.         INPS_DefaultText = "",          -- use instead of INP_Default!
  291.         TEC_Lines = 10,                 -- height of text entry (default is 8)
  292.         })
  293.        
  294.     InSwitch = self:AddInput("Switch", "Switch", {
  295.         LINKID_DataType = "Number",
  296.         INPID_InputControl = "ScrewControl",
  297.         INP_MaxScale = 24,
  298.         INP_Default = 1,
  299.         INP_Integer = true,
  300.         INP_MinAllowed = 1,
  301.         })
  302. --[[       
  303.     InPattern = self:AddInput("Pattern", "Pattern", {
  304.         INP_External = false,
  305.         LINKID_DataType = "Text",
  306.         INPID_InputControl = "TextEditControl",
  307.         INPS_DefaultText = "",          -- use instead of INP_Default!
  308.         TEC_Lines = 10,                 -- height of text entry (default is 8)
  309.         })
  310.        
  311.     InPatternOffset = self:AddInput("Pattern Offset", "PatternOffset", {
  312.         LINKID_DataType = "Number",
  313.         INPID_InputControl = "ScrewControl",
  314.         INP_MaxScale = 100,
  315.         INP_Default = 0,
  316.         INP_Integer = true,
  317.         })
  318. --]]       
  319.     InForceTargetRange = self:AddInput("Force Target Range", "ForceTargetRange", {
  320.         LINKID_DataType = "Number",
  321.         INPID_InputControl = "CheckboxControl",
  322.         INP_DoNotifyChanged  = true,
  323.         })
  324.        
  325.     InTargetStartFrame = self:AddInput("Target Start Frame", "TargetStartFrame", {
  326.         LINKID_DataType = "Number",
  327.         INPID_InputControl = "ScrewControl",
  328.         INP_DoNotifyChanged  = true,        -- this if for XSheet Frame Number Output
  329.         INP_Default = 0,
  330.         INP_MaxScale = 100,
  331.         INP_Integer = true,
  332.         })
  333.        
  334.     InTargetEndFrame = self:AddInput("Target End Frame", "TargetEndFrame", {
  335.         LINKID_DataType = "Number",
  336.         INPID_InputControl = "ScrewControl",
  337.         INP_Default = 120,
  338.         INP_MaxScale = 100,
  339.         INP_Integer = true,
  340.         })
  341.            
  342.     InBeforeTime = self:AddInput("Before Time", "BeforeTime", {
  343.         { CCS_AddString = "Constant", CCID_AddID = "Constant", },
  344.         { CCS_AddString = "Continue", CCID_AddID = "Continue", },
  345.         { CCS_AddString = "Loop", CCID_AddID = "Loop", },
  346.         { CCS_AddString = "Ping Pong", CCID_AddID = "PingPong", },
  347.         { CCS_AddString = "Inclusive Ping Pong", CCID_AddID = "InclusivePingPong", },
  348.         { CCS_AddString = "Hold", CCID_AddID = "Hold", },
  349.         { CCS_AddString = "Random", CCID_AddID = "Random", },
  350.         { CCS_AddString = "Do Nothing", CCID_AddID = "DoNothing", },
  351.         LINKID_DataType = "FuID",
  352.         LINKS_Name = "Before Time",
  353.         INPID_InputControl = "ComboIDControl",
  354.         })
  355.        
  356.     InAfterTime = self:AddInput("After Time", "AfterTime", {
  357.         { CCS_AddString = "Constant", CCID_AddID = "Constant", },
  358.         { CCS_AddString = "Continue", CCID_AddID = "Continue", },
  359.         { CCS_AddString = "Loop", CCID_AddID = "Loop", },
  360.         { CCS_AddString = "Ping Pong", CCID_AddID = "PingPong", },
  361.         { CCS_AddString = "Inclusive Ping Pong", CCID_AddID = "InclusivePingPong", },
  362.         { CCS_AddString = "Hold", CCID_AddID = "Hold", },
  363.         { CCS_AddString = "Random", CCID_AddID = "Random", },
  364.         { CCS_AddString = "Do Nothing", CCID_AddID = "DoNothing", },
  365.         LINKID_DataType = "FuID",
  366.         LINKS_Name = "After Time",
  367.         INPID_InputControl = "ComboIDControl",
  368.         })
  369.  
  370.     InRoundOutput = self:AddInput("Round Output Values", "RoundOutputValues", {
  371.         LINKID_DataType = "FuID",
  372.         INPID_InputControl = "MultiButtonIDControl",
  373.         INPID_DefaultID = "Off",
  374.         { MBTNC_AddButton = "Off", MBTNCID_AddID = "Off", },
  375.         { MBTNC_AddButton = "Down", MBTNCID_AddID = "Down", },
  376.         { MBTNC_AddButton = "Up", MBTNCID_AddID = "Up", },
  377.         MBTNC_StretchToFit = true,
  378.         })
  379.        
  380.     InAllowFloatFrameValues = self:AddInput("Allow Float Frame Values", "AllowFloatFrameValues", {
  381.         LINKID_DataType = "Number",
  382.         INPID_InputControl = "CheckboxControl",
  383.         INP_DoNotifyChanged  = true,
  384.         })
  385.        
  386.     InLabel = self:AddInput(version, "version", {
  387.         LINKID_DataType = "Text",
  388.         INPID_InputControl = "LabelControl",
  389.         INP_External = false,
  390.         INP_Passive = true,
  391.         })
  392.        
  393.     OutValue = self:AddOutput("Output", "Output", {
  394.         LINKID_DataType = "Number",
  395.         LINK_Main = 1,
  396.         })
  397.        
  398. end
  399.  
  400. ------------------------------------------------------------------- DYNAMIC GUI
  401.  
  402. function NotifyChanged(inp, param, time)
  403.     if inp ~= nil and param ~= nil then
  404.         if inp == InMode then
  405.             if param.Value == "Warp" then
  406.                 InSourceStartFrame:SetAttrs({IC_Visible = true})
  407.                 InSourceEndFrame:SetAttrs({IC_Visible = true})
  408.                 InReverse:SetAttrs({IC_Visible = true})
  409.                 InTimeWarp:SetAttrs({IC_Visible = true})
  410.                 InDeltaMode:SetAttrs({IC_Visible = false})
  411.                 InDelta:SetAttrs({IC_Visible = false})
  412.                 InDeltaScale:SetAttrs({IC_Visible = false})
  413.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  414.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  415.                 InSpeed:SetAttrs({IC_Visible = false})
  416.                 InStep:SetAttrs({IC_Visible = false})
  417.                 InSpeedMode:SetAttrs({IC_Visible = false})
  418.                 InRandomSeed:SetAttrs({IC_Visible = false})
  419.                 InHold:SetAttrs({IC_Visible = false})
  420.                 InSkip:SetAttrs({IC_Visible = false})
  421.                 InOffset:SetAttrs({IC_Visible = false})
  422.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  423.                 InXSheetSize:SetAttrs({IC_Visible = false})
  424.                 InXSheet:SetAttrs({IC_Visible = false})
  425.                 InTrigger:SetAttrs({IC_Visible = false})
  426.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  427.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  428.                 InRunSpeed:SetAttrs({IC_Visible = false})
  429. --              InMinRunLength:SetAttrs({IC_Visible = false})
  430. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  431.                 InTriggerMode:SetAttrs({IC_Visible = false})
  432.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  433.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  434.                 InSwitch:SetAttrs({IC_Visible = false})
  435. --              InPattern:SetAttrs({IC_Visible = false})
  436. --              InPatternOffset:SetAttrs({IC_Visible = false})
  437.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  438.                 InRoundOutput:SetAttrs({IC_Visible = true})
  439.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = true})
  440.             elseif param.Value == "Remap" then
  441.                 InSourceStartFrame:SetAttrs({IC_Visible = true})
  442.                 InSourceEndFrame:SetAttrs({IC_Visible = true})
  443.                 InReverse:SetAttrs({IC_Visible = true})
  444.                 InTimeWarp:SetAttrs({IC_Visible = false})
  445.                 InDeltaMode:SetAttrs({IC_Visible = false})
  446.                 InDelta:SetAttrs({IC_Visible = false})
  447.                 InDeltaScale:SetAttrs({IC_Visible = false})
  448.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  449.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  450.                 InSpeed:SetAttrs({IC_Visible = false})
  451.                 InStep:SetAttrs({IC_Visible = false})
  452.                 InSpeedMode:SetAttrs({IC_Visible = false})
  453.                 InRandomSeed:SetAttrs({IC_Visible = false})
  454.                 InHold:SetAttrs({IC_Visible = false})
  455.                 InSkip:SetAttrs({IC_Visible = false})
  456.                 InOffset:SetAttrs({IC_Visible = false})
  457.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  458.                 InXSheetSize:SetAttrs({IC_Visible = false})
  459.                 InXSheet:SetAttrs({IC_Visible = false})
  460.                 InTrigger:SetAttrs({IC_Visible = false})
  461.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  462.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  463.                 InRunSpeed:SetAttrs({IC_Visible = false})
  464. --              InMinRunLength:SetAttrs({IC_Visible = false})
  465. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  466.                 InTriggerMode:SetAttrs({IC_Visible = false})
  467.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  468.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  469.                 InSwitch:SetAttrs({IC_Visible = false})
  470. --              InPattern:SetAttrs({IC_Visible = false})
  471. --              InPatternOffset:SetAttrs({IC_Visible = false})
  472.                 InForceTargetRange:SetAttrs({IC_Visible = false})
  473.                 InRoundOutput:SetAttrs({IC_Visible = true})
  474.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = true})
  475.             elseif param.Value == "Delta" then
  476.                 InSourceStartFrame:SetAttrs({IC_Visible = true})
  477.                 InSourceEndFrame:SetAttrs({IC_Visible = false})
  478.                 InReverse:SetAttrs({IC_Visible = false})
  479.                 InTimeWarp:SetAttrs({IC_Visible = false})
  480.                 InDeltaMode:SetAttrs({IC_Visible = true})
  481.                 InDelta:SetAttrs({IC_Visible = true})
  482.                 InDeltaScale:SetAttrs({IC_Visible = true})
  483.                 InDeltaThreshold:SetAttrs({IC_Visible = true})
  484.                 InDeltaDirection:SetAttrs({IC_Visible = true})
  485.                 InSpeed:SetAttrs({IC_Visible = false})
  486.                 InStep:SetAttrs({IC_Visible = false})
  487.                 InSpeedMode:SetAttrs({IC_Visible = false})
  488.                 InRandomSeed:SetAttrs({IC_Visible = false})
  489.                 InHold:SetAttrs({IC_Visible = false})
  490.                 InSkip:SetAttrs({IC_Visible = false})
  491.                 InOffset:SetAttrs({IC_Visible = false})
  492.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  493.                 InXSheetSize:SetAttrs({IC_Visible = false})
  494.                 InXSheet:SetAttrs({IC_Visible = false})
  495.                 InTrigger:SetAttrs({IC_Visible = false})
  496.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  497.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  498.                 InRunSpeed:SetAttrs({IC_Visible = false})
  499. --              InMinRunLength:SetAttrs({IC_Visible = false})
  500. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  501.                 InTriggerMode:SetAttrs({IC_Visible = false})
  502.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  503.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  504.                 InSwitch:SetAttrs({IC_Visible = false})
  505. --              InPattern:SetAttrs({IC_Visible = false})
  506. --              InPatternOffset:SetAttrs({IC_Visible = false})
  507.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  508.                 InRoundOutput:SetAttrs({IC_Visible = true})
  509.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = true})
  510.             elseif param.Value == "LockStart" then
  511.                 InSourceStartFrame:SetAttrs({IC_Visible = true})
  512.                 InSourceEndFrame:SetAttrs({IC_Visible = true})
  513.                 InReverse:SetAttrs({IC_Visible = true})
  514.                 InTimeWarp:SetAttrs({IC_Visible = false})
  515.                 InDeltaMode:SetAttrs({IC_Visible = false})
  516.                 InDelta:SetAttrs({IC_Visible = false})
  517.                 InDeltaScale:SetAttrs({IC_Visible = false})
  518.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  519.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  520.                 InSpeed:SetAttrs({IC_Visible = true})
  521.                 InStep:SetAttrs({IC_Visible = true})
  522.                 InSpeedMode:SetAttrs({IC_Visible = true})
  523.                 InRandomSeed:SetAttrs({IC_Visible = false})
  524.                 InHold:SetAttrs({IC_Visible = false})
  525.                 InSkip:SetAttrs({IC_Visible = false})
  526.                 InOffset:SetAttrs({IC_Visible = false})
  527.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  528.                 InXSheetSize:SetAttrs({IC_Visible = false})
  529.                 InXSheet:SetAttrs({IC_Visible = false})
  530.                 InTrigger:SetAttrs({IC_Visible = false})
  531.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  532.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  533.                 InRunSpeed:SetAttrs({IC_Visible = false})
  534. --              InMinRunLength:SetAttrs({IC_Visible = false})
  535. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  536.                 InTriggerMode:SetAttrs({IC_Visible = false})
  537.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  538.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  539.                 InRoundOutput:SetAttrs({IC_Visible = true})
  540.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = true})
  541.             elseif param.Value == "LockEnd" then
  542.                 InSourceStartFrame:SetAttrs({IC_Visible = true})
  543.                 InSourceEndFrame:SetAttrs({IC_Visible = true})
  544.                 InReverse:SetAttrs({IC_Visible = true})
  545.                 InTimeWarp:SetAttrs({IC_Visible = false})
  546.                 InDeltaMode:SetAttrs({IC_Visible = false})
  547.                 InDelta:SetAttrs({IC_Visible = false})
  548.                 InDeltaScale:SetAttrs({IC_Visible = false})
  549.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  550.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  551.                 InSpeed:SetAttrs({IC_Visible = true})
  552.                 InStep:SetAttrs({IC_Visible = true})
  553.                 InSpeedMode:SetAttrs({IC_Visible = true})
  554.                 InRandomSeed:SetAttrs({IC_Visible = false})
  555.                 InHold:SetAttrs({IC_Visible = false})
  556.                 InSkip:SetAttrs({IC_Visible = false})
  557.                 InOffset:SetAttrs({IC_Visible = false})
  558.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  559.                 InXSheetSize:SetAttrs({IC_Visible = false})
  560.                 InXSheet:SetAttrs({IC_Visible = false})
  561.                 InTrigger:SetAttrs({IC_Visible = false})
  562.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  563.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  564.                 InRunSpeed:SetAttrs({IC_Visible = false})
  565. --              InMinRunLength:SetAttrs({IC_Visible = false})
  566. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  567.                 InTriggerMode:SetAttrs({IC_Visible = false})
  568.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  569.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  570.                 InSwitch:SetAttrs({IC_Visible = false})
  571. --              InPattern:SetAttrs({IC_Visible = false})
  572. --              InPatternOffset:SetAttrs({IC_Visible = false})
  573.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  574.                 InRoundOutput:SetAttrs({IC_Visible = true})
  575.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = true})
  576.             elseif param.Value == "Random" then
  577.                 InSourceStartFrame:SetAttrs({IC_Visible = true})
  578.                 InSourceEndFrame:SetAttrs({IC_Visible = true})
  579.                 InReverse:SetAttrs({IC_Visible = false})
  580.                 InTimeWarp:SetAttrs({IC_Visible = false})
  581.                 InDeltaMode:SetAttrs({IC_Visible = false})
  582.                 InDelta:SetAttrs({IC_Visible = false})
  583.                 InDeltaScale:SetAttrs({IC_Visible = false})
  584.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  585.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  586.                 InSpeed:SetAttrs({IC_Visible = false})
  587.                 InStep:SetAttrs({IC_Visible = false})
  588.                 InSpeedMode:SetAttrs({IC_Visible = false})
  589.                 InRandomSeed:SetAttrs({IC_Visible = true})
  590.                 InHold:SetAttrs({IC_Visible = false})
  591.                 InSkip:SetAttrs({IC_Visible = false})
  592.                 InOffset:SetAttrs({IC_Visible = false})
  593.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  594.                 InXSheetSize:SetAttrs({IC_Visible = false})
  595.                 InXSheet:SetAttrs({IC_Visible = false})
  596.                 InTrigger:SetAttrs({IC_Visible = false})
  597.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  598.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  599.                 InRunSpeed:SetAttrs({IC_Visible = false})
  600. --              InMinRunLength:SetAttrs({IC_Visible = false})
  601. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  602.                 InTriggerMode:SetAttrs({IC_Visible = false})
  603.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  604.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  605.                 InSwitch:SetAttrs({IC_Visible = false})
  606. --              InPattern:SetAttrs({IC_Visible = false})
  607. --              InPatternOffset:SetAttrs({IC_Visible = false})
  608.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  609.                 InRoundOutput:SetAttrs({IC_Visible = true})
  610.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = true})
  611.             elseif param.Value == "Hold" then
  612.                 InSourceStartFrame:SetAttrs({IC_Visible = false})
  613.                 InSourceEndFrame:SetAttrs({IC_Visible = false})
  614.                 InReverse:SetAttrs({IC_Visible = false})
  615.                 InTimeWarp:SetAttrs({IC_Visible = false})
  616.                 InDeltaMode:SetAttrs({IC_Visible = false})
  617.                 InDelta:SetAttrs({IC_Visible = false})
  618.                 InDeltaScale:SetAttrs({IC_Visible = false})
  619.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  620.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  621.                 InSpeed:SetAttrs({IC_Visible = false})
  622.                 InStep:SetAttrs({IC_Visible = false})
  623.                 InSpeedMode:SetAttrs({IC_Visible = false})
  624.                 InRandomSeed:SetAttrs({IC_Visible = false})
  625.                 InHold:SetAttrs({IC_Visible = true})
  626.                 InSkip:SetAttrs({IC_Visible = false})
  627.                 InOffset:SetAttrs({IC_Visible = false})
  628.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  629.                 InXSheetSize:SetAttrs({IC_Visible = false})
  630.                 InXSheet:SetAttrs({IC_Visible = false})
  631.                 InTrigger:SetAttrs({IC_Visible = false})
  632.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  633.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  634.                 InRunSpeed:SetAttrs({IC_Visible = false})
  635. --              InMinRunLength:SetAttrs({IC_Visible = false})
  636. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  637.                 InTriggerMode:SetAttrs({IC_Visible = false})
  638.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  639.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  640.                 InSwitch:SetAttrs({IC_Visible = false})
  641. --              InPattern:SetAttrs({IC_Visible = false})
  642. --              InPatternOffset:SetAttrs({IC_Visible = false})
  643.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  644.                 InRoundOutput:SetAttrs({IC_Visible = true})
  645.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = true})
  646.             elseif param.Value == "Skip" then
  647.                 InSourceStartFrame:SetAttrs({IC_Visible = true})
  648.                 InSourceEndFrame:SetAttrs({IC_Visible = false})
  649.                 InReverse:SetAttrs({IC_Visible = false})
  650.                 InTimeWarp:SetAttrs({IC_Visible = false})
  651.                 InDeltaMode:SetAttrs({IC_Visible = false})
  652.                 InDelta:SetAttrs({IC_Visible = false})
  653.                 InDeltaScale:SetAttrs({IC_Visible = false})
  654.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  655.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  656.                 InSpeed:SetAttrs({IC_Visible = false})
  657.                 InStep:SetAttrs({IC_Visible = false})
  658.                 InSpeedMode:SetAttrs({IC_Visible = false})
  659.                 InRandomSeed:SetAttrs({IC_Visible = false})
  660.                 InHold:SetAttrs({IC_Visible = false})
  661.                 InSkip:SetAttrs({IC_Visible = true})
  662.                 InOffset:SetAttrs({IC_Visible = false})
  663.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  664.                 InXSheetSize:SetAttrs({IC_Visible = false})
  665.                 InXSheet:SetAttrs({IC_Visible = false})
  666.                 InTrigger:SetAttrs({IC_Visible = false})
  667.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  668.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  669.                 InRunSpeed:SetAttrs({IC_Visible = false})
  670. --              InMinRunLength:SetAttrs({IC_Visible = false})
  671. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  672.                 InTriggerMode:SetAttrs({IC_Visible = false})
  673.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  674.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  675.                 InSwitch:SetAttrs({IC_Visible = false})
  676. --              InPattern:SetAttrs({IC_Visible = false})
  677. --              InPatternOffset:SetAttrs({IC_Visible = false})
  678.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  679.                 InRoundOutput:SetAttrs({IC_Visible = true})
  680.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = true})
  681.             elseif param.Value == "Offset" then
  682.                 InSourceStartFrame:SetAttrs({IC_Visible = false})
  683.                 InSourceEndFrame:SetAttrs({IC_Visible = false})
  684.                 InReverse:SetAttrs({IC_Visible = false})
  685.                 InTimeWarp:SetAttrs({IC_Visible = false})
  686.                 InDeltaMode:SetAttrs({IC_Visible = false})
  687.                 InDelta:SetAttrs({IC_Visible = false})
  688.                 InDeltaScale:SetAttrs({IC_Visible = false})
  689.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  690.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  691.                 InSpeed:SetAttrs({IC_Visible = false})
  692.                 InStep:SetAttrs({IC_Visible = false})
  693.                 InSpeedMode:SetAttrs({IC_Visible = false})
  694.                 InRandomSeed:SetAttrs({IC_Visible = false})
  695.                 InHold:SetAttrs({IC_Visible = false})
  696.                 InSkip:SetAttrs({IC_Visible = false})
  697.                 InOffset:SetAttrs({IC_Visible = true})
  698.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  699.                 InXSheetSize:SetAttrs({IC_Visible = false})
  700.                 InXSheet:SetAttrs({IC_Visible = false})
  701.                 InTrigger:SetAttrs({IC_Visible = false})
  702.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  703.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  704.                 InRunSpeed:SetAttrs({IC_Visible = false})
  705. --              InMinRunLength:SetAttrs({IC_Visible = false})
  706. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  707.                 InTriggerMode:SetAttrs({IC_Visible = false})
  708.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  709.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  710.                 InSwitch:SetAttrs({IC_Visible = false})
  711. --              InPattern:SetAttrs({IC_Visible = false})
  712. --              InPatternOffset:SetAttrs({IC_Visible = false})
  713.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  714.                 InRoundOutput:SetAttrs({IC_Visible = true})
  715.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = true})
  716.             elseif param.Value == "XSheet" then
  717.                 InSourceStartFrame:SetAttrs({IC_Visible = false})
  718.                 InSourceEndFrame:SetAttrs({IC_Visible = false})
  719.                 InReverse:SetAttrs({IC_Visible = false})
  720.                 InTimeWarp:SetAttrs({IC_Visible = false})
  721.                 InDeltaMode:SetAttrs({IC_Visible = false})
  722.                 InDelta:SetAttrs({IC_Visible = false})
  723.                 InDeltaScale:SetAttrs({IC_Visible = false})
  724.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  725.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  726.                 InSpeed:SetAttrs({IC_Visible = false})
  727.                 InStep:SetAttrs({IC_Visible = false})
  728.                 InSpeedMode:SetAttrs({IC_Visible = false})
  729.                 InRandomSeed:SetAttrs({IC_Visible = false})
  730.                 InHold:SetAttrs({IC_Visible = false})
  731.                 InSkip:SetAttrs({IC_Visible = false})
  732.                 InOffset:SetAttrs({IC_Visible = false})
  733.                 OutXFrameNumbers:SetAttrs({IC_Visible = true})
  734.                 InXSheetSize:SetAttrs({IC_Visible = true})
  735.                 InXSheet:SetAttrs({IC_Visible = true})
  736.                 InTrigger:SetAttrs({IC_Visible = false})
  737.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  738.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  739.                 InRunSpeed:SetAttrs({IC_Visible = false})
  740. --              InMinRunLength:SetAttrs({IC_Visible = false})
  741. --              InMaxRunLength:SetAttrs({IC_Visible = false})
  742.                 InTriggerMode:SetAttrs({IC_Visible = false})
  743.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  744.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  745.                 InSwitch:SetAttrs({IC_Visible = false})
  746. --              InPattern:SetAttrs({IC_Visible = false})
  747. --              InPatternOffset:SetAttrs({IC_Visible = false})
  748.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  749.                 InRoundOutput:SetAttrs({IC_Visible = false})
  750.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = false})
  751.             elseif param.Value == "Trigger" then
  752.                 InSourceStartFrame:SetAttrs({IC_Visible = true})
  753.                 InSourceEndFrame:SetAttrs({IC_Visible = false})
  754.                 InReverse:SetAttrs({IC_Visible = false})
  755.                 InTimeWarp:SetAttrs({IC_Visible = false})
  756.                 InDeltaMode:SetAttrs({IC_Visible = false})
  757.                 InDelta:SetAttrs({IC_Visible = false})
  758.                 InDeltaScale:SetAttrs({IC_Visible = false})
  759.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  760.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  761.                 InSpeed:SetAttrs({IC_Visible = false})
  762.                 InStep:SetAttrs({IC_Visible = false})
  763.                 InSpeedMode:SetAttrs({IC_Visible = false})
  764.                 InRandomSeed:SetAttrs({IC_Visible = false})
  765.                 InHold:SetAttrs({IC_Visible = false})
  766.                 InSkip:SetAttrs({IC_Visible = false})
  767.                 InOffset:SetAttrs({IC_Visible = false})
  768.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  769.                 InXSheetSize:SetAttrs({IC_Visible = false})
  770.                 InXSheet:SetAttrs({IC_Visible = false})
  771.                 InTrigger:SetAttrs({IC_Visible = true})
  772.                 InOnTriggerThreshold:SetAttrs({IC_Visible = true})
  773.                 InOffTriggerThreshold:SetAttrs({IC_Visible = true})
  774.                 InRunSpeed:SetAttrs({IC_Visible = true})
  775. --              InMinRunLength:SetAttrs({IC_Visible = true})
  776. --              InMaxRunLength:SetAttrs({IC_Visible = true})
  777.                 InTriggerMode:SetAttrs({IC_Visible = true})
  778.                 InTriggerDirection:SetAttrs({IC_Visible = true})
  779.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  780.                 InSwitch:SetAttrs({IC_Visible = false})
  781. --              InPattern:SetAttrs({IC_Visible = false})
  782. --              InPatternOffset:SetAttrs({IC_Visible = false})
  783.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  784.                 InRoundOutput:SetAttrs({IC_Visible = true})
  785.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = false})
  786.             elseif param.Value == "Switch" then
  787.                 InSourceStartFrame:SetAttrs({IC_Visible = false})
  788.                 InSourceEndFrame:SetAttrs({IC_Visible = false})
  789.                 InReverse:SetAttrs({IC_Visible = false})
  790.                 InTimeWarp:SetAttrs({IC_Visible = false})
  791.                 InDeltaMode:SetAttrs({IC_Visible = false})
  792.                 InDelta:SetAttrs({IC_Visible = false})
  793.                 InDeltaScale:SetAttrs({IC_Visible = false})
  794.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  795.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  796.                 InSpeed:SetAttrs({IC_Visible = false})
  797.                 InStep:SetAttrs({IC_Visible = false})
  798.                 InSpeedMode:SetAttrs({IC_Visible = false})
  799.                 InRandomSeed:SetAttrs({IC_Visible = false})
  800.                 InHold:SetAttrs({IC_Visible = false})
  801.                 InSkip:SetAttrs({IC_Visible = false})
  802.                 InOffset:SetAttrs({IC_Visible = false})
  803.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  804.                 InXSheetSize:SetAttrs({IC_Visible = false})
  805.                 InXSheet:SetAttrs({IC_Visible = false})
  806.                 InTrigger:SetAttrs({IC_Visible = false})
  807.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  808.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  809.                 InRunSpeed:SetAttrs({IC_Visible = false})
  810. --              InMinRunLength:SetAttrs({IC_Visible = true})
  811. --              InMaxRunLength:SetAttrs({IC_Visible = true})
  812.                 InTriggerMode:SetAttrs({IC_Visible = false})
  813.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  814.                 InSwitchStartFrames:SetAttrs({IC_Visible = true})
  815.                 InSwitch:SetAttrs({IC_Visible = true})
  816. --              InPattern:SetAttrs({IC_Visible = false})
  817. --              InPatternOffset:SetAttrs({IC_Visible = false})
  818.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  819.                 InRoundOutput:SetAttrs({IC_Visible = false})
  820.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = false})
  821.             elseif param.Value == "Pattern" then
  822.                 InSourceStartFrame:SetAttrs({IC_Visible = false})
  823.                 InSourceEndFrame:SetAttrs({IC_Visible = false})
  824.                 InReverse:SetAttrs({IC_Visible = false})
  825.                 InTimeWarp:SetAttrs({IC_Visible = false})
  826.                 InDeltaMode:SetAttrs({IC_Visible = false})
  827.                 InDelta:SetAttrs({IC_Visible = false})
  828.                 InDeltaScale:SetAttrs({IC_Visible = false})
  829.                 InDeltaThreshold:SetAttrs({IC_Visible = false})
  830.                 InDeltaDirection:SetAttrs({IC_Visible = false})
  831.                 InSpeed:SetAttrs({IC_Visible = false})
  832.                 InStep:SetAttrs({IC_Visible = false})
  833.                 InSpeedMode:SetAttrs({IC_Visible = false})
  834.                 InRandomSeed:SetAttrs({IC_Visible = false})
  835.                 InHold:SetAttrs({IC_Visible = false})
  836.                 InSkip:SetAttrs({IC_Visible = false})
  837.                 InOffset:SetAttrs({IC_Visible = false})
  838.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  839.                 InXSheetSize:SetAttrs({IC_Visible = false})
  840.                 InXSheet:SetAttrs({IC_Visible = false})
  841.                 InTrigger:SetAttrs({IC_Visible = false})
  842.                 InOnTriggerThreshold:SetAttrs({IC_Visible = false})
  843.                 InOffTriggerThreshold:SetAttrs({IC_Visible = false})
  844.                 InRunSpeed:SetAttrs({IC_Visible = false})
  845. --              InMinRunLength:SetAttrs({IC_Visible = true})
  846. --              InMaxRunLength:SetAttrs({IC_Visible = true})
  847.                 InTriggerMode:SetAttrs({IC_Visible = false})
  848.                 InTriggerDirection:SetAttrs({IC_Visible = false})
  849.                 InSwitchStartFrames:SetAttrs({IC_Visible = false})
  850.                 InSwitch:SetAttrs({IC_Visible = false})
  851. --              InPattern:SetAttrs({IC_Visible = true})
  852. --              InPatternOffset:SetAttrs({IC_Visible = true})
  853.                 InForceTargetRange:SetAttrs({IC_Visible = true})
  854.                 InRoundOutput:SetAttrs({IC_Visible = false})
  855.                 InAllowFloatFrameValues:SetAttrs({IC_Visible = false})
  856.             end
  857.         end
  858.  
  859. ------------------------------------------------------------------- Force Target Range UI
  860.  
  861.         if inp == InForceTargetRange or inp == InMode then
  862.             local m = InMode:GetSource(time, REQF_SecondaryTime).Value
  863.             local f = InForceTargetRange:GetSource(time, REQF_SecondaryTime).Value
  864.             if m == "Warp" then
  865.                 InTargetStartFrame:SetAttrs({ IC_Visible = f == 1 })
  866.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  867.                 InBeforeTime:SetAttrs({ IC_Visible = f == 1 })
  868.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  869.             elseif m == "Delta" then
  870.                 InTargetStartFrame:SetAttrs({ IC_Visible = f == 1 })
  871.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  872.                 InBeforeTime:SetAttrs({ IC_Visible = f == 1 })
  873.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  874.             elseif m == "Remap" then
  875.                 InTargetStartFrame:SetAttrs({ IC_Visible = true })
  876.                 InTargetEndFrame:SetAttrs({ IC_Visible = true })
  877.                 InBeforeTime:SetAttrs({ IC_Visible = true })
  878.                 InAfterTime:SetAttrs({ IC_Visible = true })
  879.             elseif m == "LockStart" then
  880.                 InTargetStartFrame:SetAttrs({ IC_Visible = true })
  881.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  882.                 InBeforeTime:SetAttrs({ IC_Visible = true })
  883.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  884.             elseif m == "LockEnd" then
  885.                 InTargetStartFrame:SetAttrs({ IC_Visible = f == 1 })
  886.                 InTargetEndFrame:SetAttrs({ IC_Visible = true })
  887.                 InBeforeTime:SetAttrs({ IC_Visible = f == 1 })
  888.                 InAfterTime:SetAttrs({ IC_Visible = true })
  889.             elseif m == "Random" then
  890.                 InTargetStartFrame:SetAttrs({ IC_Visible = f == 1 })
  891.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  892.                 InBeforeTime:SetAttrs({ IC_Visible = f == 1 })
  893.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  894.             elseif m == "Hold" then
  895.                 InTargetStartFrame:SetAttrs({ IC_Visible = f == 1 })
  896.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  897.                 InBeforeTime:SetAttrs({ IC_Visible = f == 1 })
  898.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  899.             elseif m == "Skip" then
  900.                 InTargetStartFrame:SetAttrs({ IC_Visible = f == 1 })
  901.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  902.                 InBeforeTime:SetAttrs({ IC_Visible = f == 1 })
  903.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  904.             elseif m == "Offset" then
  905.                 InTargetStartFrame:SetAttrs({ IC_Visible = f == 1 })
  906.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  907.                 InBeforeTime:SetAttrs({ IC_Visible = f == 1 })
  908.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  909.             elseif m == "XSheet" then
  910.                 InTargetStartFrame:SetAttrs({ IC_Visible = true })
  911.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  912.                 InBeforeTime:SetAttrs({ IC_Visible = true })
  913.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  914.             elseif m == "Trigger" then
  915.                 InTargetStartFrame:SetAttrs({ IC_Visible = true })
  916.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  917.                 InBeforeTime:SetAttrs({ IC_Visible = true })
  918.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  919.             elseif m == "Switch" then
  920.                 InTargetStartFrame:SetAttrs({ IC_Visible = f == 1 })
  921.                 InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  922.                 InBeforeTime:SetAttrs({ IC_Visible = f == 1 })
  923.                 InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  924. --          elseif m == "Pattern" then
  925. --              InTargetStartFrame:SetAttrs({ IC_Visible = f == 1 })
  926. --              InTargetEndFrame:SetAttrs({ IC_Visible = f == 1 })
  927. --              InBeforeTime:SetAttrs({ IC_Visible = f == 1 })
  928. --              InAfterTime:SetAttrs({ IC_Visible = f == 1 })
  929.             end
  930.         end
  931.        
  932. ------------------------------------------------------------------- Allow Float Frame Values in UI
  933.  
  934.         if inp == InAllowFloatFrameValues then
  935.             local a = InAllowFloatFrameValues:GetSource(time, REQF_SecondaryTime).Value
  936.             if a == 1 then
  937.                 InSourceStartFrame:SetAttrs({ INP_Integer = false })
  938.                 InSourceEndFrame:SetAttrs({ INP_Integer = false })
  939.                 InTargetStartFrame:SetAttrs({ INP_Integer = false })
  940.                 InTargetEndFrame:SetAttrs({ INP_Integer = false })
  941.                 InStep:SetAttrs({ INP_Integer = false })
  942.                 InSkip:SetAttrs({ INP_Integer = false })
  943.                 InHold:SetAttrs({ INP_Integer = false })
  944.                 InOffset:SetAttrs({ INP_Integer = false })
  945. --              InMinRunLength:SetAttrs({ INP_Integer = false })
  946. --              InMaxRunLength:SetAttrs({ INP_Integer = false })
  947.             else
  948.                 InSourceStartFrame:SetAttrs({ INP_Integer = true })
  949.                 InSourceEndFrame:SetAttrs({ INP_Integer = true })
  950.                 InTargetStartFrame:SetAttrs({ INP_Integer = true })
  951.                 InTargetEndFrame:SetAttrs({ INP_Integer = true })
  952.                 InStep:SetAttrs({ INP_Integer = true })
  953.                 InSkip:SetAttrs({ INP_Integer = true })
  954.                 InHold:SetAttrs({ INP_Integer = true })
  955.                 InOffset:SetAttrs({ INP_Integer = true })
  956. --              InMinRunLength:SetAttrs({ INP_Integer = true })
  957. --              InMaxRunLength:SetAttrs({ INP_Integer = true })
  958.             end    
  959.         end
  960.        
  961. ------------------------------------------------------------------- XSheet UI Window Length
  962.  
  963.         if inp == InXSheetSize then         -- hacking UI update
  964.             local xsl = InXSheetSize:GetSource(time, REQF_SecondaryTime).Value
  965.             local inm = InMode:GetSource(time, REQF_SecondaryTime).Value
  966.             if inm == "XSheet" then
  967.                 InXSheet:SetAttrs({TEC_Lines = xsl})
  968.                 InXSheet:SetAttrs({IC_Visible = false})             -- more hacking UI update
  969.                 InXSheet:SetAttrs({IC_Visible = true})
  970.                 OutXFrameNumbers:SetAttrs({TEC_Lines = xsl})
  971.                 OutXFrameNumbers:SetAttrs({IC_Visible = false})
  972.                 OutXFrameNumbers:SetAttrs({IC_Visible = true})
  973.             end
  974.         end
  975.     end
  976. end
  977.  
  978. ------------------------------------------------------------------- FUNCTIONS:
  979.  
  980. ------------------------------------------------------------------- WARP
  981.  
  982. function Warp(ssf, sef, wrp, rev)
  983.    
  984.     if rev == 0 then
  985.         return ( (sef - ssf) * ( wrp ) ) + ssf
  986.     elseif rev == 1 then
  987.         return ( (sef - ssf) * - ( wrp - rev ) ) + ssf
  988.     end
  989. end
  990.  
  991. ------------------------------------------------------------------- DELTA
  992.  
  993. function Delta(ssf, dlt, ddi, dmo, time)
  994.  
  995. -- first convert ddi from a string to a number
  996.  
  997.     if ddi == "Up" then ddi = 1 end
  998.     if ddi == "Down" then ddi = -1 end
  999.  
  1000. -- create a table, containing all the values for Delta from the start up to the frame before the current, then
  1001. -- apply threshold, and then calculate slope if in Slope mode
  1002.  
  1003. -- need to adjust this in order to calculate correctly with animated scale, direction, etc
  1004.  
  1005.     local dv = {} -- Delta value
  1006.     local ds = {} -- Delta Scale Values
  1007.     local dt = {} -- Delta Threshold Values
  1008.    
  1009.     local sv = {} -- Slope values
  1010.    
  1011.     local i = 1
  1012.    
  1013.     -- optimize the following further by first determining if a value is animated
  1014.    
  1015.     while i <= time-ssf+(dmo == "Slope" and 1 or 0) do
  1016.         dv[i] = InDelta:GetSource(ssf+i-1).Value
  1017.         ds[i] = InDeltaScale:GetSource(ssf+i-1).Value
  1018.         dt[i] = InDeltaThreshold:GetSource(ssf+i-1).Value
  1019.             if dv[i] ~= nil then
  1020.                 if dt[i] ~= 0 then
  1021.                     dv[i] = dv[i] - dt[i]
  1022.                 end
  1023.                 if dmo == "Slope" then
  1024.                     if i > 1 then
  1025.                         sv[i] = dv[i] - dv[i-1]
  1026.                     else
  1027.                         sv[i] = 0
  1028.                     end
  1029.                 end
  1030.             end
  1031.         i = i + 1
  1032.     end
  1033.    
  1034.     if dmo == "Slope" then
  1035.         dv = sv
  1036.     end
  1037.  
  1038. -- apply scale, and direction to the numbers in the table, then
  1039. -- sum all those numbers and return the result
  1040.    
  1041.     local i = 1
  1042.     sum = dlt
  1043.     while i <= time-ssf+(dmo == "Slope" and 1 or 0) do
  1044.         if dv[i] ~= nil then
  1045.             dv[i] = ddi * dv[i] * ds[i]
  1046.             sum = sum + dv[i]
  1047.             i = i + 1
  1048.         end
  1049.     end
  1050.    
  1051.     return sum - dlt + ssf
  1052. end
  1053.  
  1054.  
  1055. ------------------------------------------------------------------- REMAP
  1056.  
  1057. function Remap(ssf, sef, tsf, tef, rev, time)
  1058.  
  1059.     if rev == 0 then
  1060.         return ( (sef - ssf) * ( ( time - tsf ) / ( tef - tsf ) ) ) + ssf
  1061.     elseif rev == 1 then
  1062.         return ( (sef - ssf) * - ( ( time - tsf ) / ( tef - tsf ) - 1 ) ) + ssf
  1063.     end
  1064. end
  1065.  
  1066. ------------------------------------------------------------------- LOCK START
  1067.  
  1068. function LockStart(ssf, sef, tsf, spd, stp, spm, rev, time)
  1069.  
  1070.     if spm == "Speed" then
  1071.         return (1-rev) * ssf + rev * sef + (1- rev*2) * ( time - tsf ) * ( spd )
  1072.     elseif spm == "Step" then
  1073.         return math.floor (1-rev) * ssf + rev * sef + (1- rev*2) * ( time - tsf ) * ( ( 1 / stp )  )
  1074.     end
  1075. end
  1076.  
  1077. ------------------------------------------------------------------- LOCK END
  1078.  
  1079. function LockEnd(ssf, sef, tef, spd, stp, spm, rev, time)
  1080.  
  1081.     if spm == "Speed" then
  1082.         return (1-rev) * sef + rev * ssf + (1- rev*2) * ( time - tef ) * ( spd )
  1083.     elseif spm == "Step" then
  1084.         return math.floor (1-rev) * sef + rev * ssf + (1- rev*2) * ( time - tef ) * ( ( 1 / stp )  )
  1085.     end
  1086. end
  1087.  
  1088. ------------------------------------------------------------------- RANDOM
  1089.  
  1090. function Random(ssf, sef, rds, time)
  1091.     math.randomseed(rds+time)
  1092.     return math.random(ssf,sef)
  1093. end
  1094.  
  1095. ------------------------------------------------------------------- HOLD
  1096.  
  1097. function Hold(hld)
  1098.     return hld
  1099. end
  1100.  
  1101. ------------------------------------------------------------------- SKIP
  1102.  
  1103. function Skip(ssf, skp, time)
  1104.     skp = math.max(0,skp)+1
  1105.     return ssf + math.floor( (time - ssf) / skp) * skp
  1106. end
  1107.  
  1108. ------------------------------------------------------------------- OFFSET
  1109.  
  1110. function Offset(ofs, time)
  1111.     return time-ofs
  1112. end
  1113.  
  1114. ------------------------------------------------------------------- XSHEET
  1115.  
  1116. function XSheet(xsh, tsf, time)
  1117.    
  1118.     local xsstart = {}      -- intermediate xsheet table for calculations and passing values over for resequencing
  1119.     local xs = {}           -- intermediate xsheet table for storing a line of input
  1120.     local xsout = {}        -- the total xsheet output
  1121.     local nums = {}         -- list of numbers in any xsheet script input line
  1122.     local wrds = {}         -- list of words in any xsheet script input line
  1123.     local loop = 1
  1124.     local hold = 0
  1125.     local step = 1
  1126.     local skip = 0
  1127.     local speed = 1
  1128.    
  1129.     xshKAK = string.gsub (xsh, "[\n]", "KAK\n")
  1130.     xshKAK = string.gsub (xshKAK, "reverse", "reverse 0")
  1131. --  print ("xsh:"..xsh)
  1132. --  print ("xshKAK:"..xshKAK)
  1133.     for line in xshKAK:gmatch("[^\n]+") do                                  -- ***** GO THROUGH EVERY SINGLE LINE FROM HERE...
  1134.    
  1135. --      print ("line:"..line)
  1136.        
  1137.         for word in line:gmatch("%a+") do
  1138.             table.insert(wrds, (word))                                              --  put words in a table
  1139.         end
  1140.         for number in line:gmatch("%d+") do
  1141.             table.insert(nums, tonumber(number))                                    --  put numbers in another table
  1142.         end
  1143.        
  1144.         if nums[1] ~= nil and nums[2] == nil and wrds[1] ~= "all" then              -- then determine the starting point and put that in the xsheet already
  1145.             table.insert(xs, nums[1])
  1146.         end
  1147.        
  1148. --      print ("nums @ start:")
  1149. --      dump (nums)
  1150. --      print ("wrds @ start:")
  1151. --      dump (wrds)
  1152. --      print ("xs @ start:")
  1153. --      dump (xs)
  1154.        
  1155.         if wrds[1] ~= nil then                                                      -- now iterate through the words, which can be one of 6 options
  1156.             local currentword = 1
  1157.             local currentnumber = currentword + 1
  1158.             local morewords = true
  1159.             while morewords == true and nums[currentnumber] ~= nil and wrds[1] ~= "all" do
  1160.                 if wrds[currentword] == "to" then                                                               -- TO
  1161. --                  print ("currentword:"..wrds[currentword])
  1162. --                  print ("currentnumber:"..nums[currentnumber])
  1163. --                  print ("xsstart @ to:")
  1164. --                  dump (xsstart)
  1165.                     local countstart = 1
  1166.                     if currentword == 1 then                                        -- if this is a new sequence, "to" must start from the first number
  1167.                         countstart = nums[1]
  1168.                     else                                                            -- else from the end of an existing sequence ("to" does not resequence an existing list, but adds to it)
  1169.                         countstart = xsstart[table.getn(xsstart)]
  1170.                     end
  1171.                     for i = countstart +
  1172.                             ( ( currentnumber>2 and countstart > nums[currentnumber] ) and -1 or                -- if starting from existing sequence and going from high to low then go from countstart -1
  1173.                               ( currentnumber>2 and countstart <= nums[currentnumber] ) and 1 or 0 ),           -- if starting from existing sequence and going from low to high then go from countstart +1 else go from countstart
  1174.                             nums[currentnumber],                                                                -- count to "to" number
  1175.                             ( countstart > nums[currentnumber] and -1 or 1 ) do     -- count backwards when going from high to low (when countstart > "to" number
  1176.                         table.insert(xs,i)
  1177.                     end
  1178.                     for i,v in pairs(xsstart) do                                    -- clear xsstart
  1179.                         xsstart[i]=nil
  1180.                     end
  1181.                     for i,v in pairs(xs) do                                         -- copy xs to xsstart
  1182.                         xsstart[i] = xs[i]
  1183.                     end
  1184.                    
  1185.                    
  1186.                 elseif wrds[currentword] == "step" then                                                         -- STEP
  1187.                     for i,v in pairs(xs) do                                         -- clear xs
  1188.                         xs[i]=nil
  1189.                     end
  1190.                     step = math.max(nums[currentnumber])
  1191.                     if xsstart[1] == nil then                                       -- make sure there's a starting point
  1192.                         xsstart[1] = nums[1]
  1193.                     end
  1194.                     local xsstartlength = table.getn(xsstart)
  1195.                     for i = 1, xsstartlength*step, 1 do
  1196.                         table.insert(xs, (xsstart[math.ceil(i/step)]))
  1197.                     end
  1198.                     for i,v in pairs(xsstart) do                                    -- clear xsstart
  1199.                         xsstart[i]=nil
  1200.                     end
  1201.                     for i,v in pairs(xs) do                                         -- copy xs to xsstart
  1202.                         xsstart[i] = xs[i]
  1203.                     end
  1204.                    
  1205.                    
  1206.                 elseif wrds[currentword] == "skip" then                                                         -- SKIP
  1207.                     for i,v in pairs(xs) do                                         -- clear xs
  1208.                         xs[i]=nil
  1209.                     end
  1210.                     skip = math.max(0,nums[currentnumber]) + 1
  1211.                     if xsstart[1] == nil then                                       -- make sure there's a starting point
  1212.                         xsstart[1] = nums[1]
  1213.                     end
  1214.                     local xsstartlength = table.getn(xsstart)
  1215.                     for i = 0, xsstartlength -1 , 1 do
  1216.                         table.insert(xs, xsstart[1 + ((math.floor(i/skip)) * skip)])
  1217.                     end
  1218.                     for i,v in pairs(xsstart) do                                    -- clear xsstart
  1219.                         xsstart[i]=nil
  1220.                     end
  1221.                     for i,v in pairs(xs) do                                         -- copy xs to xsstart
  1222.                         xsstart[i] = xs[i]
  1223.                     end
  1224.                    
  1225.                    
  1226.                 elseif wrds[currentword] == "speed" then                                                        -- SPEED
  1227.                     for i,v in pairs(xs) do                                         -- clear xs
  1228.                         xs[i]=nil
  1229.                     end
  1230.                     speed = math.max(1,nums[currentnumber])
  1231.                     if xsstart[1] == nil then                                       -- make sure there's a starting point
  1232.                         xsstart[1] = nums[1]
  1233.                     end
  1234.                     local xsstartlength = table.getn(xsstart)
  1235.                     for i = 1, xsstartlength, speed do
  1236.                         table.insert(xs, (xsstart[math.floor(i)]))
  1237.                     end
  1238.                     for i,v in pairs(xsstart) do                                    -- clear xsstart
  1239.                         xsstart[i]=nil
  1240.                     end
  1241.                     for i,v in pairs(xs) do                                         -- copy xs to xsstart
  1242.                         xsstart[i] = xs[i]
  1243.                     end
  1244.                    
  1245.                    
  1246.                 elseif wrds[currentword] == "hold" then                                                         -- HOLD
  1247. --                  print("xs @ hold:")
  1248. --                  dump (xs)
  1249. --                  print("xsstart @ hold:")
  1250. --                  dump (xsstart)
  1251.                     local holdframe = 1
  1252.                     if currentword == 1 then                                        -- if this is a new sequence, "holdframe" is the previous number in the num list
  1253.                         holdframe = nums[1]
  1254. --                      print ("holdframe:"..holdframe)
  1255.                         hold = nums[currentnumber]
  1256.                     else                                                            -- else from the end of xsstart
  1257.                         holdframe = xsstart[table.getn(xsstart)]
  1258.                         hold = nums[currentnumber]-1
  1259.                     end
  1260.                     for i = 1, hold, 1 do
  1261.                     table.insert( xs, holdframe )
  1262.                     end
  1263.                     for i,v in pairs(xsstart) do                                    -- clear xsstart
  1264.                         xsstart[i]=nil
  1265.                     end
  1266.                     for i,v in pairs(xs) do                                         -- copy xs to xsstart
  1267.                         xsstart[i] = xs[i]
  1268.                     end
  1269.                    
  1270.                    
  1271.                 elseif wrds[currentword] == "loop" then                                                         -- LOOP
  1272.                     loop = nums[currentnumber] - 1
  1273.                     if xsstart[1] == nil then
  1274.                         xsstart[1] = nums[1]
  1275.                     end
  1276.                     for i = 1, loop, 1 do
  1277.                         for j = 1, table.getn(xsstart), 1 do
  1278.                             table.insert (xs, xsstart[j])
  1279.                         end
  1280.                     end
  1281.                     for i,v in pairs(xsstart) do                                    -- clear xsstart
  1282.                         xsstart[i]=nil
  1283.                     end
  1284.                     for i,v in pairs(xs) do                                         -- copy xs to xsstart
  1285.                         xsstart[i] = xs[i]
  1286.                     end
  1287.                    
  1288.                
  1289.                 elseif wrds[currentword] == "reverse" then                                                      -- REVERSE
  1290.                
  1291.                     if xsstart[1] ~= nil then
  1292.                         local xsstartlength = table.getn(xsstart)
  1293.                         for i, v in pairs(xs) do
  1294.                         xs[i] = xsstart[xsstartlength - i +1]
  1295.                         end
  1296.                     else
  1297.                     end
  1298.                        
  1299.                     for i,v in pairs(xsstart) do                                    -- clear xsstart
  1300.                         xsstart[i]=nil
  1301.                     end
  1302.                     for i,v in pairs(xs) do                                         -- copy xs to xsstart
  1303.                         xsstart[i] = xs[i]
  1304.                     end
  1305.                 end
  1306.                
  1307.                
  1308.                 if wrds[currentword+1] ~= nil then
  1309.                     currentword = currentword + 1
  1310.                     currentnumber = currentword + 1
  1311.                 else
  1312.                     morewords = false
  1313.                 end
  1314.                
  1315.                
  1316.             end
  1317.            
  1318.             local endlineword = table.getn(wrds)
  1319.             if wrds[endlineword] == "KAK" then                                          -- KAK (end of the line is reached...)
  1320. --              print("add to xsheet here")
  1321.                 for i,v in pairs(xs) do                                                 -- add xs table (line) to xs output (after newline)
  1322.                     table.insert (xsout, xs[i])
  1323.                 end
  1324.                 for i,v in pairs(xs) do                                                 -- clear xs for next line
  1325.                     xs[i] = nil
  1326.                 end
  1327.             end
  1328.            
  1329.             if wrds[1] == "all" and xsout[1] ~= nil then                        --***** GLOBAL operations (add while loop)
  1330.                 local xsoutlength = table.getn(xsout)
  1331.                 local xsoutcopy = {}
  1332.                 for i,v in pairs(xsout) do
  1333.                     xsoutcopy[i] = xsout[i]
  1334.                 end
  1335.                 if wrds[2] == "reverse" then                                            -- REVERSE
  1336.                     for i, v in pairs(xsout) do
  1337.                     xsout[i] = xsoutcopy[xsoutlength - i +1]
  1338.                     end
  1339.                 end
  1340.                
  1341.                 if wrds[2] == "speed" and nums[1] ~= nil then                           -- SPEED
  1342.                 local allspeed = math.max(1,nums[1])
  1343.                 for i,v in pairs(xsout) do
  1344.                     xsout[i] = nil
  1345.                 end
  1346.                 for i = 1, xsoutlength, allspeed do
  1347.                         table.insert(xsout, (xsoutcopy[math.floor(i)]))
  1348.                     end
  1349.                 end
  1350.                
  1351.                 if wrds[2] == "step" and nums[1] ~= nil then                            -- STEP
  1352.                 local allstep = math.max(1, nums[1])
  1353.                 for i,v in pairs(xsout) do
  1354.                     xsout[i] = nil
  1355.                 end
  1356.                 for i = 1, xsoutlength*allstep, 1 do
  1357.                         table.insert(xsout, (xsoutcopy[math.ceil(i/allstep)]))
  1358.                     end
  1359.                 end
  1360.                
  1361.                 if wrds[2] == "skip" and nums[1] ~= nil then                            -- SKIP
  1362.                 local allskip = math.max(0,nums[1]) + 1
  1363.                 for i,v in pairs(xsout) do
  1364.                     xsout[i] = nil
  1365.                 end
  1366.                 for i = 0, xsoutlength -1 , 1 do
  1367.                         table.insert(xsout, xsoutcopy[1 + ((math.floor(i/allskip)) * allskip)])
  1368.                     end
  1369.                 end
  1370.                
  1371.                 if wrds[2] == "loop" and nums[1] ~= nil then                            -- LOOP
  1372.                 local allloop = nums[1] - 1
  1373.                 for i = 1, allloop, 1 do
  1374.                     for j = 1, xsoutlength, 1 do
  1375.                         table.insert (xsout, xsoutcopy[j])
  1376.                     end
  1377.                 end
  1378.                 end
  1379.             end                                                                 --***** END GLOBAL operations
  1380.         end
  1381.  
  1382.         for i,v in pairs(wrds) do
  1383.             wrds[i]=nil
  1384.         end                                                                             -- clear the tables
  1385.         for j,w in pairs(nums) do
  1386.             nums[j]=nil
  1387.         end
  1388.         for k,x in pairs(xsstart) do
  1389.             xsstart[x] = nil
  1390.         end
  1391.        
  1392.         loop = 1                                                                        -- reset all variables
  1393.         hold = 0
  1394.         step = 1
  1395.         skip = 0
  1396.         speed = 1
  1397.         lstart = 1
  1398.         lend = 1
  1399.     end                                                                     -- ***** ...TO HERE
  1400.    
  1401. --  print ("xs @ end:")
  1402. --  dump (xs)
  1403.    
  1404.     for f,s in pairs(xs) do             -- add xs table (line) to xs output (before newline)
  1405.         table.insert(xsout, xs[f])
  1406.     end
  1407.    
  1408.     local xsheetoutput = ""
  1409.     local t = 0
  1410.     for f,s in pairs(xsout) do
  1411.         xsheetoutput = xsheetoutput..(tsf+t).."  --  "..s.."\n"
  1412.         t = t + 1
  1413.     end
  1414.    
  1415.     OutXFrameNumbers:SetAttrs({INP_Disabled = false,})
  1416.     OutXFrameNumbers:SetSource(Text(xsheetoutput),0)
  1417.     OutXFrameNumbers:SetAttrs({INP_Disabled = true,})
  1418.  
  1419.    
  1420.     return xsout[time-tsf+1]
  1421.    
  1422. end
  1423.  
  1424. ------------------------------------------------------------------- TRIGGER
  1425.  
  1426. function Trigger(ssf, tsf, trg, tdi, tmo, time)
  1427.  
  1428. -- first convert tdi from a string to a number
  1429.  
  1430.     local tv = {}   -- table for Trigger Values
  1431.     local nv = {}   -- table for On Trigger Values
  1432.     local fv = {}   -- table for Off Trigger Values
  1433.     local rv = {}   -- table for Run Speed Values
  1434. --  local mv = {}   -- table for Min Run Length Values
  1435.    
  1436.     local to = {}   -- table for Trigger Output
  1437.        
  1438.     local inrun = 0
  1439.     local direction = 1
  1440.     local hold = 1
  1441.     local i = 1
  1442.     local j = 2 -- first value will be initialized separately
  1443.    
  1444.     -- optimize the following further by first determining if a value is animated
  1445.    
  1446.     while i <= time-tsf+1 do
  1447.         tv[i] = InTrigger:GetSource(tsf+i-1).Value
  1448.         nv[i] = InOnTriggerThreshold:GetSource(tsf+1-i).Value
  1449.         fv[i] = InOffTriggerThreshold:GetSource(tsf+1-i).Value
  1450.         rv[i] = InRunSpeed:GetSource(tsf+1-i).Value
  1451. --      mv[i] = InMinRunLength:GetSource(tsf+1-i).Value
  1452.         i = i + 1
  1453.     end
  1454.    
  1455. --  print ("tv")
  1456. --  dump (tv)
  1457.    
  1458.     -- initialize first value of tv{}
  1459.    
  1460.     if tv[1] >= nv[1] then
  1461.         to[1] = 1
  1462.     else
  1463.         to[1] = 0
  1464.     end
  1465.    
  1466.     -- add minimum non-run length in inputs
  1467.  
  1468.     while j <= time-tsf+1 do                            -- for the active range
  1469.    
  1470.         if tmo == "Reset" then
  1471.             if tv[j] >= nv[j] then
  1472.                 inrun = inrun + 1
  1473.             elseif tv[j] <= fv[j] then
  1474.                 inrun = 0
  1475.             elseif inrun ~= 0 then
  1476.                 inrun = inrun + 1
  1477.             end
  1478.         elseif tmo == "Hold" then
  1479.             if tv[j] >= nv[j] then
  1480.                 inrun = inrun + 1
  1481.                 hold = 0
  1482.             elseif tv[j] <= fv[j] then
  1483.                 hold = 1
  1484.             elseif hold == 0 then
  1485.                 inrun = inrun + 1
  1486.             end
  1487.         elseif tmo == "Hold And Reset" then
  1488.             if tv[j] >= nv[j] then
  1489.                 if hold == 1 then
  1490.                     inrun = 1
  1491.                     hold = 0
  1492.                 else
  1493.                     inrun = inrun + 1
  1494.                 end
  1495.             elseif tv[j] <= fv[j] then
  1496.                 hold = 1
  1497.             elseif hold == 0 then
  1498.                 inrun = inrun + 1
  1499.             end
  1500.         elseif tmo == "Bounce" then
  1501.             if tv[j] >= nv[j] then
  1502.                 inrun = inrun + 1
  1503.                 direction = 1
  1504.             elseif tv[j] <= fv[j] then
  1505.                 inrun = inrun - 1           -- advance backwards
  1506.                 direction = -1
  1507.             else
  1508.                 inrun = inrun + direction
  1509.             end
  1510.         end
  1511.        
  1512.         to[j] = inrun * rv[j]
  1513.         j = j + 1
  1514.        
  1515.     end
  1516.                
  1517. --  print ("to")
  1518. --  dump (to)
  1519.    
  1520.     -- apply direction
  1521.    
  1522.     if tdi == "Up" then
  1523.         inrun = ssf + to[time+1-tsf]
  1524.     elseif tdi == "Down" then
  1525.         inrun = ssf - to[time+1-tsf]
  1526.     end
  1527.    
  1528.     return inrun
  1529.  
  1530. end
  1531.  
  1532. ------------------------------------------------------------------- SWITCH
  1533.  
  1534. function Switch(sws, swi, time)
  1535.  
  1536.     local ss = {} -- create table for the start frames
  1537.  
  1538.     for line in sws:gmatch("[^\n]+") do
  1539.         for number in line:gmatch("%d+") do
  1540.             table.insert(ss, tonumber(number))                                  --  put numbers in table
  1541.         end
  1542.     end
  1543.    
  1544. --  dump (ss)
  1545.  
  1546.     -- get all keyframes from the Switch parameter and put those in a table:
  1547.  
  1548.     local sk = {} -- create table for the keyframe values
  1549.     local si = {} -- create table for the switch values
  1550.    
  1551.     local op = InSwitch.Source and InSwitch.Source.Owner
  1552.    
  1553.     if op then
  1554.         local t = op:GetNextKeyTime(TIME_UNDEFINED)
  1555.      
  1556.         while t ~= TIME_UNDEFINED do
  1557.             table.insert(sk, t)
  1558.             table.insert(si, InSwitch:GetSource(t, REQF_SecondaryTime).Value)
  1559.             t = op:GetNextKeyTime(t)
  1560.         end
  1561.     end
  1562.      
  1563. --  dump (sk)
  1564. --  dump (si)
  1565.    
  1566.     count = time
  1567.     countstart = time
  1568.     switch = 1
  1569.    
  1570.     if sk[1] then
  1571.         for i,v in pairs(sk) do
  1572.             if v <= time then
  1573.                 countstart = v
  1574.                 switch = si[i]
  1575.             else
  1576.                 break
  1577.             end
  1578.         end
  1579.         if ss[switch] then
  1580.             count = ss[switch] + time - countstart
  1581.         else
  1582. --          print ("switch value out of bounds")
  1583.             count = time
  1584.         end
  1585.     else
  1586.         count = time
  1587.     end
  1588.    
  1589.     return count
  1590.    
  1591. end
  1592.  
  1593. ------------------------------------------------------------------- PROCESS
  1594.  
  1595. function Process(req)
  1596.  
  1597.     local mode = InMode:GetValue(req).Value
  1598.  
  1599.     local ssf = InSourceStartFrame:GetValue(req).Value
  1600.     local sef = InSourceEndFrame:GetValue(req).Value
  1601.     local tsf = InTargetStartFrame:GetValue(req).Value
  1602.     local tef = InTargetEndFrame:GetValue(req).Value
  1603.     local rev = InReverse:GetValue(req).Value
  1604.    
  1605.     local wrp = InTimeWarp:GetValue(req).Value
  1606.    
  1607.     local dlt = InDelta:GetValue(req).Value
  1608.     local dsc = InDeltaScale:GetValue(req).Value
  1609.     local dth = InDeltaThreshold:GetValue(req).Value
  1610.     local ddi = InDeltaDirection:GetValue(req).Value
  1611.     local dmo = InDeltaMode:GetValue(req).Value
  1612.    
  1613.     local spd = InSpeed:GetValue(req).Value
  1614.     local stp = InStep:GetValue(req).Value
  1615.     local spm = InSpeedMode:GetValue(req).Value
  1616.    
  1617.     local rds = InRandomSeed:GetValue(req).Value
  1618.    
  1619.     local hld = InHold:GetValue(req).Value
  1620.    
  1621.     local skp = InSkip:GetValue(req).Value
  1622.    
  1623.     local ofs = InOffset:GetValue(req).Value
  1624.    
  1625. --  local xsl = InXSheetSize:GetValue(req).Value
  1626.     local xsh = InXSheet:GetValue(req).Value
  1627.    
  1628.     local trg = InTrigger:GetValue(req).Value
  1629.     local ont = InOnTriggerThreshold:GetValue(req).Value
  1630.     local oft = InOffTriggerThreshold:GetValue(req).Value
  1631.     local rsp = InRunSpeed:GetValue(req).Value
  1632. --  local mnl = InMinRunLength:GetValue(req).Value
  1633. --  local mxl = InMaxRunLength:GetValue(req).Value
  1634.     local tdi = InTriggerDirection:GetValue(req).Value
  1635.     local tmo = InTriggerMode:GetValue(req).Value
  1636.    
  1637.     local sws = InSwitchStartFrames:GetValue(req).Value
  1638.     local swi = InSwitch:GetValue(req).Value
  1639.    
  1640.     local bftime = InBeforeTime:GetValue(req).Value
  1641.     local aftime = InAfterTime:GetValue(req).Value
  1642.     local ftg = InForceTargetRange:GetValue(req).Value
  1643.     local oiv = InRoundOutput:GetValue(req).Value
  1644.     local time = InNumber:GetValue(req).Value
  1645.    
  1646.     if time < tsf then                                  --determine before time behaviour
  1647.         if bftime == "Constant" then                    --since in all modes apart from "Continue" we want to retrieve values from within the active time range, we just need to figure out which times we pick them from
  1648.             timebf = tsf
  1649.         elseif bftime == "Continue" then                --since "Continue" generates new values instead of values already available in the retime functions, we need to do separate calculations for all modes
  1650.             if mode == "Warp" then
  1651.                 local wrptsf = InTimeWarp:GetSource(tsf).Value                  -- get wrp at target start frame
  1652.                 local wrptsfp = InTimeWarp:GetSource(tsf+1).Value               -- get wrp at the frame after target start frame
  1653.                 retimebf = Warp(ssf, sef, wrptsf, rev) - ( Warp(ssf, sef, wrptsfp, rev) - Warp(ssf, sef, wrptsf, rev) ) * (tsf-time)
  1654.             elseif mode == "Remap" then
  1655.                 retimebf = Remap(ssf, sef, tsf, tef, rev, tsf) - ( Remap(ssf, sef, tsf, tef, rev, tsf+1) - Remap(ssf, sef, tsf, tef, rev, tsf) ) * (tsf-time)
  1656.             elseif mode == "Delta" then
  1657.                 retimebf = Delta(ssf, dlt, ddi, dmo, tsf) - ( Delta(ssf, dlt, ddi, dmo, tsf+1) - Delta(ssf, dlt, ddi, dmo, tsf) ) * (tsf-time)
  1658.             elseif mode == "LockStart" then
  1659.                 retimebf = LockStart(ssf, sef, tsf, spd, stp, spm, rev, tsf) - ( LockStart(ssf, sef, tsf, spd, stp, spm, rev, tsf+1) - LockStart(ssf, sef, tsf, spd, stp, spm, rev, tsf) ) * (tsf-time)
  1660.             elseif mode == "LockEnd" then
  1661.                 retimebf = LockEnd(ssf, sef, tef, spd, stp, spm, rev, tsf) - ( LockEnd(ssf, sef, tef, spd, stp, spm, rev, tsf+1) - LockEnd(ssf, sef, tef, spd, stp, spm, rev, tsf) ) * (tsf-time)
  1662.             elseif mode == "Random" then
  1663.                 retimebf = Random(ssf, sef, rds, tsf) - ( Random(ssf, sef, rds, tsf+1) - Random(ssf, sef, rds, tsf) ) * (tsf-time)
  1664.             elseif mode =="Hold" then
  1665.                 local hldtsf = InHold:GetSource(tsf).Value
  1666.                 local hldtsfp = InHold:GetSource(tsf+1).Value
  1667.                 retimebf = hldtsf - (hldtsfp-hldtsf) * (tsf-time)
  1668.             elseif mode == "Skip" then
  1669.                 retimebf = Skip(ssf, skp, tsf) - ( Skip(ssf, skp, tsf+1) - Skip(ssf, skp, tsf) ) * (tsf-time)
  1670.             elseif mode == "Offset" then
  1671.                 retimebf = Offset(ofs, tsf) - ( Offset(ofs, tsf+1) - Offset(ofs, tsf) ) * (tsf-time)
  1672.             elseif mode == "XSheet" then
  1673.                 retimebf = XSheet(xsh, tsf, tsf) - ( XSheet(xsh, tsf, tsf+1) - XSheet(xsh, tsf, tsf) ) * (tsf-time)
  1674.             elseif mode == "Trigger" then
  1675.                 retimebf = Trigger(ssf, tsf, trg, tdi, tmo, tsf) - ( Trigger(ssf, tsf, trg, tdi, tmo, tsf+1) - Trigger(ssf, tsf, trg, tdi, tmo, tsf) ) * (tsf-time)
  1676.             elseif mode == "Switch" then
  1677.                 retimebf = Switch(sws, swi, tsf) - ( Switch(sws, swi, tsf+1) - Switch(sws, swi, tsf) ) * (tsf-time)
  1678.             end
  1679.         elseif bftime == "Loop" then
  1680.             timebf = tef - (tef-time)%(tef-tsf+1)
  1681.         elseif bftime == "PingPong" then
  1682.             if math.floor((tsf-time)/(tef-tsf)+1)%2==1 then
  1683.                 timebf = tsf+(tef-time)%(tef-tsf)
  1684.             else
  1685.                 timebf = tef-(tef-time)%(tef-tsf)
  1686.             end
  1687.         elseif bftime == "InclusivePingPong" then
  1688.             if math.floor((tsf-time-1)/(tef-tsf+1)+1)%2==1 then
  1689.                 timebf = tsf+(tef-time)%(tef-tsf+1)
  1690.             else
  1691.                 timebf = tef-(tef-time)%(tef-tsf+1)
  1692.             end
  1693.         elseif bftime == "Hold" then
  1694.             local hldbf = InHold:GetSource(tsf).Value      
  1695.             retimebf = Hold(hldbf)
  1696.         elseif bftime == "Random" then
  1697.             retimebf = Random(ssf, sef, rds, time)
  1698.         elseif bftime == "DoNothing" then
  1699.             retimebf = time
  1700.         end
  1701.         if bftime ~= "Continue" and bftime ~= "Hold" and bftime ~= "Random" and bftime ~= "DoNothing" then
  1702.             if mode == "Warp" then
  1703.                 local wrpbf = InTimeWarp:GetSource(timebf).Value
  1704.                 retimebf = Warp(ssf, sef, wrpbf, rev)
  1705.             elseif mode == "Remap" then
  1706.                 retimebf = Remap(ssf, sef, tsf, tef, rev, timebf)
  1707.             elseif mode == "Delta" then
  1708.                 retimebf = Delta(ssf, dlt, ddi, dmo, timebf)
  1709.             elseif mode == "LockStart" then
  1710.                 retimebf = LockStart(ssf, sef, tsf, spd, stp, spm, rev, timebf)
  1711.             elseif mode == "LockEnd" then
  1712.                 retimebf = LockEnd(ssf, sef, tef, spd, stp, spm, rev, timebf)
  1713.             elseif mode == "Random" then
  1714.                 retimebf = Random(ssf, sef, rds, timebf)
  1715.             elseif mode == "Hold" then
  1716.                 hldbf = InHold:GetSource(timebf).Value
  1717.                 retimebf = Hold(hldbf)
  1718.             elseif mode == "Skip" then
  1719.                 retimebf = Skip(ssf, skp, timebf)
  1720.             elseif mode == "Offset" then
  1721.                 retimebf = Offset(ofs, timebf)
  1722.             elseif mode == "XSheet" then
  1723.                 retimebf = XSheet(xsh, tsf, timebf)
  1724.             elseif mode == "Trigger" then
  1725.                 retimebf = Trigger(ssf, tsf, trg, tdi, tmo, timebf)
  1726.             elseif mode == "Switch" then
  1727.                 retimebf = Switch(sws, swi, timebf)
  1728.             end
  1729.         end
  1730.     end
  1731.    
  1732.     if time > tef then                                  --determine after time behaviour
  1733.         if aftime == "Constant" then                    --since in all modes apart from "Continue" we want to retrieve values from within the active time range, we just need to figure out which times we pick them from
  1734.             timeaf = tef
  1735.         elseif aftime == "Continue" then                --since "Continue" generates new values instead of values already available in the retime functions, we need to do separate calculations for all modes
  1736.             if mode == "Warp" then
  1737.                 local wrptef = InTimeWarp:GetSource(tef).Value
  1738.                 local wrptefm = InTimeWarp:GetSource(tef-1).Value
  1739.                 retimeaf = Warp(ssf, sef, wrptef, rev) + ( Warp(ssf, sef, wrptef, rev) - Warp(ssf, sef, wrptefm, rev) ) * (time-tef)            -- get wrp at certain frame
  1740.             elseif mode == "Remap" then
  1741.                 retimeaf = Remap(ssf, sef, tsf, tef, rev, tef) + ( Remap(ssf, sef, tsf, tef, rev, tef) - Remap(ssf, sef, tsf, tef, rev, tef-1) ) * (time-tef)
  1742.             elseif mode == "Delta" then
  1743.                 retimeaf = Delta(ssf, dlt, ddi, dmo, tef) + ( Delta(ssf, dlt, ddi, dmo, tef) - Delta(ssf, dlt, ddi, dmo, tef-1) ) * (time-tef)
  1744.             elseif mode == "LockStart" then
  1745.                 retimeaf = LockStart(ssf, sef, tsf, spd, stp, spm, rev, tef) + ( LockStart(ssf, sef, tsf, spd, stp, spm, rev, tef) - LockStart(ssf, sef, tsf, spd, stp, spm, rev, tef-1) ) * (time-tef)
  1746.             elseif mode == "LockEnd" then
  1747.                 retimeaf = LockEnd(ssf, sef, tef, spd, stp, spm, rev, tef) + ( LockEnd(ssf, sef, tef, spd, stp, spm, rev, tef) - LockEnd(ssf, sef, tef, spd, stp, spm, rev, tef-1) ) * (time-tef)
  1748.             elseif mode == "Random" then
  1749.                 retimeaf = Random(ssf, sef, rds, tef) + ( Random(ssf, sef, rds, tef) - Random(ssf, sef, rds, tef-1) ) * (time-tef)
  1750.             elseif mode =="Hold" then
  1751.                 local hldtef = InHold:GetSource(tef).Value
  1752.                 local hldtefm = InHold:GetSource(tef-1).Value
  1753.                 retimeaf = hldtef + (hldtef-hldtefm) * (time-tef)
  1754.             elseif mode == "Skip" then
  1755.                 retimeaf = Skip(ssf, skp, tef) + ( Skip(ssf, skp, tef) - Skip(ssf, skp, tef-1) ) * (time-tef)
  1756.             elseif mode == "Offset" then
  1757.                 retimeaf = Offset(ofs, tef) + ( Offset(ofs, tef) - Offset(ofs, tef-1) ) * (time-tef)
  1758.             elseif mode == "XSheet" then
  1759.                 retimeaf = XSheet(xsh, tsf, tef) + ( XSheet(xsh, tsf, tef) - XSheet(xsh, tsf, tef-1) ) * (time-tef)
  1760.             elseif mode == "Trigger" then
  1761.                 retimeaf = Trigger(ssf, tsf, trg, tdi, tmo, tef) + ( Trigger(ssf, tsf, trg, tdi, tmo, tef) - Trigger(ssf, tsf, trg, tdi, tmo, tef-1) ) * (time-tef)
  1762.             elseif mode == "Switch" then
  1763.                 retimeaf = Switch(sws, swi, tef) + ( Switch(sws, swi, tef) - Switch(sws, swi, tef-1) ) * (time-tef)
  1764.             end
  1765.         elseif aftime == "Loop" then
  1766.             timeaf = tef - (tef-time)%(tef-tsf+1)
  1767.         elseif aftime == "PingPong" then
  1768.             if math.floor((tsf-time)/(tef-tsf)+1)%2==1 then
  1769.                 timeaf = tsf+(tef-time)%(tef-tsf)
  1770.             else
  1771.                 timeaf = tef-(tef-time)%(tef-tsf)
  1772.             end
  1773.         elseif aftime == "InclusivePingPong" then
  1774.             if math.floor((tsf-time-1)/(tef-tsf+1)+1)%2==1 then
  1775.                 timeaf = tsf+(tef-time)%(tef-tsf+1)
  1776.             else
  1777.                 timeaf = tef-(tef-time)%(tef-tsf+1)
  1778.             end
  1779.         elseif aftime == "Hold" then
  1780.             local hldaf = InHold:GetSource(tef).Value      
  1781.             retimeaf = Hold(hldaf)
  1782.         elseif aftime == "Random" then
  1783.             retimeaf = Random(ssf, sef, rds, time)
  1784.         elseif aftime == "DoNothing" then
  1785.             retimeaf = time
  1786.         end
  1787.         if aftime ~= "Continue" and aftime ~= "Hold" and aftime ~= "Random" and aftime ~= "DoNothing" then
  1788.             if mode == "Warp" then
  1789.                 wrpaf = InTimeWarp:GetSource(timeaf).Value
  1790.                 retimeaf = Warp(ssf, sef, wrpaf, rev)
  1791.             elseif mode == "Remap" then
  1792.                 retimeaf = Remap(ssf, sef, tsf, tef, rev, timeaf)
  1793.             elseif mode == "Delta" then
  1794.                 retimeaf = Delta(ssf, dlt, ddi, dmo, timeaf)
  1795.             elseif mode == "LockStart" then
  1796.                 retimeaf = LockStart(ssf, sef, tsf, spd, stp, spm, rev, timeaf)
  1797.             elseif mode == "LockEnd" then
  1798.                 retimeaf = LockEnd(ssf, sef, tef, spd, stp, spm, rev, timeaf)
  1799.             elseif mode == "Random" then
  1800.                 retimeaf = Random(ssf, sef, rds, timeaf)
  1801.             elseif mode =="Hold" then
  1802.                 hldaf = InHold:GetSource(timeaf).Value
  1803.                 retimeaf = Hold(hldaf)
  1804.             elseif mode == "Skip" then
  1805.                 retimeaf = Skip(ssf, skp, timeaf)
  1806.             elseif mode == "Offset" then
  1807.                 retimeaf = Offset(ofs, timeaf)
  1808.             elseif mode == "XSheet" then
  1809.                 retimeaf = XSheet(xsh, tsf, timeaf)
  1810.             elseif mode == "Trigger" then
  1811.                 retimeaf = Trigger(ssf, tsf, trg, tdi, tmo, timeaf)
  1812.             elseif mode == "Switch" then
  1813.                 retimeaf = Switch(sws, swi, timeaf)
  1814.             end
  1815.         end
  1816.     end
  1817.  
  1818. ------------------------------------------------------------------- COLLECT ALL
  1819.  
  1820.     if mode == "Warp" then
  1821.         if time < tsf and ftg == 1 then
  1822.             retime = retimebf
  1823.         elseif time > tef and ftg == 1 then
  1824.             retime = retimeaf
  1825.         else
  1826.             retime = Warp(ssf, sef, wrp, rev)
  1827.         end
  1828.     elseif mode == "Remap" then
  1829.         if time < tsf then
  1830.             retime = retimebf
  1831.         elseif time > tef then
  1832.             retime = retimeaf
  1833.         else
  1834.             retime = Remap(ssf, sef, tsf, tef, rev, time)
  1835.         end
  1836.     elseif mode == "Delta" then
  1837.         if time < tsf and ftg == 1 then
  1838.             retime = retimebf
  1839.         elseif time > tef and ftg == 1 then
  1840.             retime = retimeaf
  1841.         else
  1842.             retime = Delta(ssf, dlt, ddi, dmo, time)
  1843.         end
  1844.     elseif mode == "LockStart" then
  1845.         if time < tsf then
  1846.             retime = retimebf
  1847.         elseif time > tef and ftg == 1 then
  1848.             retime = retimeaf
  1849.         else
  1850.             retime = LockStart(ssf, sef, tsf, spd, stp, spm, rev, time)
  1851.         end
  1852.     elseif mode == "LockEnd" then
  1853.         if time < tsf and ftg == 1 then
  1854.             retime = retimebf
  1855.         elseif time > tef then
  1856.             retime = retimeaf
  1857.         else
  1858.             retime = LockEnd(ssf, sef, tef, spd, stp, spm, rev, time)
  1859.         end
  1860.     elseif mode == "Random" then
  1861.         if time < tsf and ftg == 1 then
  1862.             retime = retimebf
  1863.         elseif time > tef and ftg == 1 then
  1864.             retime = retimeaf
  1865.         else
  1866.             retime = Random(ssf, sef, rds, time)
  1867.         end
  1868.     elseif mode =="Hold" then
  1869.         if time < tsf and ftg == 1 then
  1870.             retime = retimebf
  1871.         elseif time > tef and ftg == 1 then
  1872.             retime = retimeaf
  1873.         else
  1874.             retime = Hold(hld)
  1875.         end
  1876.     elseif mode == "Skip" then
  1877.         if time < tsf and ftg == 1 then
  1878.             retime = retimebf
  1879.         elseif time > tef and ftg == 1 then
  1880.             retime = retimeaf
  1881.         else
  1882.             retime = Skip(ssf, skp, time)
  1883.         end
  1884.     elseif mode == "Offset" then
  1885.         if time < tsf and ftg == 1 then
  1886.             retime = retimebf
  1887.         elseif time > tef and ftg == 1 then
  1888.             retime = retimeaf
  1889.         else
  1890.             retime = Offset(ofs, time)
  1891.         end
  1892.     elseif mode == "XSheet" then
  1893.         if time < tsf then
  1894.             retime = retimebf
  1895.         elseif time > tef and ftg == 1 then
  1896.             retime = retimeaf
  1897.         else
  1898.             retime = XSheet(xsh, tsf, time)
  1899.         end
  1900.     elseif mode == "Trigger" then
  1901.         if time < tsf then
  1902.             retime = retimebf
  1903.         elseif time > tef and ftg == 1 then
  1904.             retime = retimeaf
  1905.         else
  1906.             retime = Trigger(ssf, tsf, trg, tdi, tmo, time)
  1907.         end
  1908.     elseif mode == "Switch" then
  1909.         if time < tsf and ftg == 1 then
  1910.             retime = retimebf
  1911.         elseif time > tef and ftg == 1 then
  1912.             retime = retimeaf
  1913.         else
  1914.             retime = Switch(sws, swi, time)
  1915.         end
  1916.     end
  1917.  
  1918. ------------------------------------------------------------------- ROUNDING OF OUTPUT VALUES
  1919.  
  1920.     if oiv == "Down" then retime = math.floor(retime) end
  1921.     if oiv == "Up" then retime = math.ceil(retime) end
  1922.  
  1923. ------------------------------------------------------------------- OUTPUT
  1924.  
  1925.     OutValue:Set(req, Number(retime))
  1926. end
Notice how small it is in your flow. It's small like a mask is. If you drag it to the viewer, you can see it's output.

Where this gets fun is when you start mixing it with other operators.
Code: [Select all] [Expand/Collapse] [Download] (NumberOp.fuse)
  1. --[[
  2.  
  3. NumberOp.Fuse
  4.  
  5. Fuse that performs operations on scalar number inputs.
  6.  
  7. --]]
  8.  
  9. version = "version .11 (Aug 28, 2016)"
  10.  
  11. --[[
  12.  
  13.  Written by Chad Capeland (ccapeland[REMOVE-ME]@indicated.com)
  14.  Copyright (c) 2016 Indicated, LLC
  15.  
  16.  
  17.  The authors hereby grant permission to use, copy, and distribute this
  18.  software and its documentation for any purpose, provided that existing
  19.  copyright notices are retained in all copies and that this notice is
  20.  included verbatim in any distributions. Additionally, the authors grant
  21.  permission to modify this software and its documentation for any
  22.  purpose, provided that such modifications are not distributed without
  23.  the explicit consent of the authors and that existing copyright notices
  24.  are retained in all copies.
  25.  
  26.  IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
  27.  DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
  28.  OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES
  29.  THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF
  30.  SUCH DAMAGE.
  31.  
  32.  THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
  33.  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  34.  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
  35.  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND
  36.  DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
  37.  UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  38.  
  39. --]]
  40.  
  41.  
  42. FuRegisterClass("NumberOperator", CT_Tool, {  
  43.     REGS_Category = "Fuses",
  44.     REGS_OpIconString = "fNOp",
  45.     REGS_OpDescription = "Number Operator Fuse",
  46.     REG_NoMotionBlurCtrls = true,
  47.     REG_OpNoMask = true,
  48.     REGID_DataType      = "Number",
  49.     REGID_InputDataType = "Number",
  50.     REG_NoBlendCtrls = true,
  51.     REG_NoObjMatCtrls = true,
  52.     REG_NoCommonCtrls = true,
  53.     --REG_Fuse_NoEdit = true,
  54.     --REG_Fuse_NoReload = true,
  55.     --REG_Fuse_TilePic = NumberOperatorFusepic
  56.     })
  57.  
  58. function Create()
  59.  
  60.     InOp= self:AddInput("Operation ", "Operation", {
  61.         LINKID_DataType = "Number",
  62.         INPID_InputControl = "ComboControl",
  63.         INP_Default = 0.0,
  64.         INP_Integer = true,
  65.         { CCS_AddString = "Add", },                --0
  66.         { CCS_AddString = "Subtract A-B", },   
  67.         { CCS_AddString = "Multiply", },
  68.         { CCS_AddString = "Divide A/B", },        
  69.         { CCS_AddString = "Min", },
  70.         { CCS_AddString = "Max", },                --5  
  71.         { CCS_AddString = "Average", },
  72.         { CCS_AddString = "Difference", },
  73.         { CCS_AddString = "Modulo A/B", }, 
  74.         { CCS_AddString = "Power A^B", },
  75.         { CCS_AddString = "Arc Tangent A/B", },    --10
  76.         { CCS_AddString = "----------", },  
  77.         { CCS_AddString = "Sine", },   
  78.         { CCS_AddString = "Cosine", },
  79.         { CCS_AddString = "Tangent", },    
  80.         { CCS_AddString = "Arc Sine", },           --15
  81.         { CCS_AddString = "Arc Cosine", },
  82.         { CCS_AddString = "Arc Tangent", },
  83.         { CCS_AddString = "Log", },
  84.         { CCS_AddString = "Log 10", },
  85.         { CCS_AddString = "Exponential", },        --20
  86.         { CCS_AddString = "Degrees to Radians", },
  87.         { CCS_AddString = "Radians to Degrees", },
  88.         { CCS_AddString = "Absolute Value", },
  89.         { CCS_AddString = "Ceiling", },
  90.         { CCS_AddString = "Floor", },              --25
  91.         { CCS_AddString = "Square Root", },
  92.         { CCS_AddString = "Reciprocal", },
  93.         { CCS_AddString = "Negate", },
  94.         { CCS_AddString = "Clamp 0-1", },
  95.         })
  96.  
  97.    
  98.     InNumA = self:AddInput("Number A", "NumberA", {
  99.         LINKID_DataType = "Number",
  100.         LINK_Main = 1,
  101.         INP_Required = true,
  102.         }) 
  103.        
  104.     InNumB = self:AddInput("Number B", "NumberB", {
  105.         LINKID_DataType = "Number",
  106.         LINK_Main = 2,
  107.         INP_Required = false,
  108.         })
  109.  
  110. --[[       
  111.     InNumC = self:AddInput("Number C", "NumberC", {
  112.         LINKID_DataType = "Number",
  113.         LINK_Main = 3,
  114.         INP_Required = false,
  115.         IC_Visible = false,
  116.         })
  117. --]]
  118.  
  119.     OutN = self:AddOutput("Output", "Output", {
  120.         LINKID_DataType = "Number",
  121.         LINK_Main = 1,
  122.         })     
  123.        
  124.     InLabel = self:AddInput(version, "version", {
  125.         LINKID_DataType = "Text",
  126.         INPID_InputControl = "LabelControl",
  127.         INP_External = false,
  128.         INP_Passive = true,
  129.         })
  130. end
  131.  
  132. --[[
  133. function PreCalcProcess(req)
  134.     Process(req)
  135. end
  136. --]]
  137.  
  138. function Process(req)
  139.     local Op = InOp:GetValue(req).Value
  140.    
  141.     local inA = InNumA:GetValue(req).Value
  142.     local inB = InNumB:GetValue(req).Value
  143.  
  144.     --print (inA)
  145.     --print (inB)
  146.    
  147.     if Op == 0 then              --Add
  148.         out = inA + inB
  149.     elseif Op == 1 then          --Subtract
  150.         out = inA - inB
  151.     elseif Op == 2 then          --Multiply
  152.         out = inA * inB
  153.     elseif Op == 3 then          --Divide
  154.         out = inA / inB
  155.     elseif Op == 4 then          --Min
  156.         out = math.min(inA, inB)
  157.     elseif Op == 5 then          --Max
  158.         out = math.max(inA, inB)
  159.     elseif Op == 6 then          --Average
  160.         out = (inA + inB)/2
  161.     elseif Op == 7 then          --Difference
  162.         out = math.abs(inA - inB)  
  163.     elseif Op == 8 then          --Mod
  164.         out = math.mod(inA, inB)
  165.     elseif Op == 9 then          --Power
  166.         out = math.pow(inA, inB)   
  167.     elseif Op == 10 then          --atan2
  168.         out = math.atan2(inA, inB)
  169.     elseif Op == 11 then          -- (----------) divider returns pi
  170.         out = math.pi
  171.     elseif Op == 12 then          --Sin
  172.         out = math.sin(inA)
  173.     elseif Op == 13 then          --Cos
  174.         out = math.cos(inA)
  175.     elseif Op == 14 then          --Tan
  176.         out = math.tan(inA)
  177.     elseif Op == 15 then          --ASin
  178.         out = math.asin(inA)   
  179.     elseif Op == 16 then          --ACos
  180.         out = math.acos(inA)       
  181.     elseif Op == 17 then          --ATan
  182.         out = math.atan(inA)
  183.     elseif Op == 18 then          --Log
  184.         out = math.log(inA)
  185.     elseif Op == 19 then          --Log10
  186.         out = math.log10(inA)  
  187.     elseif Op == 20 then          --Exp
  188.         out = math.exp(inA)
  189.     elseif Op == 21 then          --Rad
  190.         out = math.rad(inA)
  191.     elseif Op == 22 then          --Deg
  192.         out = math.deg(inA)
  193.     elseif Op == 23 then          --Abs
  194.         out = math.abs(inA)
  195.     elseif Op == 24 then          --Ceil
  196.         out = math.ceil(inA)
  197.     elseif Op == 25 then          --Floor
  198.         out = math.floor(inA)  
  199.     elseif Op == 26 then          --Sqrt
  200.         out = math.sqrt(inA)   
  201.     elseif Op == 27 then          --Reciprocal
  202.         out = 1/inA        
  203.     elseif Op == 28 then          --Negate
  204.         out = 1-inA            
  205.     elseif Op == 29 then          --Clamp
  206.         if inA > 1 then
  207.             out = 1
  208.         elseif inA < 0 then
  209.             out = 0
  210.         else
  211.             out = inA
  212.         end
  213.     end
  214.    
  215.     OutN:Set(req, out)
  216.  
  217. end
  218.  
If you want to use in an existing tool that is typically expecting a modifier input, do Connect To.
  1. {
  2.     Tools = ordered() {
  3.         NumberOperator1 = Fuse.NumberOperator {
  4.             Inputs = {
  5.                 Operation = Input { Value = 7, },
  6.                 NumberA = Input {
  7.                     SourceOp = "TimeMachineTest1",
  8.                     Source = "Output",
  9.                 },
  10.                 NumberB = Input {
  11.                     SourceOp = "TimeMachineTest1_1",
  12.                     Source = "Output",
  13.                 },
  14.             },
  15.             ViewInfo = OperatorInfo { Pos = { 1073.5, 217 } },
  16.         },
  17.         TimeMachineTest1_1 = Fuse.TimeMachineTest {
  18.             Inputs = {
  19.                 TimeWarp = Input { Value = 0.127659574468085, },
  20.                 Skip = Input { Value = 1, },
  21.                 XFrameNumbers = Input { Disabled = true, },
  22.             },
  23.             ViewInfo = OperatorInfo { Pos = { 1026.42, 185.143 } },
  24.         },
  25.         Mandelbrot1 = Mandel {
  26.             CtrlWZoom = false,
  27.             Inputs = {
  28.                 Width = Input { Value = 1920, },
  29.                 Height = Input { Value = 1080, },
  30.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  31.                 Rotation = Input {
  32.                     SourceOp = "NumberOperator1",
  33.                     Source = "Output",
  34.                 },
  35.             },
  36.             ViewInfo = OperatorInfo { Pos = { 1079.67, 262.893 } },
  37.         },
  38.         TimeMachineTest1 = Fuse.TimeMachineTest {
  39.             Inputs = {
  40.                 TimeWarp = Input { Value = 0.417021276595745, },
  41.                 Skip = Input { Value = 1, },
  42.                 XFrameNumbers = Input { Disabled = true, },
  43.             },
  44.             ViewInfo = OperatorInfo { Pos = { 962.938, 216.75 } },
  45.         }
  46.     }
  47. }

User avatar
SecondMan
Site Admin
Posts: 4607
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 28
Location: Vancouver, Canada
Been thanked: 138 times
Contact:

Re: Modifier nodes

#9

Post by SecondMan » Tue Aug 30, 2016 12:13 pm

That's about as far as I got a while ago when you told me how to do it. It's neat, but it screws up the viewer. Once you've dragged a modifier in there, it will only ever display a strip at the top. And you don't get a visual link between the modifiers and the nodes, of course.

I would love to see Modifier nodes become a reality. I like the idea of being able to collapse/expand modifiers for clarity. I'm basically all for more visual feedback, I want to be able to read a comp, no matter how deep and intricate the links go.

And yes, for me this would include animation splines. At first I was thinking that would be an exception, but they are modifiers too, right? And it would be terrific to have a node containing just a spline to which you can connect other nodes. Double clicking the spline node would bring up the spline editor.

User avatar
Chad
Fusionator
Posts: 1538
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 21 times

Re: Modifier nodes

#10

Post by Chad » Tue Aug 30, 2016 12:47 pm

If you resize the viewer, it fixes that first issue. But yes, that's part of the work that would still be needed. Floating viewers work well for this too, as they can be quite small.

The connection issue exists right now anyway with things like publishing and connect to. Would like to see that addressed in general. But it's also possible to add an input to the flow that accepts the number. Could be done with UserControls or just letting the input be toggled to LINK_Main or not.

Yes, you'd want this for all data types. LUT splines, gradients, text, audio, etc..

I think having the existing modifiers is fine, when you add a Ply, you don't want it to make 2 tools automatically, right? But there should be an option in the modifier to "move" it to the flow.

User avatar
Dunn
Moderator
Posts: 495
Joined: Mon Aug 04, 2014 4:27 am
Location: Hamburg, Germany
Been thanked: 8 times
Contact:

Re: Modifier nodes

#11

Post by Dunn » Tue Aug 30, 2016 1:43 pm

Thanx, Chad for sharing it.

User avatar
SecondMan
Site Admin
Posts: 4607
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 28
Location: Vancouver, Canada
Been thanked: 138 times
Contact:

Re: Modifier nodes

#12

Post by SecondMan » Tue Aug 30, 2016 2:24 pm

Chad wrote: I think having the existing modifiers is fine, when you add a Ply, you don't want it to make 2 tools automatically, right? But there should be an option in the modifier to "move" it to the flow.
Hadn't thought of that particular case yet, but yes, exactly.

User avatar
Chad
Fusionator
Posts: 1538
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 21 times

Re: Modifier nodes

#13

Post by Chad » Tue Aug 30, 2016 3:23 pm

Yeah, if you add the modifier from the flow context menu, toolbar, addtool, tools menu, etc. it should add to the flow. But if you add the modifier from the tool controls, then it should be added to the modifier tab.

User avatar
Kristof
Fusionista
Posts: 835
Joined: Thu Aug 07, 2014 1:30 pm
Answers: 3
Been thanked: 29 times

Re: Modifier nodes

#14

Post by Kristof » Thu Sep 01, 2016 3:39 pm

Chad, once again, thanks! And yes, Pieter, having anim splines as a node would be cool too. This kind of thing will allow you to make nice setups... There's more unexposed stuff that would benefit from having it accessible in the flow editor. The array of character level styling in a Text+ node, for instance. The attributes... You could use that to make a procedural setup for movie credits.

The list goes on. So BMD should be consistent and make it all accessible. Maybe not by default, but on a need to have basis. The comper can RMB in the control panel to make the parameter a separate node in the flow.

User avatar
Kristof
Fusionista
Posts: 835
Joined: Thu Aug 07, 2014 1:30 pm
Answers: 3
Been thanked: 29 times

Re: Modifier nodes

#15

Post by Kristof » Sat Sep 03, 2016 12:49 pm

Having a "Number" DataType assigned to a MainInput is probably not something Fusion is expecting:
The main difference being that MainInputs deal with Image data, Masks, Data3D, Particle Streams while regular Inputs deal with Numbers, Points, and Text etc.
You can connect the ouput of your TimeMachine modifiers or NumberOperator to this input as we have a matching DataType. But is there a way to instance the gain in this example directly as a MainInput? Now It's a hack because I'm linking it to a usercontrol via an expression that has a MainInput.

Just an experiment, mind you.
  1. {
  2.     Tools = ordered() {
  3.         BrightnessContrast3_5 = BrightnessContrast {
  4.             CtrlWZoom = false,
  5.             Inputs = {
  6.                 Gain = Input {
  7.                     Value = 0,
  8.                     Expression = "Number",
  9.                 },
  10.             },
  11.             ViewInfo = OperatorInfo { Pos = { 1663, 46, }, },
  12.             UserControls = ordered() {
  13.                 Number = {
  14.                     LINK_Main = 2,
  15.                     LINKID_DataType = "Number",
  16.                     IC_ControlPage = 0,
  17.                     INPID_InputControl = "SliderControl",
  18.                     INP_Default = 0,
  19.                 },
  20.             },
  21.         },
  22.     },
  23.     ActiveTool = "BrightnessContrast3_5",
  24. }