Lua 関数の GetUIChannels は、UIチャンネル・インデックスを含むテーブル、またはUIチャンネル・オブジェクトへのハンドルを含むテーブルを返します。この関数には2種類の引数があります。
― または ―
この例では、セレクション内の最初のフィクスチャに対するUIチャンネル・インデックスのリストを出力しています。入力にはインデックス番号を用います。
return function()
-- Creates a table of indexes of the UI channels of the first selected fixture.
local uiChannels = GetUIChannels(SelectionFirst())
if uiChannels == nil then
ErrPrintf("Please select a fixture and try again")
return
end
for key,value in pairs(uiChannels) do
Printf(key .. " : UIChannel Index = " .. value)
end
end
この例では、セレクション内の最初のフィクスチャに対するUIチャンネル・インデックスとアトリビュートのリストを出力します。入力にはハンドルを用います。
return function()
local fixtureHandle = GetSubfixture(SelectionFirst())
-- Creates a table of handles to the UI channels of the first selected fixture.
local uiChannels = GetUIChannels(fixtureHandle, true)
if uiChannels == nil then
ErrPrintf("Please select a fixture and try again")
return
end
for key,value in pairs(uiChannels) do
Printf(key .. ": UIChannel Index = %i, (Sub)Attribute = %s", value.INDEX-1, value.SUBATTRIBUTE)
end
end