Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2021-02-03 23:06:56 +0300
committerPablo Dobarro <pablodp606@gmail.com>2021-02-03 23:06:56 +0300
commit70371299aed60d533d27d5562f12e0c996ef9c15 (patch)
tree9e285f6eadb95dd1c63fe48e7287ad66bcd3590a /source
parentfec6a4e24ad3d6a6cc499874a58303e6e7676b35 (diff)
parentebd2aa789e409258cb96e30c9c42dcdea360924f (diff)
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/paint.c8
-rw-r--r--source/blender/editors/mesh/editmesh_mask_extract.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_mask.c6
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_boundary.c1
5 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 92dea0b4601..13f4304f923 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -1491,6 +1491,14 @@ void BKE_sculptsession_free(Object *ob)
MEM_SAFE_FREE(ss->pose_ik_chain_preview);
}
+ if (ss->boundary_preview) {
+ MEM_SAFE_FREE(ss->boundary_preview->vertices);
+ MEM_SAFE_FREE(ss->boundary_preview->edges);
+ MEM_SAFE_FREE(ss->boundary_preview->distance);
+ MEM_SAFE_FREE(ss->boundary_preview->edit_info);
+ MEM_SAFE_FREE(ss->boundary_preview);
+ }
+
BKE_sculptsession_free_vwpaint_data(ob->sculpt);
MEM_freeN(ss);
diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c
index be9314ad2fd..3e0bee3c4b8 100644
--- a/source/blender/editors/mesh/editmesh_mask_extract.c
+++ b/source/blender/editors/mesh/editmesh_mask_extract.c
@@ -106,6 +106,10 @@ static int geometry_extract_apply(bContext *C,
BKE_sculpt_mask_layers_ensure(ob, NULL);
+ /* Ensures that deformation from sculpt mode is taken into accunt before duplicating the mesh to
+ * extract the geometry. */
+ CTX_data_ensure_evaluated_depsgraph(C);
+
Mesh *mesh = ob->data;
Mesh *new_mesh = (Mesh *)BKE_id_copy(bmain, &mesh->id);
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index 92c78a674f0..17d13041f28 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -1465,6 +1465,12 @@ static void sculpt_gesture_project_apply_for_symmetry_pass(bContext *UNUSED(C),
static void sculpt_gesture_project_end(bContext *C, SculptGestureContext *sgcontext)
{
+ SculptSession *ss = sgcontext->ss;
+ Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
+ if (ss->deform_modifiers_active || ss->shapekey_active) {
+ SCULPT_flush_stroke_deform(sd, sgcontext->vc.obact, true);
+ }
+
SCULPT_flush_update_step(C, SCULPT_UPDATE_COORDS);
SCULPT_flush_update_done(C, sgcontext->vc.obact, SCULPT_UPDATE_COORDS);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 4d6330e03f8..410b83217b4 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -678,7 +678,7 @@ bool SCULPT_vertex_has_unique_face_set(SculptSession *ss, int index)
return sculpt_check_unique_face_set_in_base_mesh(ss, index);
}
case PBVH_BMESH:
- return false;
+ return true;
case PBVH_GRIDS: {
const CCGKey *key = BKE_pbvh_get_grid_key(ss->pbvh);
const int grid_index = index / key->grid_area;
diff --git a/source/blender/editors/sculpt_paint/sculpt_boundary.c b/source/blender/editors/sculpt_paint/sculpt_boundary.c
index 64f2542dcbe..0cfb6f17adb 100644
--- a/source/blender/editors/sculpt_paint/sculpt_boundary.c
+++ b/source/blender/editors/sculpt_paint/sculpt_boundary.c
@@ -530,6 +530,7 @@ SculptBoundary *SCULPT_boundary_data_init(Object *object,
void SCULPT_boundary_data_free(SculptBoundary *boundary)
{
MEM_SAFE_FREE(boundary->vertices);
+ MEM_SAFE_FREE(boundary->edges);
MEM_SAFE_FREE(boundary->distance);
MEM_SAFE_FREE(boundary->edit_info);
MEM_SAFE_FREE(boundary->bend.pivot_positions);