Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-04-12 08:21:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-04-12 10:38:14 +0300
commit690b90f1e2cb949a3cdfb02678be844c4808f2cb (patch)
tree770053fda356cc5792a488ea863bbf7bb6e0c634 /source/blender/editors
parent6d2c3a245622fa836ae603666789970a2f83b1c1 (diff)
BMesh: minor optimization counting adjacent data
add BM_***_count_is_over(), _count_is_equal() Useful if we only want to know if the count is a smaller value.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c6
-rw-r--r--source/blender/editors/mesh/editmesh_select.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index ead243d6de8..45e16ceff7b 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -587,8 +587,8 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
/* if we are ripping a single vertex from 3 faces,
* then measure the distance to the face corner as well as the edge */
- if (BM_vert_face_count(v) == 3 &&
- BM_vert_edge_count(v) == 3)
+ if (BM_vert_face_count_is_equal(v, 3) &&
+ BM_vert_edge_count_is_equal(v, 3))
{
BMEdge *e_all[3];
BMLoop *l_all[3];
@@ -735,7 +735,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve
* but both allocate fill */
/* rip two adjacent edges */
- if (BM_edge_is_boundary(e2) || BM_vert_face_count(v) == 2) {
+ if (BM_edge_is_boundary(e2) || BM_vert_face_count_is_equal(v, 2)) {
/* Don't run the edge split operator in this case */
BMVert *v_rip;
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index c020243c8ff..0c3f69e4996 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -2042,7 +2042,7 @@ bool EDBM_select_interior_faces(BMEditMesh *em)
ok = true;
BM_ITER_ELEM (eed, &eiter, efa, BM_EDGES_OF_FACE) {
- if (BM_edge_face_count(eed) < 3) {
+ if (!BM_edge_face_count_is_over(eed, 2)) {
ok = false;
break;
}
@@ -2938,7 +2938,7 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op)
if ((use_wire && BM_edge_is_wire(e)) ||
(use_boundary && BM_edge_is_boundary(e)) ||
(use_non_contiguous && (BM_edge_is_manifold(e) && !BM_edge_is_contiguous(e))) ||
- (use_multi_face && (BM_edge_face_count(e) > 2)))
+ (use_multi_face && (BM_edge_face_count_is_over(e, 2))))
{
/* check we never select perfect edge (in test above) */
BLI_assert(!(BM_edge_is_manifold(e) && BM_edge_is_contiguous(e)));
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 0db2259b307..5588d1e589e 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -68,7 +68,7 @@
#include <float.h>
#include <math.h>
-// #define DEBUG_TIME
+#define DEBUG_TIME
#ifdef DEBUG_TIME
# include "PIL_time_utildefines.h"