Depsgraph: Fix base flag flush for objects from set scene

Fixes view_layer_background_set regression test.

This makes Dalai happy! :)
This commit is contained in:
Sergey Sharybin 2018-04-18 18:04:38 +02:00
parent 3701cf785c
commit ec0756af6c
3 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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 *));

View File

@ -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);