Rename any instance of scene layer or render layer in code with view layer
[blender.git] / source / blender / depsgraph / intern / eval / deg_eval_copy_on_write.cc
index 1d3c2d596ee8117816be64f18ac8ea86dd59b36f..99efd6335246b98263b863514b3228f0be7778b2 100644 (file)
@@ -477,31 +477,31 @@ void update_copy_on_write_scene(const Depsgraph *depsgraph,
        scene_cow->r.cfra = scene_orig->r.cfra;
        scene_cow->r.subframe = scene_orig->r.subframe;
        // Update bases.
-       const SceneLayer *scene_layer_orig = (SceneLayer *)scene_orig->render_layers.first;
-       SceneLayer *scene_layer_cow = (SceneLayer *)scene_cow->render_layers.first;
-       while (scene_layer_orig != NULL) {
+       const ViewLayer *view_layer_orig = (ViewLayer *)scene_orig->view_layers.first;
+       ViewLayer *view_layer_cow = (ViewLayer *)scene_cow->view_layers.first;
+       while (view_layer_orig != NULL) {
                // Update pointers to active base.
-               if (scene_layer_orig->basact == NULL) {
-                       scene_layer_cow->basact = NULL;
+               if (view_layer_orig->basact == NULL) {
+                       view_layer_cow->basact = NULL;
                }
                else {
-                       const Object *obact_orig = scene_layer_orig->basact->object;
+                       const Object *obact_orig = view_layer_orig->basact->object;
                        Object *obact_cow = (Object *)depsgraph->get_cow_id(&obact_orig->id);
-                       scene_layer_cow->basact = BKE_scene_layer_base_find(scene_layer_cow, obact_cow);
+                       view_layer_cow->basact = BKE_view_layer_base_find(view_layer_cow, obact_cow);
                }
                // Update base flags.
                //
                // TODO(sergey): We should probably check visibled/selectabled
                // flag here?
-               const Base *base_orig = (Base *)scene_layer_orig->object_bases.first;
-               Base *base_cow = (Base *)scene_layer_cow->object_bases.first;;
+               const Base *base_orig = (Base *)view_layer_orig->object_bases.first;
+               Base *base_cow = (Base *)view_layer_cow->object_bases.first;;
                while (base_orig != NULL) {
                        base_cow->flag = base_orig->flag;
                        base_orig = base_orig->next;
                        base_cow = base_cow->next;
                }
-               scene_layer_orig = scene_layer_orig->next;
-               scene_layer_cow = scene_layer_cow->next;
+               view_layer_orig = view_layer_orig->next;
+               view_layer_cow = view_layer_cow->next;
        }
        // Update edit object pointer.
        if (scene_orig->obedit != NULL) {