Differential D3383 Diff 10966 source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
| Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
| #include "intern/depsgraph_intern.h" | #include "intern/depsgraph_intern.h" | ||||
| #include "intern/depsgraph_types.h" | #include "intern/depsgraph_types.h" | ||||
| #include "util/deg_util_foreach.h" | #include "util/deg_util_foreach.h" | ||||
| namespace DEG { | namespace DEG { | ||||
| void DepsgraphRelationBuilder::build_layer_collections(ListBase *lb) | |||||
| { | |||||
| for (LayerCollection *lc = (LayerCollection *)lb->first; lc; lc = lc->next) { | |||||
| build_collection(NULL, lc->collection); | |||||
| build_layer_collections(&lc->layer_collections); | |||||
| } | |||||
| } | |||||
| void DepsgraphRelationBuilder::build_view_layer(Scene *scene, ViewLayer *view_layer) | void DepsgraphRelationBuilder::build_view_layer(Scene *scene, ViewLayer *view_layer) | ||||
| { | { | ||||
| /* Setup currently building context. */ | /* Setup currently building context. */ | ||||
| scene_ = scene; | scene_ = scene; | ||||
| /* Scene objects. */ | /* Scene objects. */ | ||||
| /* NOTE: Nodes builder requires us to pass CoW base because it's being | /* NOTE: Nodes builder requires us to pass CoW base because it's being | ||||
| * passed to the evaluation functions. During relations builder we only | * passed to the evaluation functions. During relations builder we only | ||||
| * do NULL-pointer check of the base, so it's fine to pass original one. | * do NULL-pointer check of the base, so it's fine to pass original one. | ||||
| */ | */ | ||||
| LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { | LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { | ||||
| build_object(base, base->object); | build_object(base, base->object); | ||||
| } | } | ||||
| build_layer_collections(&view_layer->layer_collections); | |||||
| if (scene->camera != NULL) { | if (scene->camera != NULL) { | ||||
| build_object(NULL, scene->camera); | build_object(NULL, scene->camera); | ||||
| } | } | ||||
| /* Rigidbody. */ | /* Rigidbody. */ | ||||
| if (scene->rigidbody_world != NULL) { | if (scene->rigidbody_world != NULL) { | ||||
| build_rigidbody(scene); | build_rigidbody(scene); | ||||
| } | } | ||||
| /* Scene's animation and drivers. */ | /* Scene's animation and drivers. */ | ||||
| Show All 40 Lines | |||||