macros:example:reverseoffsetrestart
Table of Contents
Example
Shapes - Reverse, Offset, Restart
by: | Matías Muccillo, February 2020 final changes by Sebastian Beutel |
---|---|
published: | inquiry: https://www.facebook.com/groups/Avolites/permalink/1799612296837663/ final macro: here |
description: | reverses shape on part of fixtures, offsets them, restarts shape |
remarks: | most useful for circle shapes |
When creating shapes, in order to make a symmetrical look (e.g. circle shape with left fixtures turning clockwise, right fixtures turning counter-clockwise) you need to (1) select half of the fixtures, (2) reverse the shape for them, (3) offset them by 180°, and (4) restart the shape to see the effect. This macro does everything (for a predefined number of fixtures at least - there are macros for other fixture quantities as well).
functions
affected properties
control structures
Matias made more macros for various fixture quantities: mm_symmetrical_shape.xml
Code
- ReverseOffsetRestart16.xml
<?xml version="1.0" encoding="utf-8"?> <avolites.macros> <!-- Symmetrical Shape --> <macro id="Macros.Shapes.SymmShape16" name="Symmetrical Shape 16 Fix"> <sequence> <step pause="0.001">Editor.Shapes.ProgrammerShapesList()</step> <step condition="!Editor.Shapes.ProgrammerShapes.Empty"> Editor.Shapes.SelectAllShapes() </step> <!-- <step condition="!Editor.Shapes.EditShapesEmpty"> // not from v12 on! --> <step pause="0.001">ActionScript.SetProperty.Integer('Editor.Shapes.Spread', 8)</step> <step pause="0.001">Command.RunCommand("PATTERN 8 IN 16")</step> <step pause="0.001">ActionScript.SetProperty.Boolean("Selection.Context.Global.RepeatPattern", true)</step> <step pause="0.001">Editor.Shapes.Reverse()</step> <step pause="0.001">ActionScript.SetProperty.Double('Editor.Shapes.PhaseOffset', 180)</step> <step pause="0.001">Programmer.RefireProgrammer(Programmer.CurrentProgrammerIds)</step> <step pause="0.001">Selection.Context.Global.ClearPatternSelect()</step> </sequence> </macro> </avolites.macros>
Explanation
This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax
Editor.Shapes.ProgrammerShapesList()
gets the currently running shapesEditor.Shapes.SelectAllShapes()
selects all shapes- the next step was conditional until Titan v11 - but
!Editor.Shapes.EditShapesEmpty
returns false from v12 on ActionScript.SetProperty.Integer('Editor.Shapes.Spread', 8)
sets a spread of 8Command.RunCommand(“PATTERN 8 IN 16”)
is a nice way of selecting half of the fixtures, togetether withActionScript.SetProperty.Boolean(“Selection.Context.Global.RepeatPattern”, true)
Editor.Shapes.Reverse()
reverses the shape(s) for the previously selected first half of fixturesActionScript.SetProperty.Double('Editor.Shapes.PhaseOffset', 180)
offsets them by 180° - note that this property is of type DoubleProgrammer.RefireProgrammer(Programmer.CurrentProgrammerIds)
restarts the shapesSelection.Context.Global.ClearPatternSelect()
finally clears the selection pattern
How to use it
- select 16 fixtures in a row, create a circle spread, set it to medium size and speed ⇒ all fixtures will move simultaneously
- fire this macro. Immediately the fixtures will be divided in half, with suitable spread, left and right half turning in opposite directions but in perfect sync
You could leave a comment if you were logged in.
macros/example/reverseoffsetrestart.txt · Last modified: 2020/03/02 10:17 by icke_siegen