Page tree
Skip to end of metadata
Go to start of metadata

hasParameter(nameOrID)

Description

Function to check if a parameter exists. The parameter can be determined by name or ID.

Available in: Controller, Processor.

Arguments

nameOrIDThe name or ID of the parameter.string or number

Return Values

Returns true if the parameter exists or false if not.

Example

-- check if the elements in the Program Tree have filter cutoff
function onLoadIntoSlot()
    childs = this.program:findChildren(true)
    for i, child in ipairs(childs) do
        if child:hasParameter("Filter.Cutoff") then
            print(child.name.." has filter cutoff.")
        else
            print(child.name.." has no filter cutoff.")
        end
    end
end

1 Comment