This commit is contained in:
Reid 2025-03-15 15:28:46 -07:00
commit cd8cc594ec
Signed by: reidlab
GPG key ID: 6C9EAA3364F962C8
20 changed files with 2363 additions and 0 deletions

17
scripts/libs/utils.lua Normal file
View file

@ -0,0 +1,17 @@
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