Page 1 of 3 123 LastLast
Results 1 to 15 of 31

Thread: Delete several layers at once?

  1. #1
    Intermediate User Shloime's Avatar
    Join Date
    Sep 2003
    Location
    Germany
    Posts
    154

    Delete several layers at once?

    Hi,

    I just received a bunch of models. Lots of them have unused layers in between, and after arranging the layer contents to my liking, I end up with even more empty layers (sometimes literally more than 100).
    Is there a tool to check lots of layers and delete them with one click?
    The built in "delete layer" just takes one layer at a time, and even in OD-Tools I didn't find a solution?
    There is an old lscript, something like "Kens layer tools(?)", but it messed up the models instead of cleaning them.
    Flattening empty layers doesn't work either.

    Any ideas or well known secrets which would lead to a face palm on my side?

    I'm still on 2018, so if there is a new tool in 2020, I can't reach it yet.
    Greetings, Shloime
    ----------------------------
    Win10 64, Ryzen 5 1600x, GTX 980 ti, 64 GB, LW 2018

  2. #2

  3. #3
    Intermediate User Shloime's Avatar
    Join Date
    Sep 2003
    Location
    Germany
    Posts
    154
    Vielen Dank PeT, diesen Thread hatte ich leider schon gefunden und dieses Script (Kevman, nicht Ken) funktioniert nur mittelmäßig bei mir.

    For all the non german speakers
    Thank you PeT, but I found this thread already and those scripts (it was Kevman, not Ken) don't work as I would expect.
    They leave layers behind and sometimes corrupt others...

    OD-Tools' Layer Panel Pro can only delete the names of the layers, not the layers themselves.
    Greetings, Shloime
    ----------------------------
    Win10 64, Ryzen 5 1600x, GTX 980 ti, 64 GB, LW 2018

  4. #4
    Registered User
    Join Date
    Sep 2015
    Location
    Sweden
    Posts
    799
    Can’t you just forground all the layers you want to delete and press delete?

  5. #5
    Intermediate User Shloime's Avatar
    Join Date
    Sep 2003
    Location
    Germany
    Posts
    154
    Of course I could, but it's about empty layers.
    Imagine this: Some data on layer 1, some on layer 15 and some on layer 33. In between lots of empty layers. In my case it is not only 3 layers with data, but 20, with many empty layers in between.
    So I want to select all the empty layers and delete them with one click, so layer 15 (in my example9 becomes layer 2, instead of doing the cut and paste routine several times to accumulate all my layers with data on top.
    Greetings, Shloime
    ----------------------------
    Win10 64, Ryzen 5 1600x, GTX 980 ti, 64 GB, LW 2018

  6. #6
    try the brutal workflow :

    1 - Collapse Object
    2 - Connected to Layers

    8-)
    Last edited by PeT; 06-18-2020 at 10:00 AM.

  7. #7
    Registered User
    Join Date
    Sep 2015
    Location
    Sweden
    Posts
    799
    Quote Originally Posted by Shloime View Post
    Of course I could, but it's about empty layers.
    Imagine this: Some data on layer 1, some on layer 15 and some on layer 33. In between lots of empty layers. In my case it is not only 3 layers with data, but 20, with many empty layers in between.
    So I want to select all the empty layers and delete them with one click, so layer 15 (in my example9 becomes layer 2, instead of doing the cut and paste routine several times to accumulate all my layers with data on top.
    Ah, ok. I misunderstood what you wanted to do. An object layer cleanup script would be nice.

  8. #8
    Intermediate User Shloime's Avatar
    Join Date
    Sep 2003
    Location
    Germany
    Posts
    154
    @ PeT: Interesting idea... but sadly, on second thought, lots of pieces in those models are on one layer, but not connected. Those are vehicles, and the guy who made them modeled a LOT of screws and bolts and didn't boolean them into the hull, so I would end up with even more layers, one for each nut and bolt.

    @hypersuperduper: Yes. I am not fluent in lscript or python, but it shouldn't be too hard to create a script which steps through all the layers, looks for data, and if not, deletes the layer... maybe I need to learn python.
    Greetings, Shloime
    ----------------------------
    Win10 64, Ryzen 5 1600x, GTX 980 ti, 64 GB, LW 2018

  9. #9
    Registered User
    Join Date
    Sep 2015
    Location
    Sweden
    Posts
    799
    Quote Originally Posted by Shloime View Post
    @ PeT: Interesting idea... but sadly, on second thought, lots of pieces in those models are on one layer, but not connected. Those are vehicles, and the guy who made them modeled a LOT of screws and bolts and didn't boolean them into the hull, so I would end up with even more layers, one for each nut and bolt.

    @hypersuperduper: Yes. I am not fluent in lscript or python, but it shouldn't be too hard to create a script which steps through all the layers, looks for data, and if not, deletes the layer... maybe I need to learn python.
    I have done a number of layout lscripts, but none in modeler. And none in python. But it certainly seems like a relatively simple task to automate.

  10. #10

    there is this one, just follow it by hitting Del to delete the layers




    LW needs to step up the game when it comes to editing layers.
    Last edited by erikals; 06-18-2020 at 01:29 PM.
    LW vidz   DPont donate   LW Facebook   IKBooster   My vidz

  11. #11
    Registered User
    Join Date
    Sep 2015
    Location
    Sweden
    Posts
    799
    Quote Originally Posted by erikals View Post
    there is this one, just follow it by hitting Del to delete the layers




    LW needs to step up the game when it comes to editing layers.
    That is for sure. Everything layer related is incredibly clunky, unless you use layer hierarchies in which case it is less clunky but unacceptably buggy. They really ought to rethink layer management entirely.

  12. #12

    clunky
    yep.

    LW vidz   DPont donate   LW Facebook   IKBooster   My vidz

  13. #13
    Curmudgeon in Training Ma3rk's Avatar
    Join Date
    Mar 2003
    Location
    Near Beaverton, OR
    Posts
    1,948
    Quote Originally Posted by Shloime View Post
    Hi,

    I just received a bunch of models. Lots of them have unused layers in between, and after arranging the layer contents to my liking, I end up with even more empty layers (sometimes literally more than 100).
    Is there a tool to check lots of layers and delete them with one click?
    The built in "delete layer" just takes one layer at a time, and even in OD-Tools I didn't find a solution?
    There is an old lscript, something like "Kens layer tools(?)", but it messed up the models instead of cleaning them.
    Flattening empty layers doesn't work either.

    Any ideas or well known secrets which would lead to a face palm on my side?

    I'm still on 2018, so if there is a new tool in 2020, I can't reach it yet.
    Coming in on this late, but are your objects LWO's or OBJ's?

    If OBJ's, there's an option in Modeler for One Object in the OBJ tab. That should really get presented when you open an OBJ, but...

    If the object needs to be a single layer & option is unchecked, Modeler will crash. Unchecked, you will get separate layers if the model was set up that way to begin with, which is a good thing in most cases.
    Earth can't be flat otherwise cats would have pushed everything off the edge!

    The Big Apexx System:
    AMD RYZEN THREADRIPPER 2990WX Processor (3.00GHz)
    64GB
    2x NVIDIA Quadro RTX 4000 8GB 32 Core

  14. #14
    Registered User Rayek's Avatar
    Join Date
    Feb 2006
    Location
    Vancouver, BC
    Posts
    1,585
    You could try Accutrans: load the LWO object, and remove the empty layers: Layers-->Remove Empty Layers.

    Or use the "Merge all layers" command (found in the Tools_1 menu). Then save as LWO, and open in Modeler.

    Accutrans is free for 30 days. But if this saves you time, please consider supporting the developer!

    http://www.micromouse.ca/
    Win10 64 - i7 [email protected], p6t Deluxe v1, 48gb, Nvidia GTX 1080 8GB, Revodrive X2 240gb, e-mu 1820. Screens: 2 x Samsung s27a850ds 2560x1440, HP 1920x1200 in portrait mode

  15. #15
    Intermediate User Shloime's Avatar
    Join Date
    Sep 2003
    Location
    Germany
    Posts
    154
    OK, next level of explanation:
    Models are from Turbosquid, military vehicles (search for "SA-6" for example). They are built originally in 3DSMax, and then converted to lwo. The artist made the models highly animateable, so every wheel, every missile, radar, even the wings of the missiles are on seperate layers. Most of the models have additional empty layers in between.
    For my purposes I need only two or three parts to be animated, like the radar dish. The model will never be shown in a driving state, so I cut and paste all wheels and stuff into layer 1 together with the chassis. Now I have like 15 layers empty, and then from layer 16 the radar stuff starts. I copy all 10 parts of the radar together, Now it's the missiles turn and so on. By doing this I end up with a few layers with components in them and lots of unused layers in between. And that's what I want. To still keep the 4 or 5 remaining occupied layers on top of the layer list and get rid of all the empty layers in between.
    I could cut and past everything to the first few layers by hand, but some models have about 450 layers, and that would be a lot of scrolling in the rather limited layer window of Lightwave. Even OD-Tools Layer Panel Pro is not of much help with this problem.

    @Rayek: I noticed Accutrans was updated recently. It sounds like a good solution for my problem. Will Accutrans also save all node setups in the surfaces?
    Greetings, Shloime
    ----------------------------
    Win10 64, Ryzen 5 1600x, GTX 980 ti, 64 GB, LW 2018

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •