* Title: Delete Empty Layers
* Description:
-- Deletes Empty Layers
Script
By preeti_panchal · Credited author: Preeti Panchal · 2016-08-17
* Title: Delete Empty Layers
* Description:
-- Deletes Empty Layers
This might be more up to date
wobi · 2019-03-21
fn delete_empty_layers =
(
local counter = 0
for id = LayerManager.count - 1 to 1 by -1 do
(
local layer = LayerManager.getLayer id
local contains_nodes = LayerManager.doesLayerHierarchyContainNodes layer.name
if not contains_nodes then
(
local deleted = LayerManager.deleteLayerByName layer.name
if deleted then counter += 1
)
)
return counter
)StormBrig · 2019-03-21
Thanks. This is more clever way for latest version of 3ds max and its "new" layer manager.
jazznazz · 2021-02-14
that worked beautifully!