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

removeFromParent()

Description

Function to remove an element in the Program Tree from the parent element. The function can remove elements of the type Layer, Zone, MidiModuleBus and Effect. It can even remove the script module that calls the function.

Available in: Controller.

Example

-- remove the second child element
childs = this.program:findChildren(true)
if childs[2] then
    childs[2]:removeFromParent()
end
-- remove the program bus
bus = this.program:getBus("Program-Bus")
if bus then
    bus:removeFromParent()
end

1 Comment