Example
====== Chase - Change a chaser's overlap ======
^ by: | Gregory Haynes, Ricster, Apr. 2017 |
^ published: | http://forum.avolites.com/viewtopic.php?f=20&t=5150 |
^ description: | snippets to change a chaser's overlap |
^ remarks: | not a working macro but interesting discussion and insights on some properties, types, and type casting |
{{tag>Chase X-fade handle}}
==== functions ====
* [[macros:function:actionscript.setproperty]]
* [[macros:function:actionscript.setproperty.float]]
* [[macros:function:math.cast.tosingle]]
==== affected properties ====
* [[macros:property:playbacks.editor.selectedplayback]]
* [[macros:property:chases.connectedhandle]]
* [[macros:property:playbacks.editor.times.chasefixtureoverlap]]
===== Code =====
Set fixture overlap of connected chase to 50%.
ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Chases.ConnectedHandle)
ActionScript.SetProperty.Float("Playbacks.Editor.Times.ChaseFixtureOverlap", 0.5)
ActionScript.SetProperty("Playbacks.Editor.Times.ChaseFixtureOverlap", Math.Cast.ToSingle(1))
ActionScript.SetProperty.Float("Playbacks.Editor.Times.ChaseFixtureOverlap", 1)
ActionScript.SetProperty("Playbacks.Editor.Times.ChaseFixtureOverlap", float:1)
===== Explanation =====
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]]
* ''ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", Chases.ConnectedHandle)'' makes the currently connected handle active in the editor
* ''ActionScript.SetProperty.Float("Playbacks.Editor.Times.ChaseFixtureOverlap", 0.5)'' sets the property ''"Playbacks.Editor.Times.ChaseFixtureOverlap"'' to 0.5 which is 50%
Another example was published by kimwida: http://forum.avolites.com/viewtopic.php?f=20&t=5579 where the chasers are referred by their usernumber and a legend is set to reflect the current overlap value:
ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", handle:"chaseHandleUN=19159")
ActionScript.SetProperty("Playbacks.Editor.Times.ChaseFixtureOverlap", 0.2)
ActionScript.SetProperty("Playbacks.Editor.SelectedPlayback", handle:"chaseHandleUN=19160")
ActionScript.SetProperty("Playbacks.Editor.Times.ChaseFixtureOverlap", 0.2)
Handles.SetSourceHandleFromHandle("chaseHandleUN=1293")
ActionScript.SetProperty("Handles.PendingLegend", "Overlap 20%")
Handles.SetLegend()
Handles.ClearSelection()
===== How to use it =====
- [[macros:deploying|make this macro available]]
- once a chase is active and connected, fire this macro to set the chaser to 50% crossfade
~~DISCUSSION~~