[Bf-blender-cvs] [bab0fd13087] master: Fix visual artifacts with partially hidden meshes and mask extract

Pablo Dobarro noreply at git.blender.org
Mon Mar 16 17:46:38 CET 2020


Commit: bab0fd13087e74709d6bfb2872f9e3ed95f99748
Author: Pablo Dobarro
Date:   Thu Mar 12 16:07:41 2020 +0100
Branches: master
https://developer.blender.org/rBbab0fd13087e74709d6bfb2872f9e3ed95f99748

Fix visual artifacts with partially hidden meshes and mask extract

The previous behaivour didn't make sense as sculpt mode was still active
when switching to the new object, so it was rendering inconrrectly.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7130

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

M	source/blender/editors/mesh/editmesh_mask_extract.c

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

diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c
index 1c4bc33240a..a1c8aab9bec 100644
--- a/source/blender/editors/mesh/editmesh_mask_extract.c
+++ b/source/blender/editors/mesh/editmesh_mask_extract.c
@@ -80,6 +80,9 @@ static int paint_mask_extract_exec(bContext *C, wmOperator *op)
   View3D *v3d = CTX_wm_view3d(C);
   Scene *scene = CTX_data_scene(C);
 
+  Depsgraph *depsgraph = CTX_data_depsgraph_on_load(C);
+  ED_object_sculptmode_exit(C, depsgraph);
+
   BKE_sculpt_mask_layers_ensure(ob, NULL);
 
   Mesh *mesh = ob->data;



More information about the Bf-blender-cvs mailing list