Example
====== Set Playback's Shape Spread ======
^ by: | Florian Engelmohr |
^ published: | January 2019 |
^ description: | change some playback's shape spread |
^ remarks: |  |
{{tag>playback shape spread include blind}}
**This is work in progress and may need some improvements.**
See http://forum.avolites.com/viewtopic.php?f=20&t=6068&p=21840 for the problem and the current solution.
==== functions ====
  * [[:macros:function:ActionScript.SetProperty.Boolean]]
  * [[:macros:function:Programmer.SetBlindMode]]
  * [[:macros:function:Include.SelectPlaybackHandle]]
  * [[:macros:function:ActionScript.SetProperty.Integer]]
  * [[:macros:function:Playbacks.MergePlaybackCue]]
  * [[:macros:function:Programmer.Editor.Clear]]
==== affected properties ====
  * [[:macros:property:Programmer.BlindActive]]
  * [[:macros:property:Editor.Shapes.Spread]]
A longer file, with entries for more playbacks, is available here: {{ :macros:example:fx-move-spread-1.xml |}}. **Know that this is not running flawlessly - see http://forum.avolites.com/viewtopic.php?f=20&t=6068&p=21840 for details.**
===== Code =====
  
  set effect spread to 1
    
     
      ActionScript.SetProperty.Boolean("Programmer.BlindActive", true)
      Programmer.SetBlindMode(false, 0)
      
     
     
      Include.SelectPlaybackHandle("Location=PlaybackWindow,1,1")
      ActionScript.SetProperty.Integer('Editor.Shapes.Spread',1)
      Playbacks.MergePlaybackCue("Location=PlaybackWindow,1,1", true)
      Programmer.Editor.Clear(128, true, false, 0)
      
      Include.SelectPlaybackHandle("Location=PlaybackWindow,1,2")
      ActionScript.SetProperty.Integer('Editor.Shapes.Spread',1)
      Playbacks.MergePlaybackCue("Location=PlaybackWindow,1,2", true)
      Programmer.Editor.Clear(128, true, false, 0)
      
      
      
      ActionScript.SetProperty.Boolean("Programmer.BlindActive", false)
      Programmer.SetBlindMode(false, 0)
      
    
  
  
  
===== 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]]
The whole workload is done in blind mode, thus the first and last two steps enter and exit blind mode, as outlined in [[macros:example:blindmodeonoff|]]. Once in blind mode, the playback is included, the shape spread set, and the programmer merged into the playback:
  * ''Include.SelectPlaybackHandle("Location=PlaybackWindow,1,1")'' includes a playback selected by its location
  * ''ActionScript.SetProperty.Integer('Editor.Shapes.Spread',1)'' sets the spread value (here: 1)
  * ''Playbacks.MergePlaybackCue("Location=PlaybackWindow,1,1", true)'' merges the programmer back into the playback
  * ''Programmer.Editor.Clear(128, true, false, 0)'' clears the programmer using a mask (128 is the FX attribte bank)
===== How to use it =====
  * [[:macros:deploying|make this macro available]]
  * stick to a scheme of always using particular playback handles, as only these handles will be affected by this macro
  * call the macro to quickly set a shape spread
~~DISCUSSION~~