Depsgraph: Don't optimize out collections used by duplication system
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 8 Jun 2018 09:42:41 +0000 (11:42 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 8 Jun 2018 09:57:16 +0000 (11:57 +0200)
commit4017b4833152655dbb161896ab1bf47469a61d69
tree2e767b2204bacabe2af1d834c57454d11df629ce
parent378e42e11933bd069b49a83232c5eccb279bc6c7
Depsgraph: Don't optimize out collections used by duplication system

This makes evaluated objects to point to a non-evaluated collection,
which is already really bad. What is even more worse, objects in those
collections are not evaluated either.

Proper solution would be to implement visibility flag for nodes, which
will be set to 0 for transform/geometry components, but which will be
1 for copy-on-write components.

This way we will guarantee consistency of dependency graph.

For now this change is good enough and unlocks production.

Fixes T55375: Crash when changing visibility of instanced collection
Fixes T55357: Particle geometry crash
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.h
source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.h
source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
source/blender/depsgraph/intern/depsgraph_types.h