Code:
local skipframes = {}
skipframes["MinimapPing"] = true
skipframes["MinimapBackdrop"] = true
local children = {}
function GetChildrenTree(Frame)
if Frame:GetChildren() then
for _,child in pairs({Frame:GetChildren()}) do
if not skipframes[child:GetName()] then
tinsert(children,child);
end
GetChildrenTree(child);
end
end
end
GetChildrenTree(Minimap)
This is a recursive function so it will call itself until it gets all the Minimap children (not just the first level ones).
It will also not add anything found in skipframes instead of adding them
just to remove them again later.