Rivaldragon

Center images

Nov 18th, 2026
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.43 KB | None | 0 0
  1. {
  2. Tools = ordered() {
  3. Center = MacroOperator {
  4. CtrlWZoom = false,
  5. CustomData = {
  6. Path = {
  7. Map = {
  8. ["Setting:"] = "Macros:\\"
  9. }
  10. },
  11. SxSFilename = "C:\\Users\\Mikael\\AppData\\Roaming\\Blackmagic Design\\DaVinci Resolve\\Support\\Fusion\\Macros\\Center.setting",
  12. },
  13. Inputs = ordered() {
  14. MainInput1 = InstanceInput {
  15. SourceOp = "Transform1_1",
  16. Source = "Input",
  17. },
  18. CustomTool1_OutputWidth = InstanceInput {
  19. SourceOp = "CustomTool1_1",
  20. Source = "OutputWidth",
  21. Page = "Controls",
  22. Name = "Output Width",
  23. Default = 1920,
  24. },
  25. CustomTool1_OutputHeight = InstanceInput {
  26. SourceOp = "CustomTool1_1",
  27. Source = "OutputHeight",
  28. Page = "Controls",
  29. Name = "Output Height",
  30. Default = 1080,
  31. },
  32. Spacer3 = Input {
  33. Type = "Spacer",
  34. Page = "Controls",
  35. },
  36. CustomTool1_PositionHorizontal = InstanceInput {
  37. SourceOp = "CustomTool1_1",
  38. Source = "PositionHorizontal",
  39. Page = "Controls",
  40. Name = "Horizontal",
  41. Default = 1,
  42. },
  43. CustomTool1_PositionVertical = InstanceInput {
  44. SourceOp = "CustomTool1_1",
  45. Source = "PositionVertical",
  46. Page = "Controls",
  47. Name = "Vertical",
  48. Default = 1,
  49. },
  50. Nest1 = Input {
  51. Value = 1,
  52. Type = "BeginNest",
  53. Page = "Controls",
  54. Name = "Margin",
  55. },
  56. AutoDomain1_AdjustLeft = InstanceInput {
  57. SourceOp = "AutoDomain1_1",
  58. Source = "AdjustLeft",
  59. Default = 0,
  60. },
  61. AutoDomain1_AdjustBottom = InstanceInput {
  62. SourceOp = "AutoDomain1_1",
  63. Source = "AdjustBottom",
  64. Default = 0,
  65. },
  66. AutoDomain1_AdjustRight = InstanceInput {
  67. SourceOp = "AutoDomain1_1",
  68. Source = "AdjustRight",
  69. Default = 0,
  70. },
  71. AutoDomain1_AdjustTop = InstanceInput {
  72. SourceOp = "AutoDomain1_1",
  73. Source = "AdjustTop",
  74. Default = 0,
  75. EndNest = 1,
  76. }
  77. },
  78. Outputs = {
  79. MainOutput1 = InstanceOutput {
  80. SourceOp = "Transform3_1",
  81. Source = "Output",
  82. }
  83. },
  84. ViewInfo = GroupInfo { Pos = { 550, 181.5 } },
  85. Tools = ordered() {
  86. Transform1_1 = Transform {
  87. CtrlWShown = false,
  88. Inputs = {
  89. Size = Input { Expression = "math.min(1, CustomTool1_1.OutputWidth / self.Input.OriginalWidth, CustomTool1_1.OutputHeight / self.Input.OriginalHeight)", }
  90. },
  91. ViewInfo = OperatorInfo { Pos = { -220, 74.7576 } },
  92. },
  93. AutoDomain1_1 = AutoDomain {
  94. CtrlWShown = false,
  95. Inputs = {
  96. Input = Input {
  97. SourceOp = "Transform1_1",
  98. Source = "Output",
  99. }
  100. },
  101. ViewInfo = OperatorInfo { Pos = { -110, 74.7576 } },
  102. },
  103. Crop1_1 = Crop {
  104. CtrlWShown = false,
  105. Inputs = {
  106. XOffset = Input {
  107. Value = 169,
  108. Expression = "AutoDomain1_1.Output.DataWindow[1]",
  109. },
  110. YOffset = Input {
  111. Value = 88,
  112. Expression = "AutoDomain1_1.Output.DataWindow[2] ",
  113. },
  114. XSize = Input {
  115. Value = 247,
  116. Expression = "AutoDomain1_1.Output.DataWindow[3] - AutoDomain1_1.Output.DataWindow[1]",
  117. },
  118. YSize = Input {
  119. Value = 70,
  120. Expression = "AutoDomain1_1.Output.DataWindow[4] - AutoDomain1_1.Output.DataWindow[2]",
  121. },
  122. Input = Input {
  123. SourceOp = "AutoDomain1_1",
  124. Source = "Output",
  125. },
  126. ClippingMode = Input { Value = FuID { "None" }, }
  127. },
  128. ViewInfo = OperatorInfo { Pos = { 0, 74.7576 } },
  129. },
  130. CustomTool1_1 = Custom {
  131. CtrlWShown = false,
  132. Inputs = {
  133. NumberIn1 = Input { Expression = "AutoDomain1_1.Output.DataWindow[1] ", },
  134. NumberIn2 = Input { Expression = "AutoDomain1_1.Output.DataWindow[2] ", },
  135. NumberIn3 = Input { Expression = "AutoDomain1_1.Output.DataWindow[3] ", },
  136. NumberIn4 = Input { Expression = "AutoDomain1_1.Output.DataWindow[4] ", },
  137. LUTIn1 = Input {
  138. SourceOp = "CustomTool1LUTIn1_1",
  139. Source = "Value",
  140. },
  141. LUTIn2 = Input {
  142. SourceOp = "CustomTool1LUTIn2_1",
  143. Source = "Value",
  144. },
  145. LUTIn3 = Input {
  146. SourceOp = "CustomTool1LUTIn3_1",
  147. Source = "Value",
  148. },
  149. LUTIn4 = Input {
  150. SourceOp = "CustomTool1LUTIn4_1",
  151. Source = "Value",
  152. },
  153. PositionVertical = Input { Value = 1, },
  154. PositionHorizontal = Input { Value = 1, }
  155. },
  156. ViewInfo = OperatorInfo { Pos = { 0, 8.75757 } },
  157. UserControls = ordered() { OutputWidth = { INP_MaxAllowed = 1000000, INP_Integer = true, INPID_InputControl = "ScrewControl", INP_MaxScale = 10000, INP_Default = 1920, INP_MinScale = 0, INP_MinAllowed = -1000000, LINKID_DataType = "Number", ICS_ControlPage = "Controls", INP_SplineType = "Default", LINKS_Name = "OutputWidth" }, OutputHeight = { INP_MaxAllowed = 1000000, INP_Integer = true, INPID_InputControl = "ScrewControl", INP_MaxScale = 1, INP_Default = 1080, INP_MinScale = 0, INP_MinAllowed = -1000000, LINKID_DataType = "Number", ICS_ControlPage = "Controls", INP_SplineType = "Default", LINKS_Name = "OutputHeight" }, PositionVertical = {
  158. { MBTNC_AddButton = "Top" },
  159. { MBTNC_AddButton = "Middle" },
  160. { MBTNC_AddButton = "Bottom" },
  161. INP_MaxAllowed = 1000000,
  162. INP_Integer = false,
  163. INPID_InputControl = "MultiButtonControl",
  164. MBTNC_ShowBasicButton = true,
  165. INP_MaxScale = 1,
  166. ICS_ControlPage = "Controls",
  167. INP_SplineType = "Default",
  168. INP_MinScale = 0,
  169. INP_MinAllowed = -1000000,
  170. LINKID_DataType = "Number",
  171. MBTNC_ShowName = false,
  172. MBTNC_StretchToFit = false,
  173. MBTNC_ShowToolTip = false,
  174. LINKS_Name = "PositionVertical"
  175. }, PositionHorizontal = {
  176. { MBTNC_AddButton = "Left" },
  177. { MBTNC_AddButton = "Middle" },
  178. { MBTNC_AddButton = "Right" },
  179. INP_MaxAllowed = 1000000,
  180. INP_Integer = false,
  181. INPID_InputControl = "MultiButtonControl",
  182. MBTNC_ShowBasicButton = true,
  183. INP_MaxScale = 1,
  184. ICS_ControlPage = "Controls",
  185. INP_SplineType = "Default",
  186. INP_MinScale = 0,
  187. INP_MinAllowed = -1000000,
  188. LINKID_DataType = "Number",
  189. MBTNC_ShowName = false,
  190. MBTNC_StretchToFit = false,
  191. MBTNC_ShowToolTip = false,
  192. LINKS_Name = "PositionHorizontal"
  193. } }
  194. },
  195. CustomTool1LUTIn1_1 = LUTBezier {
  196. KeyColorSplines = {
  197. [0] = {
  198. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  199. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  200. }
  201. },
  202. SplineColor = { Red = 0, Green = 0, Blue = 0 },
  203. CtrlWZoom = false,
  204. },
  205. CustomTool1LUTIn2_1 = LUTBezier {
  206. KeyColorSplines = {
  207. [0] = {
  208. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  209. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  210. }
  211. },
  212. SplineColor = { Red = 0, Green = 0, Blue = 0 },
  213. CtrlWZoom = false,
  214. },
  215. CustomTool1LUTIn3_1 = LUTBezier {
  216. KeyColorSplines = {
  217. [0] = {
  218. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  219. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  220. }
  221. },
  222. SplineColor = { Red = 0, Green = 0, Blue = 0 },
  223. CtrlWZoom = false,
  224. },
  225. CustomTool1LUTIn4_1 = LUTBezier {
  226. KeyColorSplines = {
  227. [0] = {
  228. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  229. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  230. }
  231. },
  232. SplineColor = { Red = 0, Green = 0, Blue = 0 },
  233. CtrlWZoom = false,
  234. },
  235. Crop2_1 = Crop {
  236. CtrlWShown = false,
  237. Inputs = {
  238. XOffset = Input { Value = -836, },
  239. YOffset = Input { Value = -505, },
  240. XSize = Input {
  241. Value = 1920,
  242. Expression = "CustomTool1_1.OutputWidth",
  243. },
  244. YSize = Input {
  245. Value = 1080,
  246. Expression = "CustomTool1_1.OutputHeight",
  247. },
  248. KeepCentered = Input { Value = 1, },
  249. Input = Input {
  250. SourceOp = "Crop1_1",
  251. Source = "Output",
  252. }
  253. },
  254. ViewInfo = OperatorInfo { Pos = { 110, 74.7576 } },
  255. },
  256. Transform3_1 = Transform {
  257. CtrlWZoom = false,
  258. CtrlWShown = false,
  259. Inputs = {
  260. Center = Input { Expression = ":\n\nimage = Crop2_1.Output;\nimageWidth = (Crop2_1.Output.DataWindow[3]-Crop2_1.Output.DataWindow[1])/Crop2_1.Output.Width;\nimageHeight = (Crop2_1.Output.DataWindow[4]-Crop2_1.Output.DataWindow[2])/Crop2_1.Output.Height;\nleft = image.DataWindow[1] / image.Width;\nright = image.DataWindow[3] / image.Width;\ntop = image.DataWindow[2] / image.Height;\nbottom = image.DataWindow[4] / image.Height;\n\nx = 0.5;\ny = 0.5;\n\nif CustomTool1_1.PositionHorizontal == 0 then\n x = 0.5 - left;\nend\n\nif CustomTool1_1.PositionHorizontal == 2 then\n x = 0.5 + right - imageWidth;\nend\n\nif CustomTool1_1.PositionVertical == 2 then\n y = 0.5 - top;\nend\n\nif CustomTool1_1.PositionVertical == 0 then\n y = 0.5 + bottom - imageHeight;\nend\n\nreturn Point(x, y);", },
  261. Input = Input {
  262. SourceOp = "Crop2_1",
  263. Source = "Output",
  264. }
  265. },
  266. ViewInfo = OperatorInfo { Pos = { 220, 74.7576 } },
  267. }
  268. },
  269. }
  270. },
  271. ActiveTool = "Center"
  272. }
Advertisement
Add Comment
Please, Sign In to add comment