Fan Curve active binding

This is a place for people to chare the custom macros they have written.

Moderator: Moderators

User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Fan Curve active binding

Postby sideshowbond » 21 Dec 2018, 01:24

I made a few macros for fan curve like

Code: Select all

Programmer.Editor.Fixtures.Fan.SelectCurve("Mirror")

Is there a way to get active binding to work for those macros. I tried various things along

Code: Select all

<active binding="{propertyLink id='Programmer.Editor.Fixtures.Fan.Select(ed)Curve' converter='Math.ToEnum(String)' converterParameter='Arrow'}"/>
icke_siegen
Posts: 1087
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Fan Curve active binding

Postby icke_siegen » 21 Dec 2018, 09:01

Try

Code: Select all

Programmer.Editor.Fixtures.Fan.SelectedFanCurve
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Fan Curve active binding

Postby Gregory » 02 Jan 2019, 14:15

You need to use the Math.EqualityConverter which takes the value of the property and compares it to the parameter and returns true or false. I used the SelectedFanCurveId property as this matches the ID used to set the curve using the SelectCurve function.

Code: Select all

<active binding="{propertyLink id='Programmer.Editor.Fixtures.Fan.SelectedFanCurveId' converter='Math.EqualityConverter' converterParameter='Mirror'}"/>
Attachments
FanCurve.xml
(2.72 KiB) Downloaded 500 times
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Fan Curve active binding

Postby sideshowbond » 02 Jan 2019, 17:11

Thanks Greg.

One of the converters I tried actually was Math.EqualityConverter (I tried various converters) however the main mistake I made was scripting active binding into the sequence. Silly me... now it works for Segments too :-)

I don't seem to get it to work for Group Options though.

Code: Select all

          <active binding="{propertyLink id='Programmer.Editor.Fixtures.Fan.GroupOptions' converter='Math.EqualityConverter' converterParameter='FanGroupAsFixture'}"/>
       <sequence>
          <step>ActionScript.SetProperty.Enum("Programmer.Editor.Fixtures.Fan.GroupOptions", "FanGroupAsFixture")</step>
        </sequence>

sets group options fine but active binding doesn't work.
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Fan Curve active binding

Postby Gregory » 02 Jan 2019, 17:30

For enum values you will need to use the Math.EnumAsStringEqualityConverter as the Math.EqualityConverter does not automatically convert the string parameter to the enum type or vice versa so it ends up comparing two different things.
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Fan Curve active binding

Postby sideshowbond » 03 Jan 2019, 21:15

awesome, thank you Greg.

I've added this all up and put this together as some fan macros.

I've noticed that when a property is set when starting Titan the corresponding macro will not fire the active binding. Same with the stock palette fade and overlap macros. Is that just the way it is or is there a way around this?
Attachments
adb_fancurves.xml
(5.67 KiB) Downloaded 483 times
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Fan Curve active binding

Postby sideshowbond » 03 Jan 2019, 23:43

I thought making a fan toggle would be a nice addition to this however again I struggle with the active binding (without feedback such button would be worthless).
Programmer.Editor.Fixtures.Fan.ToggleFan() to toggle the fan and I figured as much as Programmer.Editor.Fixtures.Fan.FanModeEnabled would be the propertyLink id but again I struggle to find the converter.
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Fan Curve active binding

Postby sideshowbond » 05 Jan 2019, 00:09

ignore that, I just figured out

Who is online

Users browsing this forum: No registered users and 16 guests