Page 1 of 1
Fan Curve active binding
Posted: 21 Dec 2018, 01:24
by sideshowbond
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'}"/>
Re: Fan Curve active binding
Posted: 21 Dec 2018, 09:01
by icke_siegen
Try
Code: Select all
Programmer.Editor.Fixtures.Fan.SelectedFanCurve
Re: Fan Curve active binding
Posted: 02 Jan 2019, 14:15
by Gregory
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'}"/>
Re: Fan Curve active binding
Posted: 02 Jan 2019, 17:11
by sideshowbond
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.
Re: Fan Curve active binding
Posted: 02 Jan 2019, 17:30
by Gregory
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.
Re: Fan Curve active binding
Posted: 03 Jan 2019, 21:15
by sideshowbond
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?
Re: Fan Curve active binding
Posted: 03 Jan 2019, 23:43
by sideshowbond
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.
Re: Fan Curve active binding
Posted: 05 Jan 2019, 00:09
by sideshowbond
ignore that, I just figured out