Thank you for your answer Michael,
Yes saying mesh I meant shell. xGen generates a lot of mesh that it
combines.
I am sure to find the right index. The "mesh_check" function allows you to
select all the indexes of a given shell index. The "Flatten hair" part
makes it possible to overwrite each
When you say "the first mesh", I think you mean the first shell? Your
script only runs on one mesh, but appears to be trying to deal with the
mesh one shell at a time.
Have you confirmed you script is correctly finding the shells? I can't
tell, by reading it. If the polygons are correct for