[Bf-blender-cvs] [f419d4625a0] sculpt-dev: Sculpt Expand: Fix and improve behaviour of pivot reposition

Pablo Dobarro noreply at git.blender.org
Thu Feb 11 20:32:44 CET 2021


Commit: f419d4625a08fcde5c23bbcdc79907af633edd26
Author: Pablo Dobarro
Date:   Thu Feb 11 20:32:25 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rBf419d4625a08fcde5c23bbcdc79907af633edd26

Sculpt Expand: Fix and improve behaviour of pivot reposition

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

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 f524697fa87..9965cb683ff 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -1154,8 +1154,17 @@ static void sculpt_expand_reposition_pivot(bContext *C, Object *ob, ExpandCache
   SculptSession *ss = ob->sculpt;
   const char symm = SCULPT_mesh_symmetry_xyz_get(ob);
   const int totvert = SCULPT_vertex_count_get(ss);
+
+  const bool initial_invert_state = expand_cache->invert;
+  expand_cache->invert = false;
   BLI_bitmap *enabled_vertices = sculpt_expand_bitmap_from_enabled(ss, expand_cache);
-  BLI_bitmap *boundary_vertices = sculpt_expand_boundary_from_enabled(ss, enabled_vertices, true);
+
+  const float use_mesh_boundary = expand_cache->falloff_factor_type !=
+                                  SCULPT_EXPAND_FALLOFF_BOUNDARY_TOPOLOGY;
+
+  BLI_bitmap *boundary_vertices = sculpt_expand_boundary_from_enabled(
+      ss, enabled_vertices, use_mesh_boundary);
+  expand_cache->invert = initial_invert_state;
 
   int total = 0;
   float avg[3] = {0.0f};



More information about the Bf-blender-cvs mailing list