Example ====== Create Dummy Palettes ====== ^ by: | Sebastian Beutel | ^ 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 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. | {{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 ==== * [[:macros:function:someusedfunction]] * [[:macros:function:anotherusedfunction]] * [[:macros:function:someusedfunction]] * [[:macros:function:anotherusedfunction]] ==== affected properties ==== * [[:macros:property:someproperty]] * [[:macros:property:anotherusedproperty]] ==== control structures ==== * [[macros:control_structures|step condition]] Full file here: {{ :macros:example:createdummypalettes.xml |}} ===== Code ===== Dummy Macro 001 Dummy Macro 010 ActionScript.SetProperty("Patch.CurrentUserNumber", userNumber:999) Fixtures.PatchFixturesToVacantHandles("Fixtures", "Expolite", "TourLED 42 CM MKII", "ARC.1, 3 DMX", 1, 3, "") Handles.SetSourceHandleFromHandle("fixtureHandleUN=999") ActionScript.SetProperty.Enum("Handles.OperationMode", "move") Handles.CopyDestination("Fixtures", 99) Handles.ClearSelection() Programmer.Editor.Selection.SelectFixture(handle:"fixtureHandleUN=999") Programmer.Editor.Fixtures.SetControlValueById(240, 1, 1.0, true, true) Programmer.Editor.Fixtures.SetControlValueById(256, 1, 0.6, true, true) Programmer.Editor.Fixtures.SetControlValueById(272, 1, 0.2, true, true) Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 0), "C", userNumber:101, "", 0) Programmer.Editor.Fixtures.SetControlValueById(240, 1, 0.3, true, true) Programmer.Editor.Fixtures.SetControlValueById(256, 1, 0.6, true, true) Programmer.Editor.Fixtures.SetControlValueById(272, 1, 1.0, true, true) Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 4), "C", userNumber:105, "", 0) Programmer.Editor.ClearAll(false, false) Programmer.Editor.Selection.SelectFixture(handle:"fixtureHandleUN=999") Palette.ApplyPalette("Location=Colours,0,0", false) Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 15), "C", userNumber:201, "Foreground", 0) Palette.QuickCreatePalette(Handles.CreateHandleReference("Colours", 0, 16), "C", userNumber:202, "Background", 0) Programmer.Editor.ClearAll(false, false) Playbacks.StoreCue("PlaybackWindow", 211, true) Handles.SetSourceHandle("PlaybackWindow", 211) ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:11) Handles.SetUserNumber() Handles.ClearSelection() Playbacks.StoreCue("PlaybackWindow", 240, true) Handles.SetSourceHandle("PlaybackWindow", 240)ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:40) Handles.SetUserNumber() Handles.ClearSelection() Playbacks.CueList.CreateCueList("PlaybackWindow", 101) Handles.SetSourceHandle("PlaybackWindow", 101) ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:101) Handles.SetUserNumber() Handles.ClearSelection() Playbacks.Select.EditHandle("cueListHandleUN=101") Playbacks.AppendOrInsertPlaybackStep(Playbacks.PlaybackEdit.Handle,1) Playbacks.Editor.CueSelection.SelectCueByNumber(Playbacks.PlaybackEdit.Handle, 1) Playbacks.Editor.Macros.AddLinkFromId("Wiki.Macros.Dummy.001") Playbacks.PlaybackEdit.Exit() Playbacks.CueList.CreateCueList("PlaybackWindow", 110) Handles.SetSourceHandle("PlaybackWindow", 110) ActionScript.SetProperty("Handles.CurrentUserNumber", userNumber:110) Handles.SetUserNumber() Handles.ClearSelection() Playbacks.Select.EditHandle("cueListHandleUN=110") Playbacks.AppendOrInsertPlaybackStep(Playbacks.PlaybackEdit.Handle,1) Playbacks.Editor.CueSelection.SelectCueByNumber(Playbacks.PlaybackEdit.Handle, 1) Playbacks.Editor.Macros.AddLinkFromId("Wiki.Macros.Dummy.010") Playbacks.PlaybackEdit.Exit() ActionScript.SetProperty.Boolean("Handles.AllowDeleteFixtures", true) Handles.SetSourceHandleFromHandle("fixtureHandleUN=999") Handles.ConfirmRelease() ActionScript.SetProperty.Boolean("Handles.AllowDeleteFixtures", false) ===== Explanation ===== This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]] tbd ===== How to use it ===== - [[:macros:deploying|make this macro available]] tbd ~~DISCUSSION~~