Page 1 of 1

(Lua) Selective Flip (useful with AutoFocus)

Posted: Thu Jul 31, 2008 10:52 pm
by RobertBell
When the autofocus protocol for WYG was developed, most lights panned 360 degrees (not 540), so the rule of thumb was to always focus the fixture 'away' from the pan-stop. That meant that Pan was always between 25% and 75% and tilt would be whatever was needed. Today, with the Abstract Control Model and better ML practices, it's much better to solve for a solution that always gives you a positive tilt. I'm using this macro after pointing the whole rig in one spot using AutoFocus.

Code: Select all

s = HC.GetCurrentSelectionSet(',')
needed = false
for fixture in string.gmatch(s,"%d+") do
  HC.Deselect(fixture)
end
for fixture in string.gmatch(s,"%d+") do
  if tonumber(HC.AttributeGetValue(fixture,'tilt')) < 0 then
   HC.Select(fixture)
   needed = true
  end
end
if needed then
  HC.FlipCurrentSelectionSet()
end
for fixture in string.gmatch(s,"%d+") do
  HC.Select(fixture)
end