Results 1 to 6 of 6

Thread: Is there any way to get a text list of all objects in a scene?

  1. #1
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,154

    Is there any way to get a text list of all objects in a scene?

    I am looking for a way to render each object in a scene by its self and have each rendered file named the same as the object. I don't think there is any way to do that but is there a way to save a text list of all the objects in a scene? That way I could at least copy an paste the names instead of having to type each name which is prone to errors.

  2. #2
    Founding member raymondtrace's Avatar
    Join Date
    May 2003
    Location
    Ohio
    Posts
    1,107
    For separate rendering, take a look at Mike Green's LayersMC (http://www.mikegreen.name/) or Oliver Hotz' UberPass (https://origamidigital.com/cart/inde...&product_id=63)

    To get a list of objects in a scene, I'd just crack open the LWS file in a good text editor, maybe with regex support.
    LW4, 7.5D, 2015, 2018, 2019, 2020 running portably on a USB drive on an Amiga 2500 running Wine.

  3. #3
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,154
    Quote Originally Posted by raymondtrace View Post
    To get a list of objects in a scene, I'd just crack open the LWS file in a good text editor, maybe with regex support.
    I tried that. But I found that object layer names are not stored in a scene file.

  4. #4
    maybe this will help you... https://vimeo.com/265588333
    Oliver

    OD Tools Purchase Link: http://origamidigital.com/cart
    Vimeo Channel: https://vimeo.com/channels/850417
    Join ODRoot - https://www.odroot.com

  5. #5
    Scripting is required for specific case scenarios like this. You can get the names of every object like so:

    Code:
    import lwsdk
    
    AllSceneItemsNames = []
    Object = lwsdk.LWItemInfo().first(lwsdk.LWI_OBJECT, lwsdk.LWITEM_NULL)
    while(Object):
    	AllSceneItemsNames.append(lwsdk.LWItemInfo().name(Object))
    	Object = lwsdk.LWItemInfo().next(Object)
    
    print AllSceneItemsNames
    Save this code into a file named "something.py", and you can run it from lightwave. The list of objects will appear in the Lightwave python console.

    Doing something with that information requires just a little more know-how, scripting will pay back the time you invest into it.
    Last edited by Ryan Roye; 10-15-2019 at 06:10 AM.
    Professional-level 3d training: Ryan's Lightwave Learning
    Plugin Developer: RR Tools for Lightwave

  6. #6
    skeptic lertola2's Avatar
    Join Date
    Dec 2008
    Location
    New York City
    Posts
    1,154
    Quote Originally Posted by Ryan Roye View Post
    Scripting is required for specific case scenarios like this. You can get the names of every object like so:

    Code:
    import lwsdk
    
    AllSceneItemsNames = []
    Object = lwsdk.LWItemInfo().first(lwsdk.LWI_OBJECT, lwsdk.LWITEM_NULL)
    while(Object):
    	AllSceneItemsNames.append(lwsdk.LWItemInfo().name(Object))
    	Object = lwsdk.LWItemInfo().next(Object)
    
    print AllSceneItemsNames
    Save this code into a file named "something.py", and you can run it from lightwave. The list of objects will appear in the Lightwave python console.

    Doing something with that information requires just a little more know-how, scripting will pay back the time you invest into it.
    Wow! Thanks Ryan! That worked. I really appreciate the help.

    -Joe

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
  •