[Bf-blender-cvs] [926f52edf00] master: Sculpt: Cleanup, remove macro re-definition

Sergey Sharybin noreply at git.blender.org
Fri Mar 6 15:52:59 CET 2020


Commit: 926f52edf0079196ea3e70aa9c7fbe327ccc029a
Author: Sergey Sharybin
Date:   Fri Mar 6 15:52:36 2020 +0100
Branches: master
https://developer.blender.org/rB926f52edf0079196ea3e70aa9c7fbe327ccc029a

Sculpt: Cleanup, remove macro re-definition

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

M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_intern.h

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index d4c9859b19b..dcbcdc98ddf 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -589,30 +589,6 @@ void SCULPT_vertex_neighbors_get(SculptSession *ss,
   }
 }
 
-/* Iterator over neighboring vertices. */
-#define sculpt_vertex_neighbors_iter_begin(ss, v_index, neighbor_iterator) \
-  SCULPT_vertex_neighbors_get(ss, v_index, false, &neighbor_iterator); \
-  for (neighbor_iterator.i = 0; neighbor_iterator.i < neighbor_iterator.size; \
-       neighbor_iterator.i++) { \
-    neighbor_iterator.index = ni.neighbors[ni.i];
-
-/* Iterate over neighboring and duplicate vertices (for PBVH_GRIDS). Duplicates come
- * first since they are nearest for floodfill. */
-#define sculpt_vertex_duplicates_and_neighbors_iter_begin(ss, v_index, neighbor_iterator) \
-  SCULPT_vertex_neighbors_get(ss, v_index, true, &neighbor_iterator); \
-  for (neighbor_iterator.i = neighbor_iterator.size - 1; neighbor_iterator.i >= 0; \
-       neighbor_iterator.i--) { \
-    neighbor_iterator.index = ni.neighbors[ni.i]; \
-    neighbor_iterator.is_duplicate = (ni.i >= \
-                                      neighbor_iterator.size - neighbor_iterator.num_duplicates);
-
-#define sculpt_vertex_neighbors_iter_end(neighbor_iterator) \
-  } \
-  if (neighbor_iterator.neighbors != neighbor_iterator.neighbors_fixed) { \
-    MEM_freeN(neighbor_iterator.neighbors); \
-  } \
-  ((void)0)
-
 /* Utils */
 bool SCULPT_check_vertex_pivot_symmetry(const float vco[3], const float pco[3], const char symm)
 {
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index f5bd327a615..e65b7404558 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -111,7 +111,7 @@ void SCULPT_vertex_neighbors_get(struct SculptSession *ss,
 /* Iterate over neighboring and duplicate vertices (for PBVH_GRIDS). Duplicates come
  * first since they are nearest for floodfill. */
 #define sculpt_vertex_duplicates_and_neighbors_iter_begin(ss, v_index, neighbor_iterator) \
-  sculpt_vertex_neighbors_get(ss, v_index, true, &neighbor_iterator); \
+  SCULPT_vertex_neighbors_get(ss, v_index, true, &neighbor_iterator); \
   for (neighbor_iterator.i = neighbor_iterator.size - 1; neighbor_iterator.i >= 0; \
        neighbor_iterator.i--) { \
     neighbor_iterator.index = ni.neighbors[ni.i]; \



More information about the Bf-blender-cvs mailing list