Ported the finding projection vector code to C.
Packing, Scaling the uv maps uses existing C code aswell.
Need your help to check whether I'm freeing memory properly, as I'm not too familiar with C
Ported the code directly from C to Python
Tested using a couple of meshes
a high poly model (286971 polys), old: hangs blender, new: 2.25 seconds
5 suzanne (2500 polys), old: 0.10 seconds, new: 0.013947 seconds
You can test it out by going to editmode -> Smart Uv Project C, I still kept the old one for comparison sake.
Potential backward breaking compatibillity:
After Smart Project Uv C is conducted, the UV selection before the operation is not retained. (The python operator retains the UV selections)
Suzzane unwrap comparison
old (Smart Projection time: 0.16):
{F8709240}
new (Smart Projection time: 0.014):
{F8709241}