[Bf-blender-cvs] [2a5fcfaad0c] master: Don't tag object data's bounding box as dirty before re-evaluaiton

Sergey Sharybin noreply at git.blender.org
Fri Jun 7 09:14:18 CEST 2019


Commit: 2a5fcfaad0c16a486e4582aed86b8a140ede9d40
Author: Sergey Sharybin
Date:   Thu Jun 6 12:24:40 2019 +0200
Branches: master
https://developer.blender.org/rB2a5fcfaad0c16a486e4582aed86b8a140ede9d40

Don't tag object data's bounding box as dirty before re-evaluaiton

Most of the time this actually tags evaluated mesh which will be tossed
away few lines below anyway. And this causes issues if the evaluated
mesh is actually owned by the mesh datablock.

The bounding box now has clear separation between original object data
and object data after modifiers, so this should not be causing any
issues.

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

M	source/blender/blenkernel/intern/object.c

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

diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index b673c882e21..2a66edc8d42 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -429,27 +429,6 @@ static void object_update_from_subsurf_ccg(Object *object)
 /* free data derived from mesh, called when mesh changes or is freed */
 void BKE_object_free_derived_caches(Object *ob)
 {
-  /* Also serves as signal to remake texspace.
-   *
-   * NOTE: This function can be called from threads on different objects
-   * sharing same data datablock. So we need to ensure atomic nature of
-   * data modification here.
-   */
-  if (ob->type == OB_MESH) {
-    Mesh *me = ob->data;
-
-    if (me && me->bb) {
-      atomic_fetch_and_or_int32(&me->bb->flag, BOUNDBOX_DIRTY);
-    }
-  }
-  else if (ELEM(ob->type, OB_SURF, OB_CURVE, OB_FONT)) {
-    Curve *cu = ob->data;
-
-    if (cu && cu->bb) {
-      atomic_fetch_and_or_int32(&cu->bb->flag, BOUNDBOX_DIRTY);
-    }
-  }
-
   MEM_SAFE_FREE(ob->runtime.bb);
 
   object_update_from_subsurf_ccg(ob);



More information about the Bf-blender-cvs mailing list