|
grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object API » Ptr(handle, integer) |
Version 2.2 |
Ptr 関数は、子オブジェクトへのハンドルを返します。
選択したシーケンスの最初の子に接続されたデータを、Dump() 関数で出力します。
Lua |
return function() -- SelectedSequence() creates a handle to the selected sequence. local selectedSequence = SelectedSequence() -- Check that a handle was returned - if not then exit function. if selectedSequence == nil then ErrPrintf("There is no selected sequence.") return end -- Get a handle to the first child object. local firstChild = selectedSequence:Ptr(1) -- Print some feedback. if firstChild ~= nil then Printf("=============== START OF DUMP ===============") firstChild:Dump() Printf("================ END OF DUMP ================") else ErrPrintf("The object do not have a child object.") end end |