User Tools

Site Tools


macros:example:createdummypalettes

Example

Create Dummy Palettes

by: Sebastian Beutel
published: August 2023
description: idea: Discord, @TEMO
patch a dummy fixture, create colour palettes, remove dummy fixture
This is a really huge macro which documents a lot of programming techniques, e.g. patching a fixture, setting values in the programmer, creating palettes, storing cues and cuelists
remarks: start a new show and fire this macro. It will create global colour palettes for you.

This was the plan:

What needs to be done :
- Unpack Macro needs to create the Dummy palettes 1 through 10, 11 through 20
- Unpack Macro needs to create the Bump Palletes 101 & 102
- Unpack Macro needs to create Playbacks( 11 thro 20, 21 thro 30, 31 thro 40 & Cuelists ( 101 thro 110 ) for the Macros
- Unpack Macro needs to Link Macros to Cues in Playlist

- Unpack Macro needs to record the Playback Groups for the Bump Selection
- Unpack Macro needs to create a Layout View and move the Selection Cue Lists to the Colour picker
- Layout at position X & Y
- Unpack Macro needs to add the Colour Selection Button Macros to the layout view

The macro shown here does the first half of the tasks.

functions

affected properties

control structures

Code

createDummyPalettesShort.xml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <avolites.macros>
  3.  
  4. <!-- at first some dummy macros, to check the linking in the cuelists -->
  5.  
  6. <macro id="Wiki.Macros.Dummy.001" name="Dummy Macro 001">
  7. <description>Dummy Macro 001</description>
  8. <sequence>
  9. </sequence>
  10. </macro>
  11.  
  12. <!-- more dummy macros... -->
  13.  
  14. <macro id="Wiki.Macros.Dummy.010" name="Dummy Macro 010">
  15. <description>Dummy Macro 010</description>
  16. <sequence>
  17. </sequence>
  18. </macro>
  19.  
  20. <!-- the heavy lifting -->
  21.  
  22. <macro id="Wiki.Macros.Palette.CreateDummy.001" name="Create Dummy Palettes v.001">
  23.  
  24. <sequence>
  25.  
  26. <!-- patch an RGB fixture -->
  27.  
  28. <step>ActionScript.SetProperty("Patch.CurrentUserNumber", userNumber:999)</step>
  29. <step>Fixtures.PatchFixturesToVacantHandles("Fixtures", "Expolite", "TourLED 42 CM MKII", "ARC.1, 3 DMX", 1, 3, "")</step>
  30. <step>Handles.SetSourceHandleFromHandle("fixtureHandleUN=999")</step>
  31. <step>ActionScript.SetProperty.Enum("Handles.OperationMode", "move")</step>
  32. <step>Handles.CopyDestination("Fixtures", 99)</step>
  33. <step>Handles.ClearSelection()</step>
  34.  
  35. <!-- select fixture -->
  36.  
  37. <step pause="0.1">Programmer.Editor.Selection.SelectFixture(handle:"fixtureHandleUN=999")</step>
  38.  
  39. <!-- set some colour values and quick-create palettes -->
  40.  
  41. <step>Programmer.Editor.Fixtures.SetControlValueById(240, 1, 1.0, true, true)</step>
  42. <step>Programmer.Editor.Fixtures.SetControlValueById(256, 1, 0.6, true, true)</step>
  43. <step>Programmer.Editor.Fixtures.SetControlValueById(272, 1, 0.2, true, true)</step>
  44. <step pause="0.1">Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 0), "C", userNumber:101, "", 0)</step>
  45.  
  46. <!-- create some more palettes... -->
  47.  
  48. <step>Programmer.Editor.Fixtures.SetControlValueById(240, 1, 0.3, true, true)</step>
  49. <step>Programmer.Editor.Fixtures.SetControlValueById(256, 1, 0.6, true, true)</step>
  50. <step>Programmer.Editor.Fixtures.SetControlValueById(272, 1, 1.0, true, true)</step>
  51. <step pause="0.1">Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 4), "C", userNumber:105, "", 0)</step>
  52.  
  53. <!-- clear programmer -->
  54.  
  55. <step>Programmer.Editor.ClearAll(false, false)</step>
  56.  
  57. <!-- create abstract palettes -->
  58.  
  59. <step pause="0.1">Programmer.Editor.Selection.SelectFixture(handle:"fixtureHandleUN=999")</step>
  60. <step pause="0.1">Palette.ApplyPalette("Location=Colours,0,0", false)</step>
  61. <step pause="0.1">Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 15), "C", userNumber:201, "Foreground", 0)</step>
  62. <step pause="0.1">Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 16), "C", userNumber:202, "Background", 0)</step>
  63. <step pause="0.1">Programmer.Editor.ClearAll(false, false)</step>
  64.  
  65. <!-- create Playbacks (11~20, 21~30, 31~40) & Cuelists (101~110) -->
  66.  
  67. <step pause="0.1">Playbacks.StoreCue("PlaybackWindow", 211, true)</step>
  68. <step>Handles.SetSourceHandle("PlaybackWindow", 211)</step>
  69. <step>ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:11)</step>
  70. <step>Handles.SetUserNumber()</step>
  71. <step>Handles.ClearSelection()</step>
  72.  
  73. <!-- create some more cue playbacks here... -->
  74.  
  75. <step pause="0.1">Playbacks.StoreCue("PlaybackWindow", 240, true)</step>
  76. <step>Handles.SetSourceHandle("PlaybackWindow", 240)</step<
  77. <step>ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:40)</step>
  78. <step>Handles.SetUserNumber()</step>
  79. <step>Handles.ClearSelection()</step>
  80.  
  81. <!-- Cuelists -->
  82.  
  83. <step pause="0.1">Playbacks.CueList.CreateCueList("PlaybackWindow", 101)</step>
  84. <step>Handles.SetSourceHandle("PlaybackWindow", 101)</step>
  85. <step>ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:101)</step>
  86. <step>Handles.SetUserNumber()</step>
  87. <step>Handles.ClearSelection()</step>
  88. <step>Playbacks.Select.EditHandle("cueListHandleUN=101")</step>
  89. <step>Playbacks.AppendOrInsertPlaybackStep(Playbacks.PlaybackEdit.Handle,1)</step>
  90. <step>Playbacks.Editor.CueSelection.SelectCueByNumber(Playbacks.PlaybackEdit.Handle, 1)</step>
  91. <step>Playbacks.Editor.Macros.AddLinkFromId("Wiki.Macros.Dummy.001")</step>
  92. <step>Playbacks.PlaybackEdit.Exit()</step>
  93.  
  94. <!-- create some more cuelists here... -->
  95.  
  96. <step pause="0.1">Playbacks.CueList.CreateCueList("PlaybackWindow", 110)</step>
  97. <step>Handles.SetSourceHandle("PlaybackWindow", 110)</step>
  98. <step>ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:110)</step>
  99. <step>Handles.SetUserNumber()</step>
  100. <step>Handles.ClearSelection()</step>
  101. <step>Playbacks.Select.EditHandle("cueListHandleUN=110")</step>
  102. <step>Playbacks.AppendOrInsertPlaybackStep(Playbacks.PlaybackEdit.Handle,1)</step>
  103. <step>Playbacks.Editor.CueSelection.SelectCueByNumber(Playbacks.PlaybackEdit.Handle, 1)</step>
  104. <step>Playbacks.Editor.Macros.AddLinkFromId("Wiki.Macros.Dummy.010")</step>
  105. <step>Playbacks.PlaybackEdit.Exit()</step>
  106.  
  107. <!-- unassign dummy fixture -->
  108.  
  109. <step pause="0.2">ActionScript.SetProperty.Boolean("Handles.AllowDeleteFixtures", true)</step>
  110. <step>Handles.SetSourceHandleFromHandle("fixtureHandleUN=999")</step>
  111. <step>Handles.ConfirmRelease()</step> <!-- in order to delete use Handles.ConfirmDelete() -->
  112. <step>ActionScript.SetProperty.Boolean("Handles.AllowDeleteFixtures", false)</step>
  113.  
  114. <!-- open Colours and Playbacks workspace windows -->
  115.  
  116. <step><menuLink id="Windows.Playbacks" stack="mainWindowStack" behaviour="PushOrRaise" /></step>
  117. <step><menuLink id="Windows.Colours" stack="mainWindowStack" behaviour="PushOrRaise" /></step>
  118.  
  119. </sequence>
  120. </macro>
  121. </avolites.macros>

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax

tbd

How to use it

You could leave a comment if you were logged in.
macros/example/createdummypalettes.txt · Last modified: 2024/08/09 21:25 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki