Best way to solve this?

Hello everyone,

I have this script that draws some random polygons in Blender. These polys can assume any form like, squares, circles, pentagons, etc. but they are all 2d (planes). The script works like a charm, my only problem now is that I need to apply a random texture to all polys and to make things worst it must be UV mapped.

This is an example of what I am trying to do:
http://img230.imageshack.us/img230/9890/f1sb0.th.jpg

Simply applying a texture won’t work, probably because the face UV coords are all messed up.

The only solution I came up is to manually set all faces.uv coords. I think it would probably work but this solution would require me to do many transformations in order to fit the poly coords into the UV space, altought the polys are 2d they can assume in rotation angle so I think it would be a bit trick to get the algorithm running.

My question is: is there an easier way to solve this? :slight_smile:

Thanks,
Canassa