[Bf-blender-cvs] [b54793e] master: Editmesh: remove redundant normal calculation call for subdivide

Campbell Barton noreply at git.blender.org
Sat Jun 14 10:44:59 CEST 2014


Commit: b54793ef0265e5a93678e0f900948a17669185a9
Author: Campbell Barton
Date:   Sat Jun 14 17:55:07 2014 +1000
https://developer.blender.org/rBb54793ef0265e5a93678e0f900948a17669185a9

Editmesh: remove redundant normal calculation call for subdivide

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

M	source/blender/bmesh/operators/bmo_subdivide.c

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

diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c
index 0730c28..4bc07c8 100644
--- a/source/blender/bmesh/operators/bmo_subdivide.c
+++ b/source/blender/bmesh/operators/bmo_subdivide.c
@@ -165,14 +165,11 @@ static BMEdge *connect_smallest_face(BMesh *bm, BMVert *v_a, BMVert *v_b, BMFace
 static void alter_co(BMVert *v, BMEdge *UNUSED(origed), const SubDParams *params, float perc,
                      BMVert *vsta, BMVert *vend)
 {
-	float tvec[3], prev_co[3], fac;
+	float tvec[3], fac;
 	float *co = BM_ELEM_CD_GET_VOID_P(v, params->shape_info.cd_vert_shape_offset_tmp);
 	int i;
-	
-	BM_vert_normal_update_all(v);
 
 	copy_v3_v3(co, v->co);
-	copy_v3_v3(prev_co, co);
 
 	if (UNLIKELY(params->use_sphere)) { /* subdivide sphere */
 		normalize_v3(co);
@@ -236,7 +233,7 @@ static void alter_co(BMVert *v, BMEdge *UNUSED(origed), const SubDParams *params
 	 * this by getting the normals and coords for each shape key and
 	 * re-calculate the smooth value for each but this is quite involved.
 	 * for now its ok to simply apply the difference IMHO - campbell */
-	sub_v3_v3v3(tvec, prev_co, co);
+	sub_v3_v3v3(tvec, v->co, co);
 
 	if (params->shape_info.totlayer > 1) {
 		/* skip the last layer since its the temp */




More information about the Bf-blender-cvs mailing list