[Bf-blender-cvs] [b66ecaf40cb] sculpt-mode-features: Fix crash on mesh filters

Pablo Dobarro noreply at git.blender.org
Mon Apr 29 03:48:51 CEST 2019


Commit: b66ecaf40cb867c3ba344fc6becb8a3e40b0a13b
Author: Pablo Dobarro
Date:   Mon Apr 29 03:48:34 2019 +0200
Branches: sculpt-mode-features
https://developer.blender.org/rBb66ecaf40cb867c3ba344fc6becb8a3e40b0a13b

Fix crash on mesh filters

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

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

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 8f6e1f3af41..03e65635e07 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7476,7 +7476,6 @@ int sculpt_mesh_filter_modal(bContext *C, wmOperator *op, const wmEvent *event)
   }
 
   BKE_sculpt_update_mesh_elements(depsgraph, scene, sd, ob, mode == MESH_FILTER_SMOOTH, true);
-  sculpt_restore_mesh(sd, ob);
   if (BKE_pbvh_type(pbvh) == PBVH_FACES && mode == MESH_FILTER_SMOOTH && !ob->sculpt->pmap) {
     ss->use_orco = false;
     return OPERATOR_CANCELLED;
@@ -7494,6 +7493,8 @@ int sculpt_mesh_filter_modal(bContext *C, wmOperator *op, const wmEvent *event)
     sculpt_undo_push_begin("mesh filter fill");
   }
 
+  paint_mesh_restore_co(sd, ob);
+
   float len = event->prevclickx - event->mval[0];
   filter_strength = filter_strength * -len * 0.001f;



More information about the Bf-blender-cvs mailing list