Totox691

Davinci Fusion - Auto interleave clip

Oct 4th, 2025
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.80 KB | None | 0 0
  1. {
  2. Tools = ordered() {
  3. TimeStretcher2 = TimeStretcher {
  4. Inputs = {
  5. SourceTime = Input {
  6. SourceOp = "TimeStretcher2SourceTime",
  7. Source = "Value",
  8. Expression = ":\nlocal ix=tonumber(string.match(self.Name, \"TimeStretcher(%d+)$\"))\nix=ix-1\nlocal n=v.NumberIn1\nlocal i=v.NumberIn2\nlocal saw=time % i -- n3\nlocal switch=math.floor(time/i) % n -- n4\nlocal phase = i*math.floor(time/(n*i)) -- n5\nlocal val = phase+saw -- n6\nlocal step = phase+i -- n7\nif switch == ix then\n print(\"val\",time,val) \n return val\n elseif switch > ix then\n print(\"step\",time,step) \n return step\n else\n print(\"phase\",time,phase) \n return phase\nend",
  9. }
  10. },
  11. ViewInfo = OperatorInfo { Pos = { 0, 82.5 } },
  12. },
  13. TimeStretcher2SourceTime = BezierSpline {
  14. SplineColor = { Red = 233, Green = 217, Blue = 243 },
  15. CtrlWZoom = false,
  16. KeyFrames = {
  17. [0] = { 0, RH = { 10, 0 }, Flags = { Linear = true, Loop = true, LoopRel = true } },
  18. [30] = { 0, LH = { 20, 0 }, RH = { 40, 10 }, Flags = { Linear = true } },
  19. [60] = { 30, LH = { 50, 20 }, RH = { 70, 30 }, Flags = { Linear = true } },
  20. [90] = { 30, LH = { 80, 30 }, Flags = { Linear = true, Loop = true, LoopRel = true } }
  21. }
  22. },
  23. TimeStretcher1 = TimeStretcher {
  24. CurrentSettings = 2,
  25. CustomData = { Settings = { [1] = { Tools = ordered() { TimeStretcher1 = TimeStretcher { Inputs = { SourceTime = Input { Value = 160, Expression = ":\nlocal ix=tonumber(string.match(self.Name, \"TimeStretcher(%d+)$\"))\nix=ix-1\nlocal n=v.NumberIn1\nlocal i=v.NumberIn2\nlocal saw=time % i -- n3\nlocal switch=math.floor(time/i) % n -- n4\nlocal phase = i*math.floor(time/(n*i)) -- n5\nlocal val = phase+saw -- n6\nlocal step = phase+i -- n7\nif switch == ix then\n print(\"val\",time,val) \n return val\n elseif switch > ix then\n print(\"step\",time,step) \n return step\n else\n print(\"phase\",time,phase) \n return phase\nend\n" }, Input = Input { SourceOp = "Letterbox1", Source = "Output" } }, CtrlWZoom = false, ViewInfo = OperatorInfo { Pos = { 0, 16.5 } }, CustomData = {
  26. } } } }, }, },
  27. Inputs = {
  28. SourceTime = Input {
  29. Value = 0,
  30. Expression = ":\nlocal ix=tonumber(string.match(self.Name, \"TimeStretcher(%d+)$\"))\nix=ix-1\nlocal n=v.NumberIn1 -- number of clips\nlocal i=v.NumberIn2 -- time interval\nlocal saw=time % i -- saw teeth depending on time and interval \nlocal switch=math.floor(time/i) % n -- current switch depending on number of inputs\nlocal phase = i*math.floor(time/(n*i)) -- base value depending on the relative time\nlocal val = phase+saw -- ramp value\nlocal step = phase+i -- value to reach at each phase\nif switch == ix then \n return val -- current ramp value\n elseif switch > ix then\n return step -- maintain the reached value\n else\n return phase -- wait to apply ramp\nend\n",
  31. }
  32. },
  33. ViewInfo = OperatorInfo { Pos = { 0, 16.5 } },
  34. },
  35. TimeStretcher3 = TimeStretcher {
  36. CtrlWZoom = false,
  37. Inputs = {
  38. SourceTime = Input {
  39. SourceOp = "TimeStretcher3SourceTime",
  40. Source = "Value",
  41. Expression = ":\nlocal ix=tonumber(string.match(self.Name, \"TimeStretcher(%d+)$\"))\nix=ix-1\nlocal n=v.NumberIn1\nlocal i=v.NumberIn2\nlocal saw=time % i -- n3\nlocal switch=math.floor(time/i) % n -- n4\nlocal phase = i*math.floor(time/(n*i)) -- n5\nlocal val = phase+saw -- n6\nlocal step = phase+i -- n7\nif switch == ix then\n print(\"val\",time,val) \n return val\n elseif switch > ix then\n print(\"step\",time,step) \n return step\n else\n print(\"phase\",time,phase) \n return phase\nend\n\n",
  42. }
  43. },
  44. ViewInfo = OperatorInfo { Pos = { 0, 148.5 } },
  45. },
  46. TimeStretcher3SourceTime = BezierSpline {
  47. SplineColor = { Red = 233, Green = 217, Blue = 243 },
  48. CtrlWZoom = false,
  49. KeyFrames = {
  50. [0] = { 0, RH = { 20, 0 }, Flags = { Linear = true, Loop = true, LoopRel = true } },
  51. [60] = { 0, LH = { 40, 0 }, RH = { 70, 10 }, Flags = { Linear = true } },
  52. [90] = { 30, LH = { 80, 20 }, Flags = { Linear = true, Loop = true, LoopRel = true } }
  53. }
  54. },
  55. Switch1 = Switch {
  56. Inputs = {
  57. NumberOfInputs = Input { Value = 3, },
  58. Source = Input {
  59. Value = 2,
  60. Expression = "v.NumberIn4",
  61. },
  62. Input0 = Input {
  63. SourceOp = "TimeStretcher1",
  64. Source = "Output",
  65. },
  66. Input1 = Input {
  67. SourceOp = "TimeStretcher2",
  68. Source = "Output",
  69. },
  70. Input2 = Input {
  71. SourceOp = "TimeStretcher3",
  72. Source = "Output",
  73. }
  74. },
  75. ViewInfo = OperatorInfo { Pos = { 165, 82.5 } },
  76. Colors = { TileColor = { R = 0.572549019607843, G = 0.572549019607843, B = 0.572549019607843 }, }
  77. },
  78. Text2_1 = TextPlus {
  79. Inputs = {
  80. GlobalOut = Input { Value = 400, },
  81. Width = Input { Value = 1920, },
  82. Height = Input { Value = 1080, },
  83. UseFrameFormatSettings = Input { Value = 1, },
  84. ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  85. Wrap = Input { Value = 1, },
  86. LayoutRotation = Input { Value = 1, },
  87. TransformRotation = Input { Value = 1, },
  88. Softness1 = Input { Value = 1, },
  89. StyledText = Input {
  90. Value = "B",
  91. Expression = "\"B-\"..TimeStretcher2.SourceTime",
  92. },
  93. Font = Input { Value = "Open Sans", },
  94. Style = Input { Value = "Bold", },
  95. Size = Input { Value = 0.2, },
  96. VerticalJustificationNew = Input { Value = 3, },
  97. HorizontalJustificationNew = Input { Value = 3, }
  98. },
  99. ViewInfo = OperatorInfo { Pos = { 275, 148.5 } },
  100. },
  101. MultiMerge1 = MultiMerge {
  102. Inputs = {
  103. LayerOrder = Input { Value = ScriptVal { { [0] = 1, 2, 3 } }, },
  104. Background = Input {
  105. SourceOp = "Switch1",
  106. Source = "Output",
  107. },
  108. ["Layer1.Foreground"] = Input {
  109. SourceOp = "Text2",
  110. Source = "Output",
  111. },
  112. ["Layer1.Center"] = Input { Value = { 0.5, 0.748 }, },
  113. LayerName1 = Input { Value = "Text2 Layer", },
  114. ["Layer2.Foreground"] = Input {
  115. SourceOp = "Text2_1",
  116. Source = "Output",
  117. },
  118. LayerName2 = Input { Value = "Text2_1 Layer", },
  119. ["Layer3.Foreground"] = Input {
  120. SourceOp = "Text2_2",
  121. Source = "Output",
  122. },
  123. ["Layer3.Center"] = Input { Value = { 0.5, 0.256 }, },
  124. LayerName3 = Input { Value = "Text2_2 Layer", }
  125. },
  126. ViewInfo = OperatorInfo { Pos = { 330, 82.5 } },
  127. },
  128. Text2 = TextPlus {
  129. Inputs = {
  130. GlobalOut = Input { Value = 400, },
  131. Width = Input { Value = 1920, },
  132. Height = Input { Value = 1080, },
  133. UseFrameFormatSettings = Input { Value = 1, },
  134. ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  135. Wrap = Input { Value = 1, },
  136. LayoutRotation = Input { Value = 1, },
  137. TransformRotation = Input { Value = 1, },
  138. Softness1 = Input { Value = 1, },
  139. StyledText = Input {
  140. Value = "A",
  141. Expression = "\"A-\"..TimeStretcher1.SourceTime",
  142. },
  143. Font = Input { Value = "Open Sans", },
  144. Style = Input { Value = "Bold", },
  145. Size = Input { Value = 0.2, },
  146. VerticalJustificationNew = Input { Value = 3, },
  147. HorizontalJustificationNew = Input { Value = 3, }
  148. },
  149. ViewInfo = OperatorInfo { Pos = { 330, 16.5 } },
  150. },
  151. Text2_2 = TextPlus {
  152. Inputs = {
  153. GlobalOut = Input { Value = 400, },
  154. Width = Input { Value = 1920, },
  155. Height = Input { Value = 1080, },
  156. UseFrameFormatSettings = Input { Value = 1, },
  157. ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  158. Wrap = Input { Value = 1, },
  159. LayoutRotation = Input { Value = 1, },
  160. TransformRotation = Input { Value = 1, },
  161. Softness1 = Input { Value = 1, },
  162. StyledText = Input {
  163. Value = "C",
  164. Expression = "\"C-\"..TimeStretcher3.SourceTime",
  165. },
  166. Font = Input { Value = "Open Sans", },
  167. Style = Input { Value = "Bold", },
  168. Size = Input { Value = 0.2, },
  169. VerticalJustificationNew = Input { Value = 3, },
  170. HorizontalJustificationNew = Input { Value = 3, }
  171. },
  172. ViewInfo = OperatorInfo { Pos = { 385, 148.5 } },
  173. },
  174. v = Custom {
  175. NameSet = true,
  176. Inputs = {
  177. NumberIn1 = Input {
  178. Value = 3,
  179. Expression = "Switch1.NumberOfInputs",
  180. },
  181. NumberIn2 = Input { Value = 60, },
  182. NumberIn3 = Input {
  183. Value = 54,
  184. Expression = "time % NumberIn2",
  185. },
  186. NumberIn4 = Input {
  187. Value = 2,
  188. Expression = "floor(time/NumberIn2) % NumberIn1",
  189. },
  190. NumberIn5 = Input { Expression = "NumberIn2*floor(time/(NumberIn1*NumberIn2))", },
  191. NumberIn6 = Input {
  192. Value = 54,
  193. Expression = "NumberIn5+NumberIn3",
  194. },
  195. NumberIn7 = Input {
  196. Value = 60,
  197. Expression = "NumberIn5+NumberIn2",
  198. },
  199. NumberIn8 = Input {
  200. Value = 60,
  201. Expression = ":\nlocal ix=1\nlocal n=v.NumberIn1\nlocal i=v.NumberIn2\nlocal saw=time % i -- n3\nlocal switch=math.floor(time/30) % n -- n4\nlocal phase = i*math.floor(time/(n*i)) -- n5\nlocal val = phase+saw -- n6\nlocal step = phase+i -- n7\nif switch == ix then\n return val\n elseif switch > ix then\n return step\n else\n return phase\nend",
  202. },
  203. LUTIn1 = Input {
  204. SourceOp = "vLUTIn1",
  205. Source = "Value",
  206. },
  207. LUTIn2 = Input {
  208. SourceOp = "vLUTIn2",
  209. Source = "Value",
  210. },
  211. LUTIn3 = Input {
  212. SourceOp = "vLUTIn3",
  213. Source = "Value",
  214. },
  215. LUTIn4 = Input {
  216. SourceOp = "vLUTIn4",
  217. Source = "Value",
  218. },
  219. NumberControls = Input { Value = 1, },
  220. NameforNumber1 = Input { Value = "n1 number", },
  221. NameforNumber2 = Input { Value = "n2 interval", },
  222. ShowNumber3 = Input { Value = 0, },
  223. NameforNumber3 = Input { Value = "n3 saw", },
  224. NameforNumber4 = Input { Value = "n4 switch", },
  225. ShowNumber5 = Input { Value = 0, },
  226. NameforNumber5 = Input { Value = "n5 phase", },
  227. ShowNumber6 = Input { Value = 0, },
  228. NameforNumber6 = Input { Value = "n6 phase+saw", },
  229. ShowNumber7 = Input { Value = 0, },
  230. NameforNumber7 = Input { Value = "n7 phase+1", },
  231. ShowNumber8 = Input { Value = 0, },
  232. PointControls = Input { Value = 1, },
  233. ShowPoint1 = Input { Value = 0, },
  234. ShowPoint2 = Input { Value = 0, },
  235. ShowPoint3 = Input { Value = 0, },
  236. ShowPoint4 = Input { Value = 0, },
  237. LUTControls = Input { Value = 1, },
  238. ShowLUT1 = Input { Value = 0, },
  239. ShowLUT2 = Input { Value = 0, },
  240. ShowLUT3 = Input { Value = 0, },
  241. ShowLUT4 = Input { Value = 0, },
  242. Image1 = Input {
  243. SourceOp = "MultiMerge1",
  244. Source = "Output",
  245. }
  246. },
  247. ViewInfo = OperatorInfo { Pos = { 440, 82.5 } },
  248. },
  249. vLUTIn1 = LUTBezier {
  250. KeyColorSplines = {
  251. [0] = {
  252. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  253. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  254. }
  255. },
  256. SplineColor = { Red = 255, Green = 255, Blue = 0 },
  257. },
  258. vLUTIn2 = LUTBezier {
  259. KeyColorSplines = {
  260. [0] = {
  261. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  262. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  263. }
  264. },
  265. SplineColor = { Red = 255, Green = 0, Blue = 255 },
  266. },
  267. vLUTIn3 = LUTBezier {
  268. KeyColorSplines = {
  269. [0] = {
  270. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  271. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  272. }
  273. },
  274. SplineColor = { Red = 0, Green = 180, Blue = 255 },
  275. },
  276. vLUTIn4 = LUTBezier {
  277. KeyColorSplines = {
  278. [0] = {
  279. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  280. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  281. }
  282. },
  283. SplineColor = { Red = 180, Green = 255, Blue = 0 },
  284. CtrlWZoom = false,
  285. }
  286. }
  287. }
Advertisement
Add Comment
Please, Sign In to add comment