Function to find effects in the specified Element object. For example,
this.parent specifies the parent of the script module as Element object to be searched in. To specifiy a bus to be searched in, use getBus or findBusses. If recursive is set to
true, subelements will also be searched. The function returns an array with the Effect objects of the found effects. Particular effects can be searched by name or through a filter function. If searching by name, findEffects accepts only the Effect objects that match the specified name. The filter function uses the Effect object of each effect as argument. Only those Effect objects that return
true for the search criteria defined in the filter function will be accepted by findEffects. Without a name or filter function the Effect objects of all effects in the searched Element objects will be returned.
Available in: Controller, Processor.
|recursive||If set to |
false, only the specified Element object will be searched. If set to
true, subelements will also be searched. The default is
|nameOrFilterFunction||The name of the effects searched for or a filter function. Only the Effect objects that match the name or return |
true for the search criteria of the filter function will be accepted. Set this to
nil to deactivate any name filter or search criteria.
|string or function, optional|
Returns an array with the Effect objects of the found effects. Returns an empty table if no effects are found.
-- find all effects and print their names
effects = this.program:findEffects(true)
if effects then
for i, effect in ipairs(effects) do
print("Could not find any effects!")