Wednesday, July 3, 2019

Some usefull Max scripts

function CleanUpLayers=
    (
        /*
            set the (default) layer as the current one and delete all empty layers
        */

        local nLayers = LayerManager.Count
        local defaultLayer = LayerManager.GetLayer(0)
        defaultLayer.current = true

        local layers = #()
        for i= 1 to nLayers do append layers (LayerManager.GetLayer(i-1))

        for layer in layers do
        (
            layer.nodes &nodes
           
            if ( layer.name != "0" and nodes.count == 0 ) then
                LayerManager.deleteLayerByName layer.name
        ) 
    )

3D Printing and Dungeons & Dragons

 Wow, it has been almost 3 years since I posted here... must be the age. ( or corona ) Next year I'll be getting 50 years old. Too old y...