Looking for a material room script



  • I'm pretty sure I saw something, somewhere but I can't find it now. It's a script that collapses all the nodes or tidies them up somehow so they're all visible. I just loaded a material that I want to tweak and the connected nodes are all over the place. I've been scrolling without even getting close.
    I'm on PP2014 and even if I do "collapse to compound node" they're still in their original location.
    Any help would be greatly appreciated.



  • @kalypso I have a script that tidies shader nodes so that they do not overlap. It works under Poser 11, but I will have to check whether it is stable under Poser Pro 2014, as there were major (crashing) bugs related to compound nodes in that version of the app, and I don't remember exactly whether they were fixed in that release.

    ...

    Well, I have PPro2014 10.0.5.30556 and I've just re-discovered that my script is still chock-full of extraneous debugging and logging features from the time when it would crash Poser due to crashing bugs and/or memory leaks in the Poser Python API and relies on a library module which is not ready for release yet, so I'll have to compare it to the version prior to my debugging efforts and see if that can be released.

    Of course, it never crashed on shader trees without compound nodes, only on ones with deeply nested compound nodes, still, I will issue a caveat on it's use in PPro 2014. Save your scene before you run the script!

    URK, tested again and it still crashes PPro2014 10.0.5.30556, so the bug is still there in the SetLocation() method for compound nodes, damn! I'm very sorry, but it just isn't worth it for either of us to release a script that I know will crash your version of Poser. Unless you have a later version, I can guarantee that this script will crash Poser (at the very least on Mac)



  • Check with Andy (structure) and his freebies at Renderosity. I have a script from him for cleaning up the Material Room nodes, but I'm not sure I can release it. Andy is very generous, but I don't want to intrude on that generosity by giving away something he didn't intend to be free.



  • If @structure is unable to come to the party, there is a workaround I was contemplating which was curtailed by the release of Poser 11, which seems to have fixed the PPro 2014 SetLocation() bug, which was to save the material to the library with tidied node locations and then reload it, which avoids the broken python call. I'm confident that will work without crashing PPro2014, so I'll see about getting that completed, if for no other reason than that I see there are actually a great many people who, for various valid reasons, have not yet chosen to upgrade to the latest version of Poser, but who would still appreciate a tidy function in the material room.



  • One particular node setup like you have, I think (this is just a tiny sample of the nodes that go on forever).
    0_1502719310624_TidierBefore.jpg

    And, after Andy's Node Tidier:
    0_1502719379008_TidierAfter.jpg



  • OK, I rudely interrupted Andy on Skype and he said:

    you can give the script to them - but tell them it may not work properly when there are multiple roots

    Andy's NodeTidier python script attached. This is just the script, no runtime structure as I assume you know where to put it. Python\PoserScripts
    https://www.dropbox.com/s/ke316xct52ztwlz/NodeTidier.zip?dl=0



  • @Glitterati3D Thank you Traci, as there are times I want to bang my head on the desk when I see the node setup of some products in the Material Room, even when there aren't dozens of nodes attached. I could never figure out why they are spread all the way to the right, or all the way to the left, when they could all fit nicely in 3 columns. ~shakes head~


  • Poser Ambassadors

    I don't see how that node tidier helps. If you have 200 closed nodes, you're not better off than with 200 open nodes.

    BTW the nodes appear to be from matmatic. The nodes in that shader are already tidy (in the sense that they lined up and were not overlapping). But today they're overlapping because Poser changed - all nodes got taller when they started having an output pin.



  • @Glitterati3D Thank you so much Traci and Structure! This is exactly what I needed.
    @bagginsbill In my case I wanted to re-texture a prop but I don't know how the vendor managed to have the nodes so far away that even after scrolling for 10 minutes and slowly moving the poser surface each time so as not to lose it I still hadn't found the nodes. I would have just done it in a text editor but thankfully Traci came up with the solution.


  • Poser Ambassadors

    Ohh! You had a different problem - node(s) far away for no reason.

    Yes that is bad. And caused by numerous bugs in the material room since compound nodes were added.

    I can see where this script helps then.



  • @bagginsbill I will still put my script out there, when it's ready, as the matmatic layout node overlap and negative x-coordinate jump that occasionally plagues parmatic materials were the original problem it was intended to solve. Mine doesn't mess with collapsing or expanding inputs or previews, just eliminates overlap and shunts the nodes into regularly spaced columns. A GUI might be useful for configuration, eventually, but I wasn't bothered in the first instance, because @bagginsbill 's layout put all the configurable nodes (image maps and parameters) on the one page. Everything else was just calculation, and might, one day, get the compound node treatment to tuck it safely away.

    My tidyer is still coming, but ATM I've just persuaded another script to directly load .DUF poses and props into Poser, without requiring DSON Loader at all. 99% complete, except for materials, of course.



  • @kalypso said in Looking for a material room script:

    @bagginsbill In my case I wanted to re-texture a prop but I don't know how the vendor managed to have the nodes so far away that even after scrolling for 10 minutes and slowly moving the poser surface each time so as not to lose it I still hadn't found the nodes. I would have just done it in a text editor but thankfully Traci came up with the solution.

    I guess my earlier post wasn't clear enough, but this is exactly the reason I'll make good use of this script.



  • You're all welcome. Andy's the genuis, I'm just the hoarder of all things "Andy" when he deletes, removes, loses stuff he gave me. :-)

    Glad I could help.

    Oh and it works fine on multiple roots - just run it twice and it will operate on each root for you.



  • Well I have to say that I often ran into similar problems (nodes positioned in the orbit of Uranus), and for these cases this script is the next best invention since sliced bread ;D
    It's in my "Python Scripts" widget now because there's nearly no texture provided which I don't edit, or at least review.

    Thank you for solving at least one of my headaches!

    Karina



  • @Glitterati3D said in Looking for a material room script:

    You're all welcome. Andy's the genuis, I'm just the hoarder of all things "Andy" when he deletes, removes, loses stuff he gave me. :-)

    Glad I could help.

    Oh and it works fine on multiple roots - just run it twice and it will operate on each root for you.

    Well I haven't tried the multiple roots yet, but all I did was select the Body of my character in the Hierarchy chart and it worked on every one of the mat zones. WOW!!

    Thanks again Traci, I'm loving this. ~wide grin~



  • @Miss-B Yeah, it's good stuff. I complain about something in Poser to Andy and he writes a script to fix it! He has his own folder on my Scripts Menu and makes my life so much easier in Poser.



  • Yay I knew I had seen this some where.
    I got a mess that makes a plate of spaghetti look neat lol and I want to tide things up before I pack it all up