説明
CreateMultiPatch 関数は、テーブルに一連のマルチパッチ・フィクスチャを作成します。
引数
- table:
テーブルには、マルチパッチ・フィクスチャを持つフィクスチャへのハンドルが含まれている必要があります。
- integer:
作成するマルチパッチ・フィクスチャの数です。
- string (オプション):
元に戻す際の文字列です。引用符で囲む必要があります。
戻り値
- integer または nil:
作成されたマルチパッチ・フィクスチャの数を返します。
例
Patch で最初のフィクスチャ(Universal を除く)に2つのマルチパッチ・フィクスチャを作成します。
|
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 |