User Tools

Site Tools


macros:example:reverseoffsetrestart

Differences

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

Link to this comparison view

Next revision
Previous revision
macros:example:reverseoffsetrestart [2020/03/01 14:56] – created icke_siegenmacros:example:reverseoffsetrestart [2020/03/02 10:17] (current) – [Table] icke_siegen
Line 3: Line 3:
 ====== Shapes - Reverse, Offset, Restart ====== ====== Shapes - Reverse, Offset, Restart ======
  
-^ by: | Matias Mucillo, February 2020 \\ final changes by Sebastian Beutel | +^ by:           Matías Muccillo, February 2020 \\ final changes by Sebastian Beutel                                 
-^ published: | inquiry: https://www.facebook.com/groups/Avolites/permalink/1799612296837663/ \\ final macro: here | +^ published:    | inquiry: https://www.facebook.com/groups/Avolites/permalink/1799612296837663/ \\ final macro: here  
-^ description: | reverses shape on part of fixtures, offsets them, restarts shape | +^ description:  | reverses shape on part of fixtures, offsets them, restarts shape                                    
-^ remarks: | most useful for circle shapes |+^ remarks:      | most useful for circle shapes                                                                       |
  
-{{tag>shapes invert offset restart}}+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). 
 + 
 +{{tag>shape reverse invert offset restart}}
  
 ==== functions ==== ==== functions ====
-  * [[:macros:function:someusedfunction]] +  * [[:macros:function:Editor.Shapes.ProgrammerShapesList]] 
-  * [[:macros:function:anotherusedfunction]]+  * [[:macros:function:Editor.Shapes.SelectAllShapes]] 
 +  * [[:macros:function:ActionScript.SetProperty.Integer]] 
 +  * [[:macros:function:Command.RunCommand]] 
 +  * [[:macros:function:ActionScript.SetProperty.Boolean]] 
 +  * [[:macros:function:Editor.Shapes.Reverse]] 
 +  * [[:macros:function:ActionScript.SetProperty.Double]] 
 +  * [[:macros:function:Programmer.RefireProgrammer]] 
 +  * [[:macros:function:Selection.Context.Global.ClearPatternSelect]] 
  
 ==== affected properties ==== ==== affected properties ====
-  * [[:macros:property:someproperty]] +  * [[:macros:property:Editor.Shapes.ProgrammerShapes.Empty]] 
-  * [[:macros:property:anotherusedproperty]]+  * [[:macros:property:Editor.Shapes.EditShapesEmpty]] 
 +  * [[:macros:property:Editor.Shapes.Spread]] 
 +  * [[:macros:property:Selection.Context.Global.RepeatPattern]] 
 +  * [[:macros:property:Editor.Shapes.PhaseOffset]] 
 +  * [[:macros:property:Programmer.CurrentProgrammerIds]]
  
 ==== control structures ==== ==== control structures ====
-  * anyspecials?+  * [[macros:control_structures|condition]] 
 + 
 +Matias made more macros for various fixture quantities: {{ :macros:example:mm_symmetrical_shape.xml |}}
    
 ===== Code ===== ===== Code =====
-<code xml filename.xml>+<code xml ReverseOffsetRestart16.xml>
 <?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
 <avolites.macros> <avolites.macros>
Line 28: Line 44:
 <!-- Symmetrical Shape --> <!-- Symmetrical Shape -->
   
-  <macro id="MM.Macros.Shapes.SymmShape16.4" name="mm Symmetrical Shape 16 Fix SB 4">+  <macro id="Macros.Shapes.SymmShape16" name="Symmetrical Shape 16 Fix">
     <sequence>     <sequence>
       <step pause="0.001">Editor.Shapes.ProgrammerShapesList()</step>       <step pause="0.001">Editor.Shapes.ProgrammerShapesList()</step>
Line 53: Line 69:
 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]] 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+  * ''Editor.Shapes.ProgrammerShapesList()'' gets the currently running shapes 
 +  * ''Editor.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 8 
 +  * ''Command.RunCommand("PATTERN 8 IN 16")'' is a nice way of selecting half of the fixtures, togetether with ''ActionScript.SetProperty.Boolean("Selection.Context.Global.RepeatPattern", true)'' 
 +  * ''Editor.Shapes.Reverse()'' reverses the shape(s) for the previously selected first half of fixtures 
 +  * ''ActionScript.SetProperty.Double('Editor.Shapes.PhaseOffset', 180)'' offsets them by 180° - note that this property is of type [[macros:type:double]] 
 +  * ''Programmer.RefireProgrammer(Programmer.CurrentProgrammerIds)'' restarts the shapes 
 +  * ''Selection.Context.Global.ClearPatternSelect()'' finally clears the selection pattern
  
 ===== How to use it ===== ===== How to use it =====
  
   - [[:macros:deploying|make this macro available]]   - [[:macros:deploying|make this macro available]]
- +  - select 16 fixtures in a row, create a circle spread, set it to medium size and speed => all fixtures will move simultaneously 
-tbd+  - 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
  
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
macros/example/reverseoffsetrestart.1583074592.txt.gz · Last modified: 2020/03/01 14:56 by icke_siegen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki