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-01-29 20:26:12 +0300
committerPablo Dobarro <pablodp606@gmail.com>2021-02-03 23:00:28 +0300
commit0f238c5bcb190d5297830ed188f570fde0eb49ca (patch)
tree71db9546e9ee6c90c2b9fe7b3207d678a0f052f9 /source
parent1081eee4c569a27881e864df8399a0c3a65daaee (diff)
Fix T85136: Sculpt geometry extract not using updated mesh
This ensured that the sculpt mode deformation is flushed to the mesh datablock after leaving sculpt mode, so it can be duplicated and extracted correctly. Reviewed By: JacquesLucke Maniphest Tasks: T85136 Differential Revision: https://developer.blender.org/D10254
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/mesh/editmesh_mask_extract.c4
1 files changed, 4 insertions, 0 deletions
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);