Fix #30638 and part of #30646.

Problem was that area calculation of polygons was done relative to the xy plane, and with a very obscure (to me at least) algorithm. That meant that vertical ngons would get 0 area. 

Commented initial code in case this is a strange optimization case that someone wants to use and used a cleaner algorithm: first project vertices to the ngon plane, defined by the normal of the ngon and the center (mean) of the ngon vertices. This will only be exact for convex and mostly planar ngons, still it is much better than the previous code.

Also fixed memory leak when stretch display was on.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45141 954f8c5b-7b00-dc11-b283-0030488c597c
Comment out the projection to ngon normal plane when calculating ngon area. This is hardly worth the cost since we use an approximation anyway.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45142 954f8c5b-7b00-dc11-b283-0030488c597c
fix #30668 and the rest of #30638.

Port angle stretch code for uvs to bmesh.

Also added comment to clarify previous commit.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45143 954f8c5b-7b00-dc11-b283-0030488c597c
Patch: [#30652] Influence slider for Lattice Modifier

* This patch adds a influence slider for the lattice modifier, which affects the strength of the deformation. 

Patch by Patrick Boelens (senshi), thanks a lot! 

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45144 954f8c5b-7b00-dc11-b283-0030488c597c
style cleanup: add braces around checks - 'if ELEM() {...}', confuses some parsers that done expand macros.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45145 954f8c5b-7b00-dc11-b283-0030488c597c
style cleanup: dont use 'else for' for extended blocks of code (quite confusing)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45146 954f8c5b-7b00-dc11-b283-0030488c597c
Code style cleaup for motion-tracking modules.
Should be no functional changes.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45147 954f8c5b-7b00-dc11-b283-0030488c597c
style cleanup: mostly whitespace around operators


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45148 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#30672] Mesh menu duplicity

own fault - added this before desolve menu existed.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45149 954f8c5b-7b00-dc11-b283-0030488c597c
rename lattice influence to strength from r45144 (other deform modifiers call it strength too)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45150 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#30657] New UV layers created with Mesh.uv_textures.new reset previous ones.

adding UV's from python was resetting the active UV layer but not setting the new layer to active, resetting existing UV's.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45151 954f8c5b-7b00-dc11-b283-0030488c597c
style cleanup: editors/mesh - mostly whitespace around operators


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45152 954f8c5b-7b00-dc11-b283-0030488c597c
setting the active texture layer from python would get the UV layer out of sync. (entering editmode would show the wrong UV layer)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45153 954f8c5b-7b00-dc11-b283-0030488c597c
disallow adding tessfaces to a mesh with polygons (only allowed case is creating a new mesh with tessfaces and later converting to polygons, which wont work if polygons exist)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45154 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#30658] existing uv mesh coordinates not copied to new created uv map


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45155 954f8c5b-7b00-dc11-b283-0030488c597c
Minor fixes to recent new UI messages.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45156 954f8c5b-7b00-dc11-b283-0030488c597c
style cleanup: python api


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45157 954f8c5b-7b00-dc11-b283-0030488c597c
fix for possible crash using freed ObCenter pointer when loaing a blend file without loading the UI.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45158 954f8c5b-7b00-dc11-b283-0030488c597c
Setup tracking scene works again now

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45159 954f8c5b-7b00-dc11-b283-0030488c597c
fix for possible crash - freed scene was being used for render result lookup when 'Load UI' was disabled.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@45160 954f8c5b-7b00-dc11-b283-0030488c597c