Recent Posts

Tame Your Video Chaos: Master Smart Bins in Davinci Resolve

  Tame Your Video Chaos: Master Smart Bins in Davinci Resolve Are you drowning in a sea of clips? Is your media pool looking more like a cluttered closet than an organized workspace? Fear not, young video editor! There's a superhero tool waiting to save your sanity: Smart Bins. Imagine a magical sorting hat for your video clips. That's essentially what Smart Bins are in Davinci Resolve. These nifty little features automatically filter your footage, making it a breeze to find exactly what you need. Let's dive in and discover how to harness their power. What are Smart Bins? Think of Smart Bins as automated file folders for your videos and audio. They sort your media based on specific criteria, like whether a clip has been used, its audio type (dialogue, music, effects), or even its frame rate. This means less time hunting through endless thumbnails and more time unleashing your creativity. Getting Started with Smart Bins First things first, make sure Smart Bi...

Renaming Controls in the Inspector Using Code

Why would you want to rename controls in the inspector?

  • Aid in identifying the function of a control.
  • Assist an end-user in identifying an appropriate control.
  • Because we can.

This can be done without leaving resolve when building a Macro. You can change the names next to the controls you select in the Marco Editor. In Fusion, you can use "Edit Controls" to find the control you want to change the name in the ID: drop-down list. The problem with "Edit Controls" is the control will move to the bottom of the inspector on the page you selected. 

Coding is easy and does not require resaving and renaming a macro/effect. You just save the code in the original macro/effect.

To change the name of a control is as simple as adding the following to the "InstanceInput"

Name = "New Name",

The original name is usually set inside the node, however, we can just overwrite it in the instance. In this example, I am going to change "Color" to "Font Color". You will notice that the instance for the font color already has Name = "Color" available so I can just add the word "Font". 

  1. Input4 = InstanceInput {
  2. SourceOp = "Text1",
  3. Source = "Red1Clone",
  4. Name = "Font Color",
  5. ControlGroup = 3,
  6. Default = 1,
  7. },
If the instance does not contain Name = " " then you can just add it to the list.
  1.               Input8 = InstanceInput {
  2. SourceOp = "Text1",
  3. Source = "Size",
  4. Default = 0.16,
  5.                                         Name = "Font Size",
  6. },
That's it!

You can add/change a name to most of the controls in the inspector, there a few exceptions. One exception is the font style (font-weight) as the name "Font" is applicable to both controls.

The whole code of our simple title

