[Bf-blender-cvs] [a3625f8798b] temp-trimesh-sculpt: Fix bug caused by accidental insertion of parameter into the wrong function body

Joseph Eagar noreply at git.blender.org
Tue Oct 20 09:50:58 CEST 2020


Commit: a3625f8798b33359ccc0aac9593772a98227929b
Author: Joseph Eagar
Date:   Tue Oct 20 00:50:35 2020 -0700
Branches: temp-trimesh-sculpt
https://developer.blender.org/rBa3625f8798b33359ccc0aac9593772a98227929b

Fix bug caused by accidental insertion of parameter into the wrong
function body

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

M	source/blender/blenkernel/intern/pbvh.c
M	source/blender/blenkernel/intern/pbvh_intern.h
M	source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 773565b4b24..6e93970833e 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -3003,7 +3003,7 @@ PBVHProxyNode *BKE_pbvh_node_add_proxy(PBVH *pbvh, PBVHNode *node)
   return node->proxies + index;
 }
 
-void BKE_pbvh_node_free_proxies(PBVH *pbvh, PBVHNode *node)
+void BKE_pbvh_node_free_proxies(PBVHNode *node)
 {
   for (int p = 0; p < node->proxy_count; p++) {
     MEM_freeN(node->proxies[p].co);
@@ -3026,6 +3026,7 @@ void BKE_pbvh_gather_proxies(PBVH *pbvh, PBVHNode ***r_array, int *r_tot)
   for (int n = 0; n < pbvh->totnode; n++) {
     PBVHNode *node = pbvh->nodes + n;
 
+
     if (node->proxy_count > 0) {
       if (tot == space) {
         /* resize array if needed */
diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h
index bc11a8d19d6..0dfa8bd16e6 100644
--- a/source/blender/blenkernel/intern/pbvh_intern.h
+++ b/source/blender/blenkernel/intern/pbvh_intern.h
@@ -111,7 +111,7 @@ struct PBVHNode {
 
   /* trimesh */
   GSet *tm_faces;
-  
+
   TMElemSet *tm_unique_verts;
   TMElemSet *tm_other_verts;
   float (*tm_orco)[3];
@@ -120,11 +120,13 @@ struct PBVHNode {
   int tm_tot_orco;
 
   int tm_subtree_tottri;
-  
+
   /* Used to store the brush color during a stroke and composite it over the original color */
   PBVHColorBufferNode color_buffer;
 
+#ifdef PROXY_ADVANCED
   ProxyVertArray proxyverts;
+#endif
 };
 
 typedef enum {
@@ -261,22 +263,21 @@ bool pbvh_bmesh_node_nearest_to_ray(PBVHNode *node,
 
 void pbvh_bmesh_normals_update(PBVHNode **nodes, int totnode);
 
-
 /* pbvh_bmesh.c */
 bool pbvh_trimesh_node_raycast(PBVHNode *node,
-  const float ray_start[3],
-  const float ray_normal[3],
-  struct IsectRayPrecalc *isect_precalc,
-  float *dist,
-  bool use_original,
-  SculptIdx *r_active_vertex_index,
-  float *r_face_normal);
+                               const float ray_start[3],
+                               const float ray_normal[3],
+                               struct IsectRayPrecalc *isect_precalc,
+                               float *dist,
+                               bool use_original,
+                               SculptIdx *r_active_vertex_index,
+                               float *r_face_normal);
 bool pbvh_trimesh_node_nearest_to_ray(PBVHNode *node,
-  const float ray_start[3],
-  const float ray_normal[3],
-  float *depth,
-  float *dist_sq,
-  bool use_original);
+                                      const float ray_start[3],
+                                      const float ray_normal[3],
+                                      float *depth,
+                                      float *dist_sq,
+                                      bool use_original);
 
 void pbvh_trimesh_normals_update(PBVHNode **nodes, int totnode);
 
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 62e327d97ae..ef7e8c696bf 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2047,6 +2047,8 @@ static void calc_area_normal_and_center_task_cb(void *__restrict userdata,
     area_test.radius_squared = test_radius * test_radius;
   }
 
+  //TODO
+
   /* When the mesh is edited we can't rely on original coords
    * (original mesh may not even have verts in brush radius). */
   if (use_original && data->has_bm_orco) {



More information about the Bf-blender-cvs mailing list