Ok, so I've written an addon that allows me to import an image as a plane, and then subdivides that plane based on the dimensions of the image. Now though, I need the script to select all of the subdivided faces that are transparent (the alpha pixels of the imported texture) and delete them.
Deleting the faces once they are selected is obviously very simple, but unfortunately it seems that due to the fact that all of the faces are using the same material identifying the transparent faces isn't quite as simple. Does anyone have any advice?
If it helps, this is what I am trying to accomplish (ignoring the bad UVs for now):

As you can see I need to get rid of the transparent faces before extruding. Thanks in advance!

