Commit: bbfb29c7941af8dbb5f3036752fc1f2f0d2b687b
Author: Campbell Barton
Date:   Tue Aug 10 14:37:39 2021 +1000
Branches: blender-v2.83-release
https://developer.blender.org/rBbbfb29c7941af8dbb5f3036752fc1f2f0d2b687b

Fix T90493: Undo a knife-project operation crashes

The crash occurred calling because mesh_get_eval_final in edit-mode
freed all derived mesh data without tagging the object for updating.

However meshes in edit-mode weren't meant to be used as knife-project
source-data, adding support for multi object edit-mode  caused this.

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

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

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

diff --git a/source/blender/editors/mesh/editmesh_knife_project.c 
b/source/blender/editors/mesh/editmesh_knife_project.c
index 10e8bfa529f..25cdf3caf11 100644
--- a/source/blender/editors/mesh/editmesh_knife_project.c
+++ b/source/blender/editors/mesh/editmesh_knife_project.c
@@ -130,9 +130,11 @@ static int knifeproject_exec(bContext *C, wmOperator *op)
   LinkNode *polys = NULL;
 
   CTX_DATA_BEGIN (C, Object *, ob, selected_objects) {
-    if (ob != obedit) {
-      polys = knifeproject_poly_from_object(C, scene, ob, polys);
+    if (BKE_object_is_in_editmode(ob)) {
+      continue;
     }
+    BLI_assert(ob != obedit);
+    polys = knifeproject_poly_from_object(C, scene, ob, polys);
   }
   CTX_DATA_END;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to