Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt
Panel
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

insertOrPositionThe Element object or the position of the effect to be removed.Effect or number

Example

Code Block
-- remove all effects from the program

busses = this.program:findBusses(true) 	-- find all busses in the program

for i, bus in ipairs(busses) do
    effects = bus:findEffects(true) 	-- find all effects of the bus
	for j, effect in ipairs(effects) do
		bus:removeEffect(effect) 		-- and remove them
	end
end

...