From bc989497deeaf2ec79ccfbe7b5e43509eb867b06 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 10 Jan 2014 15:39:06 +0600 Subject: Fix T38139: Objects which are in cyclic dependency are not updated Graph traversal which is based on counting parents which are still to be updated fails in cases there are cycles in the graph. If there are cyclic dependencies in the scene all the objects from the cycles will be updated in a single thread now one by one. This makes blender behave the same way as it was before multi-threaded DAG landed to master. This needed to tweak depsgraph a bit so now dag_check_cycle() sets is_acyclic field of DAG forest if there are cycles in the graph. TODO: It might be possible to save some time on evaluation when all the tagged objects were updated in multi-threaded DAG traversal. --- source/blender/blenkernel/BKE_depsgraph.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/BKE_depsgraph.h') diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index 4fedf373a22..df7e9561c46 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -159,6 +159,7 @@ void DAG_print_dependencies(struct Main *bmain, struct Scene *scene, struct Obje struct Object *DAG_get_node_object(void *node_v); const char *DAG_get_node_name(void *node_v); short DAG_get_eval_flags_for_object(struct Scene *scene, void *object); +bool DAG_is_acyclic(struct Scene *scene); #ifdef __cplusplus } -- cgit v1.2.3