[Bf-blender-cvs] [6ee7a02558e] blender2.8: Depsgraph: Tag evaluated mesh as such

Sergey Sharybin noreply at git.blender.org
Tue Nov 21 16:12:54 CET 2017


Commit: 6ee7a02558e80e4fb9d787c0ee25c9077c6120f8
Author: Sergey Sharybin
Date:   Tue Nov 21 15:33:48 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB6ee7a02558e80e4fb9d787c0ee25c9077c6120f8

Depsgraph: Tag evaluated mesh as such

Helps troubleshooting.

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

M	source/blender/blenkernel/intern/object_update.c
M	source/blender/makesdna/DNA_ID.h

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

diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
index fbd26950256..76b72f7a308 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -353,6 +353,8 @@ void BKE_object_eval_uber_data(const EvaluationContext *eval_ctx,
 				 * something what we might want to change in the future.
 				 */
 				ob->data = new_mesh;
+				/* Special flags to help debugging. */
+				new_mesh->id.tag |= LIB_TAG_COPY_ON_WRITE_EVAL;
 				/* Save some memory by throwing DerivedMesh away. */
 				/* NOTE: Watch out, some tools might need it!
 				 * So keep around for now..
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 1741aa12051..030b0808b54 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -366,13 +366,14 @@ enum {
 
 	/* The datablock is a copy-on-write version. */
 	LIB_TAG_COPY_ON_WRITE   = 1 << 15,
+	LIB_TAG_COPY_ON_WRITE_EVAL = 1 << 16,
 
 	/* RESET_NEVER tag datablock for freeing etc. behavior (usually set when copying real one into temp/runtime one). */
-	LIB_TAG_NO_MAIN          = 1 << 16,  /* Datablock is not listed in Main database. */
-	LIB_TAG_NO_USER_REFCOUNT = 1 << 17,  /* Datablock does not refcount usages of other IDs. */
+	LIB_TAG_NO_MAIN          = 1 << 17,  /* Datablock is not listed in Main database. */
+	LIB_TAG_NO_USER_REFCOUNT = 1 << 18,  /* Datablock does not refcount usages of other IDs. */
 	/* Datablock was not allocated by standard system (BKE_libblock_alloc), do not free its memory
 	 * (usual type-specific freeing is called though). */
-	LIB_TAG_NOT_ALLOCATED     = 1 << 18,
+	LIB_TAG_NOT_ALLOCATED     = 1 << 19,
 };
 
 /* To filter ID types (filter_id) */



More information about the Bf-blender-cvs mailing list