User Tools

Site Tools


macros:example:createdummypalettes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
macros:example:createdummypalettes [2024/08/09 19:44] – [Table] icke_siegenmacros:example:createdummypalettes [2024/08/09 21:25] (current) – external edit 127.0.0.1
Line 5: Line 5:
 ^ by:           | Sebastian Beutel                                                                                                                                                                                                                                                                                                                                                              | ^ by:           | Sebastian Beutel                                                                                                                                                                                                                                                                                                                                                              |
 ^ published:    | August 2023                                                                                                                                                                                                                                                                                                                                                                   | ^ published:    | August 2023                                                                                                                                                                                                                                                                                                                                                                   |
-^ description:  | idea: [[https://discord.com/channels/914233237038071819/914233380449681408/1138598827285282997| Discord, @TEMO]]\\ patch a dummy fixture, create colour palettes, remove dummy fixture\\ This is a really huge macro which documents a lot of programming tchniques, e.g. patchin a fixture, setting values in the programmer, creaating palettes, storing cues and cuelists  |+^ description:  | idea: [[https://discord.com/channels/914233237038071819/914233380449681408/1138598827285282997| 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.                                                                                                                                                                                                                                                                                          | ^ remarks:      | start a new show and fire this macro. It will create global colour palettes for you.                                                                                                                                                                                                                                                                                          |
  
-{{tag>setip start dummy palette patch fixture macro}}+{{tag>setup start dummy palette patch fixture macro}} 
 + 
 +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 ==== ==== functions ====
Line 22: Line 37:
 ==== control structures ==== ==== control structures ====
   * [[macros:control_structures|step condition]]   * [[macros:control_structures|step condition]]
- + 
 + 
 +Full file here: {{ :macros:example:createdummypalettes.xml |}}
 ===== Code ===== ===== Code =====
-<code xml filename.xml>+<code xml [enable_line_numbers="true"] createDummyPalettesShort.xml>
 <?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
-<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd"+<avolites.macros
- <macro name="" id=""> + 
-    <description></description>+  <!-- at first some dummy macros, to check the linking in the cuelists --> 
 + 
 +  <macro id="Wiki.Macros.Dummy.001name="Dummy Macro 001"> 
 +    <description>Dummy Macro 001</description>
     <sequence>     <sequence>
-      <step></step> +    </sequence> 
-     </sequence>+  </macro> 
 +   
 +  <!-- more dummy macros... --> 
 + 
 +  <macro id="Wiki.Macros.Dummy.010" name="Dummy Macro 010"> 
 +    <description>Dummy Macro 010</description> 
 +    <sequence> 
 +    </sequence> 
 +  </macro> 
 + 
 +  <!-- the heavy lifting --> 
 +   
 +  <macro id="Wiki.Macros.Palette.CreateDummy.001" name="Create Dummy Palettes v.001"> 
 + 
 +    <sequence> 
 +     
 +      <!-- patch an RGB fixture --> 
 +     
 +      <step>ActionScript.SetProperty("Patch.CurrentUserNumber", userNumber:999)</step> 
 +      <step>Fixtures.PatchFixturesToVacantHandles("Fixtures", "Expolite", "TourLED 42 CM MKII", "ARC.1, 3 DMX", 1, 3, "")</step> 
 +      <step>Handles.SetSourceHandleFromHandle("fixtureHandleUN=999")</step> 
 +      <step>ActionScript.SetProperty.Enum("Handles.OperationMode", "move")</step> 
 +      <step>Handles.CopyDestination("Fixtures", 99)</step> 
 +      <step>Handles.ClearSelection()</step> 
 +       
 +      <!-- select fixture --> 
 +       
 +      <step pause="0.1">Programmer.Editor.Selection.SelectFixture(handle:"fixtureHandleUN=999")</step> 
 +       
 +      <!-- set some colour values and quick-create palettes --> 
 +       
 +      <step>Programmer.Editor.Fixtures.SetControlValueById(240, 1, 1.0, true, true)</step> 
 +      <step>Programmer.Editor.Fixtures.SetControlValueById(256, 1, 0.6, true, true)</step> 
 +      <step>Programmer.Editor.Fixtures.SetControlValueById(272, 1, 0.2, true, true)</step> 
 +      <step pause="0.1">Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 0), "C", userNumber:101, "", 0)</step> 
 + 
 +        <!-- create some more palettes... --> 
 +       
 +      <step>Programmer.Editor.Fixtures.SetControlValueById(240, 1, 0.3, true, true)</step> 
 +      <step>Programmer.Editor.Fixtures.SetControlValueById(256, 1, 0.6, true, true)</step> 
 +      <step>Programmer.Editor.Fixtures.SetControlValueById(272, 1, 1.0, true, true)</step> 
 +      <step pause="0.1">Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 4), "C", userNumber:105, "", 0)</step> 
 +       
 +      <!-- clear programmer --> 
 +       
 +      <step>Programmer.Editor.ClearAll(false, false)</step> 
 +       
 +      <!-- create abstract palettes --> 
 +   
 +      <step pause="0.1">Programmer.Editor.Selection.SelectFixture(handle:"fixtureHandleUN=999")</step> 
 +      <step pause="0.1">Palette.ApplyPalette("Location=Colours,0,0", false)</step> 
 +      <step pause="0.1">Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 15), "C", userNumber:201, "Foreground", 0)</step> 
 +      <step pause="0.1">Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 16), "C", userNumber:202, "Background", 0)</step> 
 +      <step pause="0.1">Programmer.Editor.ClearAll(false, false)</step> 
 +    
 +      <!-- create Playbacks (11~20, 21~30, 31~40) & Cuelists (101~110) --> 
 +    
 +      <step pause="0.1">Playbacks.StoreCue("PlaybackWindow", 211, true)</step> 
 +      <step>Handles.SetSourceHandle("PlaybackWindow", 211)</step> 
 +      <step>ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:11)</step> 
 +      <step>Handles.SetUserNumber()</step> 
 +      <step>Handles.ClearSelection()</step> 
 +       
 +        <!-- create some more cue playbacks here... --> 
 +    
 +      <step pause="0.1">Playbacks.StoreCue("PlaybackWindow", 240, true)</step> 
 +      <step>Handles.SetSourceHandle("PlaybackWindow", 240)</step<  
 +      <step>ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:40)</step> 
 +      <step>Handles.SetUserNumber()</step> 
 +      <step>Handles.ClearSelection()</step> 
 +    
 +      <!-- Cuelists --> 
 +    
 +      <step pause="0.1">Playbacks.CueList.CreateCueList("PlaybackWindow", 101)</step> 
 +      <step>Handles.SetSourceHandle("PlaybackWindow", 101)</step> 
 +      <step>ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:101)</step> 
 +      <step>Handles.SetUserNumber()</step> 
 +      <step>Handles.ClearSelection()</step> 
 +      <step>Playbacks.Select.EditHandle("cueListHandleUN=101")</step> 
 +      <step>Playbacks.AppendOrInsertPlaybackStep(Playbacks.PlaybackEdit.Handle,1)</step> 
 +      <step>Playbacks.Editor.CueSelection.SelectCueByNumber(Playbacks.PlaybackEdit.Handle, 1)</step> 
 +      <step>Playbacks.Editor.Macros.AddLinkFromId("Wiki.Macros.Dummy.001")</step> 
 +      <step>Playbacks.PlaybackEdit.Exit()</step> 
 +  
 +        <!-- create some more cuelists here... -->   
 +    
 +      <step pause="0.1">Playbacks.CueList.CreateCueList("PlaybackWindow", 110)</step> 
 +      <step>Handles.SetSourceHandle("PlaybackWindow", 110)</step>   
 +      <step>ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:110)</step> 
 +      <step>Handles.SetUserNumber()</step> 
 +      <step>Handles.ClearSelection()</step> 
 +      <step>Playbacks.Select.EditHandle("cueListHandleUN=110")</step> 
 +      <step>Playbacks.AppendOrInsertPlaybackStep(Playbacks.PlaybackEdit.Handle,1)</step> 
 +      <step>Playbacks.Editor.CueSelection.SelectCueByNumber(Playbacks.PlaybackEdit.Handle, 1)</step> 
 +      <step>Playbacks.Editor.Macros.AddLinkFromId("Wiki.Macros.Dummy.010")</step> 
 +      <step>Playbacks.PlaybackEdit.Exit()</step> 
 +    
 +      <!-- unassign dummy fixture --> 
 +       
 +      <step pause="0.2">ActionScript.SetProperty.Boolean("Handles.AllowDeleteFixtures", true)</step> 
 +      <step>Handles.SetSourceHandleFromHandle("fixtureHandleUN=999")</step> 
 +      <step>Handles.ConfirmRelease()</step>  <!-- in order to delete use Handles.ConfirmDelete() --> 
 +      <step>ActionScript.SetProperty.Boolean("Handles.AllowDeleteFixtures", false)</step> 
 + 
 +      <!-- open Colours and Playbacks workspace windows --> 
 +    
 +      <step><menuLink id="Windows.Playbacks" stack="mainWindowStack" behaviour="PushOrRaise" /></step> 
 +      <step><menuLink id="Windows.Colours" stack="mainWindowStack" behaviour="PushOrRaise" /></step> 
 +    
 +    </sequence>
   </macro>   </macro>
 </avolites.macros> </avolites.macros>
macros/example/createdummypalettes.1723232687.txt.gz · Last modified: 2024/08/09 19:44 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki