[Bf-blender-cvs] [9e658b5ebcb] master: Remove workaround for loopcut and DM stability

Sergey Sharybin noreply at git.blender.org
Mon Nov 27 15:57:13 CET 2017


Commit: 9e658b5ebcb426707a9cc5bbd34180c640a6ca0b
Author: Sergey Sharybin
Date:   Mon Nov 27 15:39:32 2017 +0100
Branches: master
https://developer.blender.org/rB9e658b5ebcb426707a9cc5bbd34180c640a6ca0b

Remove workaround for loopcut and DM stability

Neither me nor Campbell could redo the issue, lets get rid of this workaround
and fix it properly if still needed.

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

M	source/blender/editors/include/ED_mesh.h
M	source/blender/editors/mesh/editmesh_loopcut.c
M	source/blender/editors/mesh/editmesh_utils.c

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

diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index c2c00ad5635..84698b33e25 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -75,7 +75,6 @@ struct BMFace *EDBM_verts_mirror_get_face(struct BMEditMesh *em, struct BMFace *
 void           EDBM_verts_mirror_cache_clear(struct BMEditMesh *em, struct BMVert *v);
 void           EDBM_verts_mirror_cache_end(struct BMEditMesh *em);
 
-void EDBM_mesh_ensure_valid_dm_hack(struct Scene *scene, struct BMEditMesh *em);
 void EDBM_mesh_normals_update(struct BMEditMesh *em);
 void EDBM_mesh_clear(struct BMEditMesh *em);
 
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index f1c1e4105d0..b9192f58a1b 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -517,9 +517,6 @@ static int ringsel_init(bContext *C, wmOperator *op, bool do_cut)
 	lcd->num.unit_type[0] = B_UNIT_NONE;
 	lcd->num.unit_type[1] = B_UNIT_NONE;
 
-	/* XXX, temp, workaround for [#	] */
-	EDBM_mesh_ensure_valid_dm_hack(scene, lcd->em);
-
 	em_setup_viewcontext(C, &lcd->vc);
 
 	ED_region_tag_redraw(lcd->ar);
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 8baf5d05fe9..44aca23e2cc 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -52,7 +52,7 @@
 #include "BKE_editmesh.h"
 #include "BKE_editmesh_bvh.h"
 
-#include "BKE_object.h"  /* XXX. only for EDBM_mesh_ensure_valid_dm_hack() which will be removed */
+#include "BKE_object.h"  /* XXX. only for EDBM_mesh_load(). */
 
 #include "WM_api.h"
 #include "WM_types.h"
@@ -107,21 +107,6 @@ void EDBM_redo_state_free(BMBackup *backup, BMEditMesh *em, int recalctess)
 		BKE_editmesh_tessface_calc(em);
 }
 
-/* hack to workaround multiple operators being called within the same event loop without an update
- * see: [#31811] */
-void EDBM_mesh_ensure_valid_dm_hack(Scene *scene, BMEditMesh *em)
-{
-	if ((((ID *)em->ob->data)->tag & LIB_TAG_ID_RECALC) ||
-	    (em->ob->recalc & OB_RECALC_DATA))
-	{
-		/* since we may not have done selection flushing */
-		if ((em->ob->recalc & OB_RECALC_DATA) == 0) {
-			DAG_id_tag_update(&em->ob->id, OB_RECALC_DATA);
-		}
-		BKE_object_handle_update(G.main->eval_ctx, scene, em->ob);
-	}
-}
-
 void EDBM_mesh_normals_update(BMEditMesh *em)
 {
 	BM_mesh_normals_update(em->bm);
@@ -412,6 +397,7 @@ void EDBM_mesh_load(Object *ob)
 	 * of freed data on scene update, especially in cases when there are dependency
 	 * cycles.
 	 */
+	/*
 	for (Object *other_object = G.main->object.first;
 	     other_object != NULL;
 	     other_object = other_object->id.next)
@@ -420,6 +406,7 @@ void EDBM_mesh_load(Object *ob)
 			BKE_object_free_derived_caches(other_object);
 		}
 	}
+	*/
 }
 
 /**



More information about the Bf-blender-cvs mailing list