GetRTChannels 関数は、RTチャンネルのインデックスまたはRTチャンネル・オブジェクトへのハンドルを含むテーブルを返します。この関数には、2種類の引数があります。
― または ―
この例では、セレクション内の最初のフィクスチャに対するRTチャンネル・インデックスのリストを出力しています。入力にはインデックス番号を用います。
return function()
-- Get the index number for the first fixture in the current selection
local fixtureIndex = SelectionFirst()
-- Get the indexes of the RT channels
local rtChannels = GetRTChannels(fixtureIndex, false)
-- Print an error message if returnd table is nil
if rtChannels == nil then
ErrPrintf("Please select a fixture and try again")
return
end
-- Print the table content
for key,value in ipairs(rtChannels) do
Printf("List index number ".. key .." : RTChannel index number = ".. value)
end
end
この例では、セレクション内の最初のフィクスチャに対するRTチャンネルのインデックスとアトリビュートのリストを出力しています。入力にはハンドルを用います。
return function()
-- Get a handle to the first fixture in the current selection
local fixtureHandle = GetSubfixture(SelectionFirst())
if fixtureHandle == nil then
ErrPrintf("Please select a fixture and try again")
return
end
-- Creates a table of handles to the RT channels of the first selected fixture.
local rtChannels = GetRTChannels(fixtureHandle, true)
if rtChannels == nil then
ErrPrintf("Please select a fixture and try again")
return
end
-- Print DMX addresses of the RT Channels for the fixture
for key,value in ipairs(rtChannels) do
Printf("List index number ".. key .. " : RTChannel Index = %i, Coarse DMX addr. = %s, Fine DMX addr. = %s", value.INDEX, value.COARSE, value.FINE)
end
end