All the green text is what you see in the inspector, these are the controls we checked in the "macro editor"
The text in Fuschia is the label we added, directly to the code.
The red text is the output, in fusion this would connect to the MediaOut. In the cut & edit page resolve handles this for you.
The yellow text is the code that makes up the node.
The aqua text is the label added using "edit controls" we can seriously customise this section.
--This is a comment
  1. {
  2. Tools = ordered() {
  3. DropDown = MacroOperator { 
  4. Inputs = ordered() {
  5. -- label instance
  6. Label01 = InstanceInput {
  7. SourceOp = "Text1",
  8. Source = "Label01",
  9. },
  10. -- end of label instance
  11. Input1 = InstanceInput {
  12. SourceOp = "Text1",
  13. Source = "StyledText",
  14. },
  15. Input2 = InstanceInput {
  16. SourceOp = "Text1",
  17. Source = "Font",
  18. ControlGroup = 2,
  19. },
  20. Input3 = InstanceInput {
  21. SourceOp = "Text1",
  22. Source = "Style",
  23. ControlGroup = 2,
  24. },
  25. Input4 = InstanceInput {
  26. SourceOp = "Text1",
  27. Source = "Red1Clone",
  28. Name = "Font Color",
  29. ControlGroup = 3,
  30. Default = 1,
  31. },
  32. Input5 = InstanceInput {
  33. SourceOp = "Text1",
  34. Source = "Green1Clone",
  35. ControlGroup = 3,
  36. Default = 1,
  37. },
  38. Input6 = InstanceInput {
  39. SourceOp = "Text1",
  40. Source = "Blue1Clone",
  41. ControlGroup = 3,
  42. Default = 1,
  43. },
  44. Input7 = InstanceInput {
  45. SourceOp = "Text1",
  46. Source = "Alpha1Clone",
  47. ControlGroup = 3,
  48. Default = 1,
  49. },
  50. Input8 = InstanceInput {
  51. SourceOp = "Text1",
  52. Source = "Size",
  53. Default = 0.16,
  54.                                         Name = "Font Size",
  55. },
  56. Input9 = InstanceInput {
  57. SourceOp = "Text1",
  58. Source = "CharacterSpacingClone",
  59. Name = "Tracking",
  60. Default = 1,
  61. },
  62. -- label instance
  63. Label02 = InstanceInput {
  64. SourceOp = "Background1",
  65. Source = "Label02",
  66. },
  67. -- end of label instance
  68. Input10 = InstanceInput {
  69. SourceOp = "Background1",
  70. Source = "Type",
  71. },
  72. Input11 = InstanceInput {
  73. SourceOp = "Background1",
  74. Source = "TopLeftRed",
  75. Name = "Color",
  76. ControlGroup = 7,
  77. Default = 0,
  78. },
  79. Input12 = InstanceInput {
  80. SourceOp = "Background1",
  81. Source = "TopLeftGreen",
  82. ControlGroup = 7,
  83. Default = 0,
  84. },
  85. Input13 = InstanceInput {
  86. SourceOp = "Background1",
  87. Source = "TopLeftBlue",
  88. ControlGroup = 7,
  89. Default = 0,
  90. },
  91. },
  92. Outputs = {
  93. MainOutput1 = InstanceOutput {
  94. SourceOp = "Merge1",
  95. Source = "Output",
  96. }
  97. },
  98. ViewInfo = GroupInfo { Pos = { 0, 0 } },
  99. Tools = ordered() {
  100. Text1 = TextPlus {
  101. CtrlWZoom = false,
  102. Inputs = {
  103. Width = Input { Value = 1920, },
  104. Height = Input { Value = 1080, },
  105. UseFrameFormatSettings = Input { Value = 1, },
  106. ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  107. StyledText = Input { Value = "DROPDOWN", },
  108. Font = Input { Value = "Open Sans", },
  109. Style = Input { Value = "Bold", },
  110. Size = Input { Value = 0.16, },
  111. VerticalJustificationNew = Input { Value = 3, },
  112. HorizontalJustificationNew = Input { Value = 3, },
  113. ManualFontKerningPlacement = Input {
  114. Value = StyledText {
  115. Array = {
  116. },
  117. Value = ""
  118. },
  119. },
  120. },
  121. ViewInfo = OperatorInfo { Pos = { 990, -16.5 } },
  122. UserControls = ordered() {
  123. Label01 = {
  124. LINKS_Name = "Label01",
  125. LINKID_DataType = "Number",
  126. INPID_InputControl = "LabelControl",
  127. INP_Integer = false,
  128. LBLC_DropDownButton = true,
  129. LBLC_NumInputs = 9,
  130. INP_External = false,
  131. INP_Passive = true,
  132. }
  133. }
  134. },
  135. Background1 = Background {
  136. Inputs = {
  137. Width = Input { Value = 1920, },
  138. Height = Input { Value = 1080, },
  139. UseFrameFormatSettings = Input { Value = 1, },
  140. ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  141. TopLeftAlpha = Input { Value = 0, },
  142. },
  143. ViewInfo = OperatorInfo { Pos = { 880, 49.5 } },
  144. UserControls = ordered() {
  145. Label02 = {
  146. LINKS_Name = "Label02",
  147. LINKID_DataType = "Number",
  148. INPID_InputControl = "LabelControl",
  149. INP_Integer = false,
  150. LBLC_DropDownButton = true,
  151. LBLC_NumInputs = 4,
  152. INP_External = false,
  153. INP_Passive = true,
  154. }
  155. }
  156. },
  157. Merge1 = Merge {
  158. Inputs = {
  159. Background = Input {
  160. SourceOp = "Background1",
  161. Source = "Output",
  162. },
  163. Foreground = Input {
  164. SourceOp = "Text1",
  165. Source = "Output",
  166. },
  167. PerformDepthMerge = Input { Value = 0, },
  168. },
  169. ViewInfo = OperatorInfo { Pos = { 990, 49.5 } },
  170. }
  171. },
  172. }
  173. },
  174. ActiveTool = "DropDown"
  175. }

  176. Thanks for taking the time to read this post and if you would like to buy me a coffee, pizza, narrowboat then it is greatly appreciated.

Comments

Popular posts from this blog

DaVinci Resolve Expressions

Things You Didn't Know the Text+ or Text1 Could Do!

Expression Builder Plugin V2.0