[Bf-blender-cvs] [ec0756af6c7] blender2.8: Depsgraph: Fix base flag flush for objects from set scene

Sergey Sharybin noreply at git.blender.org
Wed Apr 18 18:06:41 CEST 2018


Commit: ec0756af6c75ae37efb0772eecb069f3930eed46
Author: Sergey Sharybin
Date:   Wed Apr 18 18:04:38 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBec0756af6c75ae37efb0772eecb069f3930eed46

Depsgraph: Fix base flag flush for objects from set scene

Fixes view_layer_background_set regression test.

This makes Dalai happy! :)

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

M	source/blender/blenkernel/BKE_object.h
M	source/blender/blenkernel/intern/object_update.c
M	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc

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

diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index ce918826938..1f602fcd9cc 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -248,6 +248,7 @@ void BKE_object_data_select_update(
 
 void BKE_object_eval_flush_base_flags(
         struct Depsgraph *depsgraph,
+        struct ViewLayer *view_layer,
         struct Object *object, int base_index,
         const bool is_from_set);
 
diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
index 81f15d265a2..d043fcc9d1c 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -444,10 +444,10 @@ void BKE_object_data_select_update(Depsgraph *UNUSED(depsgraph),
 	}
 }
 
-void BKE_object_eval_flush_base_flags(Depsgraph *depsgraph,
+void BKE_object_eval_flush_base_flags(Depsgraph *UNUSED(depsgraph),
+                                      ViewLayer *view_layer,
                                       Object *object, int base_index, bool is_from_set)
 {
-	ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph);
 	BLI_assert(view_layer->object_bases_array != NULL);
 	BLI_assert(base_index >= 0);
 	BLI_assert(base_index < MEM_allocN_len(view_layer->object_bases_array) / sizeof(Base *));
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index ca31c1c15a1..af321cb70e8 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -533,6 +533,7 @@ void DepsgraphNodeBuilder::build_object_flags(
 	                   DEG_NODE_TYPE_LAYER_COLLECTIONS,
 	                   function_bind(BKE_object_eval_flush_base_flags,
 	                                 _1,
+	                                 view_layer_,
 	                                 object_cow, base_index,
 	                                 is_from_set),
 	                   DEG_OPCODE_OBJECT_BASE_FLAGS);



More information about the Bf-blender-cvs mailing list