jackb602
10-22-2009, 07:29 PM
I'm trying to create an Xpresso expression tag that will:
Iterate through every object in a scene
For each polygon object, get the polygon count
Append the polygon count for each object to its name (i.e. "Chair" becomes "02485 Chair")
Arrange the objects in the object manager from highest to lowest polygon count
I plan to iterate through every object in the scene using a hierarchy node. Is there a way for Xpresso to check what type of object it is dealing with? For example, getting the polygon count of a Null Object returns an error.
Another question I have is how to force a number or string to include leading zeros. A simple cube with six polys for example, should be renamed "00006 Cube" or something similar.
Finally, can Xpresso be used to rearrange objects in the object manager? The easiest solution would be to sort the objects alphabetically, which is where the leading zeros become important.
Jack
Iterate through every object in a scene
For each polygon object, get the polygon count
Append the polygon count for each object to its name (i.e. "Chair" becomes "02485 Chair")
Arrange the objects in the object manager from highest to lowest polygon count
I plan to iterate through every object in the scene using a hierarchy node. Is there a way for Xpresso to check what type of object it is dealing with? For example, getting the polygon count of a Null Object returns an error.
Another question I have is how to force a number or string to include leading zeros. A simple cube with six polys for example, should be renamed "00006 Cube" or something similar.
Finally, can Xpresso be used to rearrange objects in the object manager? The easiest solution would be to sort the objects alphabetically, which is where the leading zeros become important.
Jack
