[Bf-blender-cvs] [e3fdfcc981e] sculpt-dev: Sculpt Expand: Fix propagation from grids to faces in Multires

Pablo Dobarro noreply at git.blender.org
Sun Feb 14 20:02:52 CET 2021


Commit: e3fdfcc981ed60340fa2afc178ccbf932394aadc
Author: Pablo Dobarro
Date:   Sun Feb 14 19:53:30 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rBe3fdfcc981ed60340fa2afc178ccbf932394aadc

Sculpt Expand: Fix propagation from grids to faces in Multires

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

M	source/blender/editors/sculpt_paint/sculpt_expand.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index 32bb5923e41..e5cb8ba3bac 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -383,7 +383,7 @@ static float *sculpt_expand_normal_falloff_create(Sculpt *sd,
   SCULPT_floodfill_execute(ss, &flood, mask_expand_normal_floodfill_cb, &fdata);
   SCULPT_floodfill_free(&flood);
 
-  for (int i = e0; i < totvert; i++) {
+  for (int i = 0; i < totvert; i++) {
     dists[i] = FLT_MAX;
   }
 
@@ -621,7 +621,7 @@ static void sculpt_expand_mesh_face_falloff_from_grids_falloff(SculptSession *ss
         accum += expand_cache->falloff_factor[grid_loop_index + g];
       }
     }
-    expand_cache->face_falloff_factor[p] = accum / poly->totloop;
+    expand_cache->face_falloff_factor[p] = accum / (poly->totloop * key->grid_area);
   }
 }



More information about the Bf-blender-cvs mailing list