[Bf-blender-cvs] [243e9be5884] sculpt-dev: Sculpt: disable slow code

Joseph Eagar noreply at git.blender.org
Thu Oct 21 02:30:11 CEST 2021


Commit: 243e9be5884d2c99fc4591d252f156aebe5ab39a
Author: Joseph Eagar
Date:   Wed Oct 20 17:27:34 2021 -0700
Branches: sculpt-dev
https://developer.blender.org/rB243e9be5884d2c99fc4591d252f156aebe5ab39a

Sculpt: disable slow code

How silly of me.  I had left on
some debug code I wrote for edge collapse.
This particular debug code generated a .obj
format string of the local mesh around an edge
before collapsing edges.

What amazes me is that the performance regression
was only about as bad as the original edge collapse
implementation in DynTopo.

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

M	source/blender/bmesh/intern/bmesh_core.c
M	source/blender/editors/sculpt_paint/sculpt_smooth.c

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

diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index ea93901640a..269ade8c089 100644
--- a/source/blender/bmesh/intern/bmesh_core.c
+++ b/source/blender/bmesh/intern/bmesh_core.c
@@ -2512,7 +2512,7 @@ static void trigger_jvke_error(int err, char *obj_text)
   printf("========= ERROR %s============\n\n%s\n\n", get_err_str(err), obj_text);
 }
 
-#if 0
+#if JVKE_DEBUG
 #  define JVKE_CHECK_ELEMENT(elem) \
     { \
       int err = 0; \
@@ -2529,9 +2529,11 @@ BMVert *bmesh_kernel_join_vert_kill_edge(
 {
   BMVert *v_conn = BM_edge_other_vert(e, v_kill);
 
+#ifdef JVKE_DEBUG
   char buf[LOCAL_OBJ_SIZE];
   char *saved_obj = bm_save_local_obj_text(bm, 2, buf, "e", e);
   bm_local_obj_free(saved_obj, buf);
+#endif
 
   BMFace **fs = NULL;
   BMEdge **deles = NULL;
diff --git a/source/blender/editors/sculpt_paint/sculpt_smooth.c b/source/blender/editors/sculpt_paint/sculpt_smooth.c
index 8ec9570536b..768de0b917c 100644
--- a/source/blender/editors/sculpt_paint/sculpt_smooth.c
+++ b/source/blender/editors/sculpt_paint/sculpt_smooth.c
@@ -1536,8 +1536,6 @@ void SCULPT_smooth(Sculpt *sd,
     }
   }
 
-  nodes = nodes ? MEM_dupallocN(nodes) : NULL;
-
 #ifdef PROXY_ADVANCED
   int datamask = PV_CO | PV_NEIGHBORS | PV_NO | PV_INDEX | PV_MASK;
   BKE_pbvh_ensure_proxyarrays(ss, ss->pbvh, nodes, totnode, datamask);



More information about the Bf-blender-cvs mailing list