Rename any instance of scene layer or render layer in code with view layer
[blender.git] / source / blender / alembic / intern / abc_exporter.cc
index 417690157619da9a932e38bd1942d6816636b197..945f82e88275ae2bfe8e0850927171df5ee5900d 100644 (file)
@@ -168,7 +168,7 @@ static bool export_object(const ExportSettings * const settings, const Base * co
 
 /* ************************************************************************** */
 
-AbcExporter::AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, SceneLayer *scene_layer,
+AbcExporter::AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer,
                          Depsgraph *depsgraph,
                          const char *filename, ExportSettings &settings)
     : m_bmain(bmain)
@@ -178,7 +178,7 @@ AbcExporter::AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene,
     , m_shape_sampling_index(0)
     , m_eval_ctx(eval_ctx)
     , m_scene(scene)
-    , m_scene_layer(scene_layer)
+    , m_view_layer(view_layer)
     , m_depsgraph(depsgraph)
     , m_writer(NULL)
 {}
@@ -364,7 +364,7 @@ void AbcExporter::operator()(Main *bmain, float &progress, bool &was_canceled)
 
 void AbcExporter::createTransformWritersHierarchy(EvaluationContext *eval_ctx)
 {
-       for (Base *base = static_cast<Base *>(m_settings.scene_layer->object_bases.first); base; base = base->next) {
+       for (Base *base = static_cast<Base *>(m_settings.view_layer->object_bases.first); base; base = base->next) {
                Object *ob = base->object;
 
                if (export_object(&m_settings, base, false)) {
@@ -495,7 +495,7 @@ AbcTransformWriter * AbcExporter::createTransformWriter(EvaluationContext *eval_
 
 void AbcExporter::createShapeWriters(EvaluationContext *eval_ctx)
 {
-       for (Base *base = static_cast<Base *>(m_settings.scene_layer->object_bases.first); base; base = base->next) {
+       for (Base *base = static_cast<Base *>(m_settings.view_layer->object_bases.first); base; base = base->next) {
                exploreObject(eval_ctx, base, NULL);
        }
 }
@@ -657,5 +657,5 @@ void AbcExporter::setCurrentFrame(Main *bmain, double t)
 {
        m_scene->r.cfra = static_cast<int>(t);
        m_scene->r.subframe = static_cast<float>(t) - m_scene->r.cfra;
-       BKE_scene_graph_update_for_newframe(bmain->eval_ctx, m_depsgraph, bmain, m_scene, m_scene_layer);
+       BKE_scene_graph_update_for_newframe(bmain->eval_ctx, m_depsgraph, bmain, m_scene, m_view_layer);
 }