-- TriggerType=Menu -- DisplayOutputWindow=False -- MA2 Functions -- StoreCue function StoreCue(cue) textToSend = "Store Cue ".. cue.."\r" Telnet:Send(textToSend) end -- SetCueName function SetCueName(cue, name) textToSend = "Assign Cue "..cue.." /name=\""..name.."\"".."\r" Telnet:Send(textToSend) end -- SetCueFade function SetCueFade(cue, fade) textToSend = "Assign Cue "..cue.." /fade="..fade.."\r" Telnet:Send(textToSend) end -- ClearSelection function ClearSelection() -- Clear Channel Selection textClear = "Clear".."\r" Telnet:Send(textClear) end -- PatchFixture function PatchFixture(fixture, universe, address) textToSend = "Assign Fixture "..fixture.." At Dmx "..universe.."."..address.." /noconfirm\r" Telnet:Send(textToSend) end -- UnpatchFixture function UnpatchFixture(fixture) textToSend = "Delete Fixture "..fixture.." /noconfirm\r" Telnet:Send(textToSend) end -- NameFixture function NameFixture(fixture,name) textToSend = "Assign Fixture "..fixture.." /name=\""..name.."\"".."\r" Telnet:Send(textToSend) end -- PatchChannel function PatchChannel(channel, universe, address) textToSend = "Assign Channel "..channel.." At Dmx "..universe.."."..address.." /noconfirm\r" Telnet:Send(textToSend) end -- UnpatchChannel function UnpatchChannel(channel) textToSend = "Delete Channel "..channel.." /noconfirm\r" Telnet:Send(textToSend) end -- NameChannel function NameChannel(channel,name) textToSend = "Assign Channel "..channel.." /name=\""..name.."\"".."\r" Telnet:Send(textToSend) end -- Move3DChannel function Move3DChannel(channel, x, y, z) -- Clear Channel Selection textClear = "Clear".."\r" Telnet:Send(textClear) -- Select Channel textChannel = "Channel "..channel.."\r" Telnet:Send(textChannel) -- Move3D textMove3D = "Move3D At "..x.." "..y.." "..z.."\r" Telnet:Send(textMove3D) end -- Move3DFixture function Move3DFixture(fixture, x, y, z) -- Clear Fixture Selection textClear = "Clear".."\r" Telnet:Send(textClear) -- Select Fixture textFixture = "Fixture "..fixture.."\r" Telnet:Send(textFixture) -- Move3D textMove3D = "Move3D At "..x.." "..y.." "..z.."\r" Telnet:Send(textMove3D) end -- Main Script RigDataView:DispatchAction("Select First Fixture") fixtureCount = RigDataView:GetFixtureCount() current = 1 ClearSelection() while current <= fixtureCount do fixtureObject = Fixture:GetSelectedFixture() -- Process Fixture or Channel if fixtureObject.FixtureNumber > 0 then -- Fixture Move3DFixture(fixtureObject.FixtureNumber, fixtureObject.LocationX, fixtureObject.LocationY, fixtureObject.LocationZ) PatchFixture( fixtureObject.FixtureNumber, fixtureObject.DMXUniverse, fixtureObject.DMXAddress) NameFixture( fixtureObject.FixtureNumber, fixtureObject.Name) else -- Channel Move3DChannel(fixtureObject.Channel, fixtureObject.LocationX, fixtureObject.LocationY, fixtureObject.LocationZ) PatchChannel( fixtureObject.Channel, fixtureObject.DMXUniverse, fixtureObject.DMXAddress) NameChannel( fixtureObject.Channel, fixtureObject.Name) end RigDataView:DispatchAction("Select Next Fixture") current = current + 1 end ClearSelection()