macros:example:fancurves

Differences

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

Link to this comparison view

Next revision
Previous revision
macros:example:fancurves [2019/01/03 22:38] – created sideshowbondmacros:example:fancurves [2019/05/03 14:29] (current) icke_siegen
Line 1: Line 1:
 Example Example
  
-====== Fan Curves ======+====== Programmer - Fan Curves ======
  
 ^ by: | Alex del Bondio with the help of Greg Haynes | ^ by: | Alex del Bondio with the help of Greg Haynes |
Line 12: Line 12:
 {{tag> fan curve group segment part }} {{tag> fan curve group segment part }}
  
-This selection of macros lets you change the fan curve, parts and grouping options without having to enter the fan menu. These macros have [[:macros:active_binding]] set so they will highlight when the corresponding attribute is set+This selection of macros lets you change the fan curve, parts and grouping options without having to enter the fan menu. These macros have [[:macros:active_binding]] set so they will highlight when the corresponding attribute is set
 + 
 +5/1/19 Fan Toggle macro added in the file
  
 The code below is a snippet of the whole file which contains macros for all curves, grouping options and a handful of segments/parts. The code below is a snippet of the whole file which contains macros for all curves, grouping options and a handful of segments/parts.
Line 19: Line 21:
 ==== functions ==== ==== functions ====
   * [[:macros:function:Programmer.Editor.Fixtures.Fan.SelectCurve]]   * [[:macros:function:Programmer.Editor.Fixtures.Fan.SelectCurve]]
-  * [[:macros:active_binding]] 
  
 ==== affected properties ==== ==== affected properties ====
Line 26: Line 27:
   * [[:macros:property:Programmer.Editor.Fixtures.Fan.SegmentCount]]   * [[:macros:property:Programmer.Editor.Fixtures.Fan.SegmentCount]]
  
 +==== specials ====
 +  * [[:macros:active_binding]]
  
 ===== Code ===== ===== Code =====
 <code xml fancurves.xml> <code xml fancurves.xml>
-<?xml version="1.0" encoding="utf-8"?> 
-<avolites.macros> 
 <?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
 <avolites.macros> <avolites.macros>
  
-  <!-->Fan curves: Line, Mirror, Wings, Arrow, Pull Middle, Pull Ends, Pull End<--> 
- <macro id="adb.Macros.fan.Line" name="adb fan Line"> 
-     <active binding="{propertyLink id='Programmer.Editor.Fixtures.Fan.SelectedFanCurveId' converter='Math.EqualityConverter' converterParameter='Line'}"/> 
-     <sequence> 
- <step>Programmer.Editor.Fixtures.Fan.SelectCurve("Line")</step> 
-      </sequence> 
- </macro> 
-  <!-->Fan Grouping<--> 
- <macro id="adb.Macros.fan.FanWithinGroup" name="adb fan FanWithinGroup"> 
-     <active binding="{propertyLink id='Programmer.Editor.Fixtures.Fan.GroupOptions' converter='Math.EnumAsStringEqualityConverter' converterParameter='FanWithinGroup'}"/> 
-     <sequence> 
- <step>ActionScript.SetProperty.Enum("Programmer.Editor.Fixtures.Fan.GroupOptions", "FanWithinGroup")</step> 
-            </sequence> 
- </macro> 
-  <!-->Fan Parts<--> 
- <macro id="adb.Macros.fan.3part" name="adb fan 3part"> 
-     <active binding="{propertyLink id='Programmer.Editor.Fixtures.Fan.SegmentCount' converter='Math.EnumAsStringEqualityConverter' converterParameter='3'}"/> 
-      <sequence> 
- <step>ActionScript.SetProperty("Programmer.Editor.Fixtures.Fan.SegmentCount",3)</step> 
-      </sequence> 
- </macro> 
  
-<!--><-->+  <!-- Fan curves: Line, Mirror, Wings, Arrow, Pull Middle, Pull Ends, Pull End--> 
 +  <macro id="adb.Macros.fan.Line" name="adb fan Line"> 
 +    <active binding="
 +      propertyLink id='Programmer.Editor.Fixtures.Fan.SelectedFanCurveId'  
 +      converter='Math.EqualityConverter'  
 +      converterParameter='Line' 
 +    }"/> 
 +    <sequence> 
 +      <step>Programmer.Editor.Fixtures.Fan.SelectCurve("Line")</step> 
 +    </sequence> 
 +  </macro> 
 +   
 +  <!-- Fan Grouping --> 
 +  <macro id="adb.Macros.fan.FanWithinGroup" name="adb fan FanWithinGroup"> 
 +    <active binding="
 +      propertyLink id='Programmer.Editor.Fixtures.Fan.GroupOptions'  
 +      converter='Math.EnumAsStringEqualityConverter'  
 +      converterParameter='FanWithinGroup' 
 +    }"/> 
 +    <sequence> 
 +      <step>ActionScript.SetProperty.Enum("Programmer.Editor.Fixtures.Fan.GroupOptions", "FanWithinGroup")</step> 
 +    </sequence> 
 +  </macro> 
 +   
 +  <!-- Fan Parts --> 
 +  <macro id="adb.Macros.fan.3part" name="adb fan 3part"> 
 +    <active binding="
 +      propertyLink id='Programmer.Editor.Fixtures.Fan.SegmentCount'  
 +      converter='Math.EqualityConverter'  
 +      converterParameter='3' 
 +    }"/> 
 +    <sequence> 
 +      <step>ActionScript.SetProperty("Programmer.Editor.Fixtures.Fan.SegmentCount",3)</step> 
 +    </sequence> 
 +  </macro> 
 </avolites.macros> </avolites.macros>
- 
- 
  
 </code> </code>
Line 71: Line 84:
   * ''Programmer.Editor.Fixtures.Fan.GroupOptions'' is the property regarding the grouping options and needs to be set via ''ActionScript.SetProperty.Enum''   * ''Programmer.Editor.Fixtures.Fan.GroupOptions'' is the property regarding the grouping options and needs to be set via ''ActionScript.SetProperty.Enum''
   * ''Programmer.Editor.Fixtures.Fan.SegmentCount'' the number of parts the fan is split into and again needs to be set via ''ActionScript.SetProperty''   * ''Programmer.Editor.Fixtures.Fan.SegmentCount'' the number of parts the fan is split into and again needs to be set via ''ActionScript.SetProperty''
-  * ''active binding'' is used to highlight a macro when the corresponding property (''propertyLink id'') matches the ''converterParameter''+  * ''active binding'' is used to highlight a macro when the corresponding property (''propertyLink id'') matches the ''converterParameter''. A good starting point to understand active binding is either this wiki or this post in the Avo forum [[http://forum.avolites.com/viewtopic.php?f=20&t=5962]]
  
 ===== How to use it ===== ===== How to use it =====
macros/example/fancurves.1546555133.txt.gz · Last modified: 2019/01/03 22:38 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki