[Bf-blender-cvs] [e3324c3a8ef] blender2.8: Depsgraph: Silence relations builder errors

Sergey Sharybin noreply at git.blender.org
Wed Jun 6 12:39:25 CEST 2018


Commit: e3324c3a8ef68b2d4c866b799fe94e629731a9ba
Author: Sergey Sharybin
Date:   Wed Jun 6 12:35:00 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBe3324c3a8ef68b2d4c866b799fe94e629731a9ba

Depsgraph: Silence relations builder errors

Were caused by depsgraph trying to create relations between objects
which are coming from restricted collection.

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

M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 26f5c167627..f02a48e803e 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -473,7 +473,12 @@ void DepsgraphRelationBuilder::build_collection(Object *object, Collection *coll
 	}
 	if (object != NULL) {
 		const ListBase group_objects = BKE_collection_object_cache_get(collection);
+		const int base_flag = (graph_->mode == DAG_EVAL_VIEWPORT) ?
+			BASE_VISIBLE_VIEWPORT : BASE_VISIBLE_RENDER;
 		LISTBASE_FOREACH (Base *, base, &group_objects) {
+			if ((base->flag & base_flag) == 0) {
+				continue;
+			}
 			ComponentKey dupli_transform_key(&base->object->id, DEG_NODE_TYPE_TRANSFORM);
 			add_relation(dupli_transform_key, object_local_transform_key, "Dupligroup");
 		}



More information about the Bf-blender-cvs mailing list