Results 1 to 12 of 12

Thread: Is there a script that can export an object list?

  1. #1
    da what? daforum's Avatar
    Join Date
    May 2006
    Location
    Bristol, England
    Posts
    1,635

    Is there a script that can export an object list?

    Is there a script anyone knows of that can export an object list from Layout, as a text file for example?

    Would be a great help as the current scenes i'm working on have a lot of objects in it.

    Thanks
    Montage Reel, Portfolio, PIN_01, Prime......«« go on, click on a link!

  2. #2
    Valiant NewTeKnight Matt's Avatar
    Join Date
    Feb 2003
    Location
    San Antonio, Texas, USA
    Posts
    13,044
    Have you checked the obvious sites:

    http://www.lwplugindb.com/

    http://www.flay.com/

    Failing that, it should be easy to knock up, might take a look at it for you.
    UI Designer @ NewTek
    __________________________________________________
    www.pixsim.co.uk : LightWave Video Tutorials & Tools


  3. #3
    I modified one of my export tool scripts to save a list However the question is what exactly you want it to list. A list of lwo files in the scene? If so, how should it handle lwo layer items?

  4. #4
    da what? daforum's Avatar
    Join Date
    May 2006
    Location
    Bristol, England
    Posts
    1,635
    Quote Originally Posted by Matt View Post
    Have you checked the obvious sites:

    http://www.lwplugindb.com/

    http://www.flay.com/

    Failing that, it should be easy to knock up, might take a look at it for you.
    Thanks Matt for offering to do this I have checked around and couldn't find anything.

    Quote Originally Posted by Myagi View Post
    I modified one of my export tool scripts to save a list However the question is what exactly you want it to list. A list of lwo files in the scene? If so, how should it handle lwo layer items?
    Yes, a really simple script that just lists objects as they are listed in Layout, all names the same even if layered objects are un-named in the scene from modeler.
    Montage Reel, Portfolio, PIN_01, Prime......«« go on, click on a link!

  5. #5
    Not sure I understood exactly what you want.

    Do you want the lwo file names (with full path), like:

    C:\blah\object.lwo


    or the object names as displayed in Layout's object list:

    SomeObject
    AnotherObject:Layer2


    The former also also poses some issues that it doesn't specify a layer and a single lwo might appear multiple times (for clones or two different layers of the same object). Issues that could be worked around, but unecessary if all you want is the Layout name.

    I'm attaching a first draft that just lists lwo files (duplicates possible) without additional handling, alternatively you can comment/uncomment the lines that save the names to convert it to saving object names. In case you you needed something more elaborate I'll see if it's easy to add.


    edit: updated attachement
    Attached Files Attached Files
    Last edited by Myagi; 07-15-2010 at 01:16 PM.

  6. #6
    da what? daforum's Avatar
    Join Date
    May 2006
    Location
    Bristol, England
    Posts
    1,635
    Myagi, thank you so much for the script. I have tried it out and it works very well.

    I would like to use a version of the script as you suggest that just has the object names as displayed in Layout's object list:

    SomeObject
    AnotherObject:Layer2


    as this seems a simpler way to see the objects as a list. It gets a bit confusing when a single lwo appears multiple times; and Nulls are also not necessary to appear in the list.

    It is very kind of you to do this, and at this point I wish I knew more about how to compile scripts so I could do the same for you.
    Many thanks.
    Montage Reel, Portfolio, PIN_01, Prime......«« go on, click on a link!

  7. #7
    If you open the script in a text editor you'll see this on line 65 and 66

    Code:
    //listFile.writeln(mesh.name);
    listFile.writeln(mesh.filename);
    if you change that to

    Code:
    listFile.writeln(mesh.name);
    //listFile.writeln(mesh.filename);
    (ie. uncommenting line 65 and commenting out line 66)

    it willl list names instead of lwo filenames.


    I don't think nulls are listed right now, or? The intent was to only list mesh(/lwo) objects. no cameras, lights etc.

    edit: I guess nulls are also Mesh objects. I'll add a check for that.
    Last edited by Myagi; 07-15-2010 at 01:12 PM.

  8. #8
    Updated the script in the post above, also changed it to save object names instead, while I was at it.

  9. #9
    da what? daforum's Avatar
    Join Date
    May 2006
    Location
    Bristol, England
    Posts
    1,635
    I tried the updated version and it's just what I needed. It works so well and just lists the objects and layer number.

    I may still use the other version though from time-to-time as I have objects in sub-folders within my object directory, and the 1st version of the script will help me to locate any I can't find straight away.

    I hope other LW users find this script, as you have helped the community and not just me.

    Thank you so much
    Last edited by daforum; 07-15-2010 at 05:10 PM.
    Montage Reel, Portfolio, PIN_01, Prime......«« go on, click on a link!

  10. #10
    Valiant NewTeKnight Matt's Avatar
    Join Date
    Feb 2003
    Location
    San Antonio, Texas, USA
    Posts
    13,044
    Thanks Myagi, saved me a job!

    I did make a little tweak though, hope you don't mind.

    To make it a little more helpful with typing the file name, I made the script put the 'scene name' + "-Object_List.txt" in the file save dialog.
    Attached Files Attached Files
    UI Designer @ NewTek
    __________________________________________________
    www.pixsim.co.uk : LightWave Video Tutorials & Tools


  11. #11
    Quote Originally Posted by Matt View Post
    I did make a little tweak though, hope you don't mind.
    Not at all, that's the idea otherwise I would have made it an .lsc

  12. #12
    da what? daforum's Avatar
    Join Date
    May 2006
    Location
    Bristol, England
    Posts
    1,635
    Thank you both for a great script. Now that it can automatically add scene name + -Object_List.txt in the file save dialog is a great addition to an already very useful script.

    Thanks again
    Montage Reel, Portfolio, PIN_01, Prime......«« go on, click on a link!

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
  •