[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60794] trunk/blender/source/blender/bmesh : beautify: passing edge/face flags as arguments

Dalai Felinto dfelinto at gmail.com
Wed Oct 16 05:24:50 CEST 2013


Revision: 60794
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60794
Author:   dfelinto
Date:     2013-10-16 03:24:50 +0000 (Wed, 16 Oct 2013)
Log Message:
-----------
beautify: passing edge/face flags as arguments
no functional change, just preparing the ground for the beautify in
triangulate modifier changes.

Modified Paths:
--------------
    trunk/blender/source/blender/bmesh/operators/bmo_beautify.c
    trunk/blender/source/blender/bmesh/tools/bmesh_beautify.c
    trunk/blender/source/blender/bmesh/tools/bmesh_beautify.h

Modified: trunk/blender/source/blender/bmesh/operators/bmo_beautify.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_beautify.c	2013-10-16 03:24:38 UTC (rev 60793)
+++ trunk/blender/source/blender/bmesh/operators/bmo_beautify.c	2013-10-16 03:24:50 UTC (rev 60794)
@@ -79,7 +79,7 @@
 	}
 	bm->elem_index_dirty |= BM_EDGE;
 
-	BM_mesh_beautify_fill(bm, edge_array, edge_array_len, flag, method);
+	BM_mesh_beautify_fill(bm, edge_array, edge_array_len, flag, method, ELE_NEW, FACE_MARK | ELE_NEW);
 
 	MEM_freeN(edge_array);
 

Modified: trunk/blender/source/blender/bmesh/tools/bmesh_beautify.c
===================================================================
--- trunk/blender/source/blender/bmesh/tools/bmesh_beautify.c	2013-10-16 03:24:38 UTC (rev 60793)
+++ trunk/blender/source/blender/bmesh/tools/bmesh_beautify.c	2013-10-16 03:24:50 UTC (rev 60794)
@@ -357,7 +357,8 @@
  * have their index values set according to their position in the array.
  */
 void BM_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_len,
-                                  const short flag, const short method)
+                                  const short flag, const short method,
+                                  const short oflag_edge, const short oflag_face)
 {
 	Heap *eheap;             /* edge heap */
 	HeapNode **eheap_table;  /* edge index aligned table pointing to the eheap */
@@ -416,9 +417,12 @@
 			bm_edge_update_beauty_cost(e, eheap, eheap_table, edge_state_arr, flag, method);
 
 			/* update flags */
-			BMO_elem_flag_enable(bm, e, ELE_NEW);
-			BMO_elem_flag_enable(bm, e->l->f, FACE_MARK | ELE_NEW);
-			BMO_elem_flag_enable(bm, e->l->radial_next->f, FACE_MARK | ELE_NEW);
+			if (oflag_edge)
+				BMO_elem_flag_enable(bm, e, oflag_edge);
+			if (oflag_face) {
+				BMO_elem_flag_enable(bm, e->l->f, oflag_face);
+				BMO_elem_flag_enable(bm, e->l->radial_next->f, oflag_face);
+			}
 		}
 	}
 

Modified: trunk/blender/source/blender/bmesh/tools/bmesh_beautify.h
===================================================================
--- trunk/blender/source/blender/bmesh/tools/bmesh_beautify.h	2013-10-16 03:24:38 UTC (rev 60793)
+++ trunk/blender/source/blender/bmesh/tools/bmesh_beautify.h	2013-10-16 03:24:50 UTC (rev 60794)
@@ -32,6 +32,7 @@
 };
 
 void BM_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_len,
-                           const short flag, const short method);
+                           const short flag, const short method,
+                           const short oflag_edge, const short oflag_face);
 
 #endif /* __BMESH_BEAUTIFY_H__ */




More information about the Bf-blender-cvs mailing list