GetDependencies(handle)

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

説明

GetDependencies 関数は、オブジェクトの依存関係を含むテーブルを返します。

引数

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

戻り値

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

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

Dump()

The Dump() function returns a string with information about the object, for instance, the name, class, path of the object, its properties, and children.

Learn more in the Dump() topic.

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