(Lua) Selective Flip (useful with AutoFocus)

Open Source software contributions and discussions that supplement or extend the Palette / Light Palette software
Post Reply
User avatar
RobertBell
Posts: 2421
Joined: Fri Oct 12, 2007 1:11 pm
Primary Venue / Use: Other
Where I Am: Horizon Control Inc
Location: On the dark side just north of Toronto
Contact:

(Lua) Selective Flip (useful with AutoFocus)

Post by RobertBell » Thu Jul 31, 2008 10:52 pm

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
Robert Bell - Product Manager - Horizon Control Inc.

Post Reply