Advertisement
Guest User

Delete empty

a guest
May 7th, 2014
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. deleteThese = #()
  2. for i = 0 to layerManager.count-1 do
  3. (
  4. ilayer = layerManager.getLayer i
  5. nodes = ilayer.nodes &theNodes
  6. if ( theNodes.count == 0) do (
  7. if (ilayer.name != "0") do (
  8. if (ilayer.current) do (
  9. default = LayerManager.getLayerFromName "0"
  10. default.current = true
  11. )
  12. append deleteThese ilayer.name
  13. )
  14. )
  15. )
  16. for layer in deleteThese do (
  17. layerManager.deleteLayerByName layer
  18. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement