Depsgraph: Move proxy group and from building to own function

Currently no functional changes, but allows to make it more clear to
implement depsgraph construction from a given subset of scene.
This commit is contained in:
2019-09-20 16:16:51 +02:00
parent e7507c16e8
commit c0855f77c0
4 changed files with 49 additions and 20 deletions

View File

@@ -609,12 +609,8 @@ void DepsgraphNodeBuilder::build_object(int base_index,
build_particle_systems(object, is_visible);
}
/* Proxy object to copy from. */
if (object->proxy_from != NULL) {
build_object(-1, object->proxy_from, DEG_ID_LINKED_INDIRECTLY, is_visible);
}
if (object->proxy_group != NULL) {
build_object(-1, object->proxy_group, DEG_ID_LINKED_INDIRECTLY, is_visible);
}
build_object_proxy_from(object, is_visible);
build_object_proxy_group(object, is_visible);
/* Object dupligroup. */
if (object->instance_collection != NULL) {
const bool is_current_parent_collection_visible = is_parent_collection_visible_;
@@ -653,6 +649,22 @@ void DepsgraphNodeBuilder::build_object_flags(int base_index,
is_from_set));
}
void DepsgraphNodeBuilder::build_object_proxy_from(Object *object, bool is_visible)
{
if (object->proxy_from == NULL) {
return;
}
build_object(-1, object->proxy_from, DEG_ID_LINKED_INDIRECTLY, is_visible);
}
void DepsgraphNodeBuilder::build_object_proxy_group(Object *object, bool is_visible)
{
if (object->proxy_group == NULL) {
return;
}
build_object(-1, object->proxy_group, DEG_ID_LINKED_INDIRECTLY, is_visible);
}
void DepsgraphNodeBuilder::build_object_data(Object *object, bool is_object_visible)
{
if (object->data == NULL) {