Recent Posts

Expression Builder Plugin V2.0

Overview Installation UI Overview Expression Builder Open / Load Save Copy Search Page Keywords Copy Glossary Categories Copy to Clipboard Hints Links Expression Builder is for Davinci Resolve Studio version 18. Expression Builder lite will be available soon for Davinci Resolve. Overview Expression Builder assists those learning Fusion Expressions and contains hundreds of examples, however, expressions can be almost limitless and we are adding more every day. New expressions will be available through or update schedule, which is why it is important to include your correct email address. The plugin is capable of saving and loading your own custom expressions for modification or reuse. Expressions can be saved as a .txt .setting or .comp file but must be given a name and extension prior to 'save'. If you wish to contribute your expressions to be included in a future update then you can do so here. Submit an Expression Download and Installation Extract the Expression Builder zip f

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

Expression Builder Plugin V2.0

Organising The Fonts Folder