説明
The ObjectList Lua function returns a table with handles. The table is created based on a string input that should create a selection.
引数
- string:
The string must be a command that would create a range of objects in the command line.
- table (オプション):
The table can contain two possible named elements. Each element can have a boolean true or false value. See the examples below for how to use them.
-
'reverse_order':
This must have a boolean value. If this is true then the returned list is in reverse order.
-
'selected_as_default':
This must have a boolean value. If this is true then the object list will only contain the object that is selected in the pool. For instance, it only returns the currently selected filter from the filter pool.
戻り値
- table:
The function returns a table with handles to the objects based on the string argument.
例
This example returns the names and patch addresses of fixtures 1 through 10. It assumes these fixtures exist - if they do not, then it returns an error text.
|
return function() local myObjects = ObjectList("Fixture 1 Thru 10", {reverse_order=true}) if myObjects~= nil then for i in pairs(myObjects) do Printf("Fixture: " .. myObjects[i].name .. " - Patch: " ..myObjects[i].patch) end else ErrPrintf("An error occured. Does Fixture 1 Thru 10 exist?") end end |
This example creates an object list with the selected sequence. It then dumps all information about the sequence using the .
|
return function() local myObjects = ObjectList("Sequence", {selected_as_default=true}) if myObjects~= nil then myObjects[1]:Dump() else ErrPrintf("An error occured.") end end |