[Bf-blender-cvs] [98ad7c2] master: Blender-Internal: avoid redundant area check

Campbell Barton noreply at git.blender.org
Tue Jan 13 09:10:53 CET 2015


Commit: 98ad7c21c0b9c1fe95088fe2443234d665bebcf6
Author: Campbell Barton
Date:   Tue Jan 13 19:08:08 2015 +1100
Branches: master
https://developer.blender.org/rB98ad7c21c0b9c1fe95088fe2443234d665bebcf6

Blender-Internal: avoid redundant area check

===================================================================

M	source/blender/render/intern/source/convertblender.c

===================================================================

diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index c7170cf..35878f6 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -2721,12 +2721,13 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
 						vlr->v4= NULL;
 
 						/* to prevent float accuracy issues, we calculate normal in local object space (not world) */
-						if (area_tri_v3(co3, co2, co1)>FLT_EPSILON) {
-							if (negative_scale)
-								normal_tri_v3(tmp, co1, co2, co3);
-							else
-								normal_tri_v3(tmp, co3, co2, co1);
-							add_v3_v3(n, tmp);
+						if (normal_tri_v3(tmp, co1, co2, co3) > FLT_EPSILON) {
+							if (negative_scale == false) {
+								add_v3_v3(n, tmp);
+							}
+							else {
+								sub_v3_v3(n, tmp);
+							}
 						}
 
 						vlr->mat= matar[ dl->col ];




More information about the Bf-blender-cvs mailing list