Rivaldragon

Center Images nodes

Nov 18th, 2026
1
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. {
  2. Tools = ordered() {
  3. CustomTool1 = Custom {
  4. Inputs = {
  5. NumberIn1 = Input { Expression = "AutoDomain1.Output.DataWindow[1] ", },
  6. NumberIn2 = Input { Expression = "AutoDomain1.Output.DataWindow[2] ", },
  7. NumberIn3 = Input { Expression = "AutoDomain1.Output.DataWindow[3] ", },
  8. NumberIn4 = Input { Expression = "AutoDomain1.Output.DataWindow[4] ", },
  9. LUTIn1 = Input {
  10. SourceOp = "CustomTool1LUTIn1",
  11. Source = "Value",
  12. },
  13. LUTIn2 = Input {
  14. SourceOp = "CustomTool1LUTIn2",
  15. Source = "Value",
  16. },
  17. LUTIn3 = Input {
  18. SourceOp = "CustomTool1LUTIn3",
  19. Source = "Value",
  20. },
  21. LUTIn4 = Input {
  22. SourceOp = "CustomTool1LUTIn4",
  23. Source = "Value",
  24. },
  25. PositionVertical = Input { Value = 1, },
  26. PositionHorizontal = Input { Value = 1, }
  27. },
  28. ViewInfo = OperatorInfo { Pos = { 605, -148.5 } },
  29. 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", 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", INP_SplineType = "Default", LINKS_Name = "OutputHeight", }, PositionVertical = {
  30. { MBTNC_AddButton = "Top" },
  31. { MBTNC_AddButton = "Middle" },
  32. { MBTNC_AddButton = "Bottom" },
  33. INP_MaxAllowed = 1000000,
  34. INP_Integer = false,
  35. INPID_InputControl = "MultiButtonControl",
  36. MBTNC_ShowBasicButton = true,
  37. INP_MaxScale = 1,
  38. INP_SplineType = "Default",
  39. INP_MinScale = 0,
  40. INP_MinAllowed = -1000000,
  41. LINKID_DataType = "Number",
  42. MBTNC_ShowName = false,
  43. MBTNC_StretchToFit = false,
  44. MBTNC_ShowToolTip = false,
  45. LINKS_Name = "PositionVertical",
  46. }, PositionHorizontal = {
  47. { MBTNC_AddButton = "Left" },
  48. { MBTNC_AddButton = "Middle" },
  49. { MBTNC_AddButton = "Right" },
  50. INP_MaxAllowed = 1000000,
  51. INP_Integer = false,
  52. INPID_InputControl = "MultiButtonControl",
  53. MBTNC_ShowBasicButton = true,
  54. INP_MaxScale = 1,
  55. INP_SplineType = "Default",
  56. INP_MinScale = 0,
  57. INP_MinAllowed = -1000000,
  58. LINKID_DataType = "Number",
  59. MBTNC_ShowName = false,
  60. MBTNC_StretchToFit = false,
  61. MBTNC_ShowToolTip = false,
  62. LINKS_Name = "PositionHorizontal",
  63. } }
  64. },
  65. CustomTool1LUTIn1 = LUTBezier {
  66. KeyColorSplines = {
  67. [0] = {
  68. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  69. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  70. }
  71. },
  72. SplineColor = { Red = 0, Green = 0, Blue = 0 },
  73. },
  74. CustomTool1LUTIn2 = LUTBezier {
  75. KeyColorSplines = {
  76. [0] = {
  77. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  78. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  79. }
  80. },
  81. SplineColor = { Red = 0, Green = 0, Blue = 0 },
  82. },
  83. CustomTool1LUTIn3 = LUTBezier {
  84. KeyColorSplines = {
  85. [0] = {
  86. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  87. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  88. }
  89. },
  90. SplineColor = { Red = 0, Green = 0, Blue = 0 },
  91. },
  92. CustomTool1LUTIn4 = LUTBezier {
  93. KeyColorSplines = {
  94. [0] = {
  95. [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
  96. [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
  97. }
  98. },
  99. SplineColor = { Red = 0, Green = 0, Blue = 0 },
  100. CtrlWZoom = false,
  101. },
  102. Crop2 = Crop {
  103. Inputs = {
  104. XOffset = Input { Value = -572, },
  105. YOffset = Input { Value = -83, },
  106. XSize = Input {
  107. Value = 1920,
  108. Expression = "CustomTool1.OutputWidth",
  109. },
  110. YSize = Input {
  111. Value = 1080,
  112. Expression = "CustomTool1.OutputHeight",
  113. },
  114. KeepCentered = Input { Value = 1, },
  115. Input = Input {
  116. SourceOp = "Crop1",
  117. Source = "Output",
  118. }
  119. },
  120. ViewInfo = OperatorInfo { Pos = { 660, -82.5 } },
  121. },
  122. Crop1 = Crop {
  123. CtrlWZoom = false,
  124. Inputs = {
  125. XOffset = Input {
  126. Value = 521,
  127. Expression = "AutoDomain1.Output.DataWindow[1]",
  128. },
  129. YOffset = Input {
  130. Value = 821,
  131. Expression = "AutoDomain1.Output.DataWindow[2] ",
  132. },
  133. XSize = Input {
  134. Value = 776,
  135. Expression = "AutoDomain1.Output.DataWindow[3] - AutoDomain1.Output.DataWindow[1]",
  136. },
  137. YSize = Input {
  138. Value = 914,
  139. Expression = "AutoDomain1.Output.DataWindow[4] - AutoDomain1.Output.DataWindow[2]",
  140. },
  141. Input = Input {
  142. SourceOp = "AutoDomain1",
  143. Source = "Output",
  144. },
  145. ClippingMode = Input { Value = FuID { "None" }, }
  146. },
  147. ViewInfo = OperatorInfo { Pos = { 550, -82.5 } },
  148. },
  149. AutoDomain1 = AutoDomain {
  150. Inputs = {
  151. Input = Input {
  152. SourceOp = "Transform1",
  153. Source = "Output",
  154. }
  155. },
  156. ViewInfo = OperatorInfo { Pos = { 440, -82.5 } },
  157. },
  158. Transform1 = Transform {
  159. Inputs = {
  160. Size = Input { Expression = "math.min(1, CustomTool1.OutputWidth / self.Input.OriginalWidth, CustomTool1.OutputHeight / self.Input.OriginalHeight)", }
  161. },
  162. ViewInfo = OperatorInfo { Pos = { 330, -82.5 } },
  163. },
  164. Transform3 = Transform {
  165. Inputs = {
  166. Center = Input { Expression = ":\n\nimage = Crop2.Output;\nimageWidth = (Crop2.Output.DataWindow[3]-Crop2.Output.DataWindow[1])/Crop2.Output.Width;\nimageHeight = (Crop2.Output.DataWindow[4]-Crop2.Output.DataWindow[2])/Crop2.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.PositionHorizontal == 0 then\n x = 0.5 - left;\nend\n\nif CustomTool1.PositionHorizontal == 2 then\n x = 0.5 + right - imageWidth;\nend\n\nif CustomTool1.PositionVertical == 2 then\n y = 0.5 - top;\nend\n\nif CustomTool1.PositionVertical == 0 then\n y = 0.5 + bottom - imageHeight;\nend\n\nreturn Point(x, y);", },
  167. Input = Input {
  168. SourceOp = "Crop2",
  169. Source = "Output",
  170. }
  171. },
  172. ViewInfo = OperatorInfo { Pos = { 770, -82.5 } },
  173. }
  174. }
  175. }
Advertisement
Add Comment
Please, Sign In to add comment