/ HALion Developer Resource / HALion Script / Reference /
removeEffect
removeEffect(effectOrPosition)
Description
Function to remove an effect from a bus. You can use getBus or findBusses to define the bus that contains the effect. The effect to be removed is determined by its Effect object or its position. You can use getEffect or findEffects to determine the Effect object. The position is the number indexing the effects in the bus.
Available in: Controller.
Arguments
Argument | Description | Value Type |
---|---|---|
insertOrPosition | The Effect object or the position of the effect to be removed. | Effect or number |
Example
-- Remove all effects from the program.
busses = this.program:findBusses(true)
for i, bus in ipairs(busses) do
effects = bus:findEffects(true)
for j, effect in ipairs(effects) do
bus:removeEffect(effect)
end
end
See also: removeBus, removeLayer, removeMidiModule, removeZone, Effect