GetReferences(handle)

grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » GetReferences(handle)
Version 2.2

説明

GetReferences 関数 は、このオブジェクトを参照するオブジェクトのハンドルを含むテーブルを返します。

引数

  • handle:
    light_userdata 型のハンドルです。オブジェクトでコロン記法を用いる場合は省略できます。

戻り値

  • table:
    このオブジェクトを参照するさまざまなオブジェクトのハンドルを含むテーブルを返します。

返されたテーブル内の選択されたシーケンスの最初のオブジェクトを、Dump() 関数で出力します。

Lua
return function()
-- SelectedSequence() creates a handle to the selected sequence.
local selectedSequence = SelectedSequence()
-- Get the references for the sequence.
local seqReferences = selectedSequence:GetReferences()
-- Check if there are any references and output a relevant feedback.
if seqReferences ~= nil then
-- There is a reference table returned. Print a dump of the first table element.
Printf("=============== START OF DUMP ===============")
seqReferences[1]:Dump()
Printf("================ END OF DUMP ================")
else
Printf("No references found")
end
end