figura-skin/scripts/libs/utils.lua
reidlab d1809b35ee
init (again)
i accidentally [doxxed myself](https://github.com/JannisX11/blockbench/issues/1322), thanks blockbench!
2025-03-15 15:35:15 -07:00

17 lines
405 B
Lua

local module = {}
--- @param model ModelPart
--- @param func fun(model: ModelPart)
function module.forEachNonGroup(model, func)
if model:getType() == "GROUP" then
for _, child in pairs(model:getChildren()) do
module.forEachNonGroup(child, func)
end
end
if model:getType() == "CUBE" or model:getType() == "MESH" then
func(model)
end
end
return module