KeyShot Forum

Technical discussions => Extending KeyShot => Scripting => Topic started by: nicktrick92 on July 27, 2016, 02:45:06 PM

Title: Getting Nodes In Order
Post by: nicktrick92 on July 27, 2016, 02:45:06 PM
Hey guys, I'm really stumped on this one! So I basically have a model with 4 nodes which are named the same... Ex:
+ fwa738-1200-b5-j
    + fwa738-1200-b5-j
    + fwa738-1200-b5-j
    + fwa738-1200-b5-j

When I use the line of code for node in root.find(): to get all the nodes in the project, it always seems to get them in a different order... Sometimes it goes from top to bottom, sometimes the opposite way, but most of the time just randomly. This is extremely hard when trying to get an ordered list by node of the materials used on the layers. Is there a way so that each time that lie of code runs it will go from top to bottom, listing all the nodes?

Thanks,

-Nick