[Bf-blender-cvs] [087c6fa] depsgraph_refactor: Depsgraph: Avoid full failure in cases legacy code tags ID for recalc with flag=0

Sergey Sharybin noreply at git.blender.org
Fri Feb 20 14:17:53 CET 2015


Commit: 087c6fac3ca664ff5047753a7c1f77490a0a0060
Author: Sergey Sharybin
Date:   Fri Feb 20 18:16:32 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB087c6fac3ca664ff5047753a7c1f77490a0a0060

Depsgraph: Avoid full failure in cases legacy code tags ID for recalc with flag=0

We'll need to review all such cases and use proper recalc flag, but for now we'd
better don't fail that much. In the (nearest) future will add debug print there
and solve all the flags together.

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

M	source/blender/depsgraph/intern/depsgraph_tag.cpp

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

diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cpp b/source/blender/depsgraph/intern/depsgraph_tag.cpp
index 498d00a..b01398b 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cpp
@@ -159,6 +159,14 @@ void DEG_id_tag_update_ex(Main *bmain, ID *id, short flag)
 	{
 		if (scene->depsgraph) {
 			Depsgraph *graph = scene->depsgraph;
+			if (flag == 0) {
+				/* TODO(sergey): Currently blender is still tagging IDs
+				 * for recalc just using flag=0. This isn't totally correct
+				 * but we'd better deal with such cases and don't fail.
+				 */
+				DEG_graph_id_tag_update(bmain, graph, id);
+				continue;
+			}
 			if (flag & OB_RECALC_DATA && GS(id->name) == ID_OB) {
 				Object *object = (Object*)id;
 				if (object->data != NULL) {




More information about the Bf-blender-cvs mailing list