[Bf-blender-cvs] [874b1a38af5] soc-2018-npr: Tweak how potential folds are detected in opti wigg

Sebastian Parborg noreply at git.blender.org
Fri Aug 10 11:14:30 CEST 2018


Commit: 874b1a38af5f5ff3e0217f1c687b286cb8996c23
Author: Sebastian Parborg
Date:   Thu Aug 9 23:24:39 2018 +0200
Branches: soc-2018-npr
https://developer.blender.org/rB874b1a38af5f5ff3e0217f1c687b286cb8996c23

Tweak how potential folds are detected in opti wigg

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

M	source/blender/modifiers/intern/MOD_mybmesh.c

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

diff --git a/source/blender/modifiers/intern/MOD_mybmesh.c b/source/blender/modifiers/intern/MOD_mybmesh.c
index f86bedac34c..c44d6b952f1 100644
--- a/source/blender/modifiers/intern/MOD_mybmesh.c
+++ b/source/blender/modifiers/intern/MOD_mybmesh.c
@@ -3417,7 +3417,7 @@ static void optimization( MeshData *m_d ){
 					int face_count = BM_vert_face_count(vert);
 					int face_idx, vert_idx;
 					int nr_inco_faces = 0;
-					float (*store_2d)[3][3] = BLI_array_alloca(store_2d, face_count);
+					float (*store_2d)[3][2] = BLI_array_alloca(store_2d, face_count);
 					float *face_area = BLI_array_alloca(face_area, face_count);
 					float tot_face_area = 0;
 					float mat[3][3];
@@ -3500,7 +3500,7 @@ static void optimization( MeshData *m_d ){
 								BM_face_calc_center_mean(f, P);
 
 								//Will this new vert pos create a potential fold?
-								if( dot_v3v3( f->no, no ) < 0.5f ){
+								if( dot_v3v3( vert->no, no ) < 0.5f ){
                                 	fold = true;
 									break;
 								}



More information about the Bf-blender-cvs mailing list