@richard said:
@jim said:
The biggest challenge is identifying the geometry for a leaf. My first thought was that if the leaves all have a surface area that is similar, it could make finding them a lot easier - you could find them by area.
Can you post a sample skp of an imported tree?
Maybe we can get you half-way there, if not all the way.
Thanks for responding jim!
I can't load up an onyx tree due to the user agreement, though the same effect would be buy grabbing any SU tree with component leaves and exploding down to base geometry.
I would imagine the script would either search for alike areas or simply alike geometry. The script would only need to locate one similar face and then select all connected and replace!
I would imagine the script wouldn't be so hard to do but could be a great time saver where ever a model contains numerous instances of the same geometry.
My 0.02 of your earth pence worth...
Area might be a good key, you might also want to group connected geometry, find its OBB (oriented bounding box) and then match on that. And of course then you'd have the necessary local transform "for free" too!
The biggest problem is that processing geometry in Ruby is spectacularly slow and if you're going to be using dense geometry you might be waiting a long time.. Oh but you do raytracing don't you, so you're used to that. 
Adam
]