[Bf-blender-cvs] [33abe49d380] soc-2018-npr: Fixed opti edge flip not nulling corrected face and add sanity opti checks
Sebastian Parborg
noreply at git.blender.org
Thu Aug 9 09:41:56 CEST 2018
Commit: 33abe49d380d61d3073a47fae67f740b6c3f7ad2
Author: Sebastian Parborg
Date: Sun Aug 5 22:20:09 2018 +0200
Branches: soc-2018-npr
https://developer.blender.org/rB33abe49d380d61d3073a47fae67f740b6c3f7ad2
Fixed opti edge flip not nulling corrected face and add sanity opti checks
===================================================================
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 79bc15c9b46..d8d2e64e39c 100644
--- a/source/blender/modifiers/intern/MOD_mybmesh.c
+++ b/source/blender/modifiers/intern/MOD_mybmesh.c
@@ -3062,7 +3062,7 @@ static void optimization( MeshData *m_d ){
if (best_edge != NULL){
printf("Opti filped an edge!\n");
- BM_edge_rotate(m_d->bm, best_edge, true, 0);
+ best_edge = BM_edge_rotate(m_d->bm, best_edge, true, 0);
null_opti_edge(m_d, best_edge, inface->back_f, &inco_faces);
}
@@ -3085,6 +3085,10 @@ static void optimization( MeshData *m_d ){
}
BM_ITER_ELEM (vert, &iter_v, inface->face, BM_VERTS_OF_FACE) {
+ //Do not try to wiggle C verts
+ if (is_C_vert( vert, m_d->C_verts)){
+ continue;
+ }
if( BM_elem_index_get(vert) < m_d->radi_start_idx ){
//Not a radial vert, see if we can dissolve it to improve the consistency
@@ -3245,6 +3249,10 @@ static void optimization( MeshData *m_d ){
}
BM_ITER_ELEM (vert, &iter_v, inface->face, BM_VERTS_OF_FACE) {
+ //Do not try to wiggle C verts
+ if (is_C_vert( vert, m_d->C_verts)){
+ continue;
+ }
BMVert *orig_v = BLI_ghash_lookup(m_d->vert_hash, vert);
if( orig_v != NULL ){
// This vert exists in the original mesh
@@ -3576,6 +3584,11 @@ static void optimization( MeshData *m_d ){
}
BM_ITER_ELEM (vert, &iter_v, inface->face, BM_VERTS_OF_FACE) {
+ //Do not try to wiggle C verts
+ if (is_C_vert( vert, m_d->C_verts)){
+ continue;
+ }
+
BMEdge *edge;
BMIter iter_e;
float old_pos[3];
More information about the Bf-blender-cvs
mailing list