説明
The CreateMultiPatch Lua function creates a series of multi patch fixtures to a table of fixtures.
引数
- table:
The table must contain handles to the fixtures who should have the multi patch fixtures.
- integer:
The number of multi patch fixtures to create.
- string (オプション):
The string is an optional undo text. It needs to be in quotation marks.
戻り値
- integer | nil:
The returned integer indicates the amount of multi patch fixtures created.
例
This example creates two multi patch fixtures to the first fixture (excluding the "Universal" fixture) in the patch.
|
return function() Cmd("ChangeDestination Root"); Cmd("ChangeDestination 'ShowData'.'Patch'");
local myFixture = Patch().Stages[1].Fixtures[2] local myFixtureTable = {myFixture} local multiPatchAmount = 2
local count = 0 for _ in pairs(myFixtureTable) do count = count + 1 end local undoText = string.format("Create %d multipatch fixtures for up to %d fixtures", multiPatchAmount, count)
local multiPatchAmount = CreateMultiPatch(myFixtureTable, multiPatchAmount, undoText) if multiPatchAmount ~= nil then Printf(multiPatchAmount .. " multi patch objects was created") else Printf("An error occured") end
Cmd("ChangeDestination Root") end |