Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2012-03-25 23:02:28 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-03-25 23:02:28 +0400
commiteb104023650f3e67c80f889df61060acc2c09123 (patch)
tree5685dbc46114fe8ec7756ea650f9324e58b2bc05 /source/blender/editors/uvedit/uvedit_draw.c
parent337be23cea3aac29a41c571fa345380c8a0fa404 (diff)
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.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_draw.c')
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 6767d543c5e..176c64439a7 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -422,6 +422,9 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
#endif
}
}
+
+ BLI_array_free(tf_uv);
+ BLI_array_free(tf_uvorig);
}
static void draw_uvs_other(Scene *scene, Object *obedit, Image *curimage)