diff options
Diffstat (limited to 'source/blender/alembic/intern')
-rw-r--r-- | source/blender/alembic/intern/abc_exporter.cc | 10 | ||||
-rw-r--r-- | source/blender/alembic/intern/abc_exporter.h | 8 | ||||
-rw-r--r-- | source/blender/alembic/intern/alembic_capi.cc | 32 |
3 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc index 41769015761..945f82e8827 100644 --- a/source/blender/alembic/intern/abc_exporter.cc +++ b/source/blender/alembic/intern/abc_exporter.cc @@ -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); } diff --git a/source/blender/alembic/intern/abc_exporter.h b/source/blender/alembic/intern/abc_exporter.h index 7e25384ff0d..2a34ad2b25d 100644 --- a/source/blender/alembic/intern/abc_exporter.h +++ b/source/blender/alembic/intern/abc_exporter.h @@ -39,14 +39,14 @@ struct Depsgraph; struct Main; struct Object; struct Scene; -struct SceneLayer; +struct ViewLayer; struct Base; struct ExportSettings { ExportSettings(); Scene *scene; - SceneLayer *scene_layer; // Scene layer to export; all its objects will be exported, unless selected_only=true + ViewLayer *view_layer; // Scene layer to export; all its objects will be exported, unless selected_only=true Depsgraph *depsgraph; SimpleLogger logger; @@ -95,7 +95,7 @@ class AbcExporter { EvaluationContext *m_eval_ctx; Scene *m_scene; - SceneLayer *m_scene_layer; + ViewLayer *m_view_layer; Depsgraph *m_depsgraph; ArchiveWriter *m_writer; @@ -107,7 +107,7 @@ class AbcExporter { std::vector<AbcObjectWriter *> m_shapes; public: - AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, SceneLayer *scene_layer, + AbcExporter(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer, Depsgraph *depsgraph, const char *filename, ExportSettings &settings); ~AbcExporter(); diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc index c2fbed471b8..7003547ead2 100644 --- a/source/blender/alembic/intern/alembic_capi.cc +++ b/source/blender/alembic/intern/alembic_capi.cc @@ -232,7 +232,7 @@ static void find_iobject(const IObject &object, IObject &ret, struct ExportJobData { EvaluationContext eval_ctx; Scene *scene; - SceneLayer *scene_layer; + ViewLayer *view_layer; Depsgraph *depsgraph; Main *bmain; @@ -265,8 +265,8 @@ static void export_startjob(void *customdata, short *stop, short *do_update, flo try { Scene *scene = data->scene; - SceneLayer *scene_layer = data->scene_layer; - AbcExporter exporter(data->bmain, &data->eval_ctx, scene, scene_layer, data->depsgraph, data->filename, data->settings); + ViewLayer *view_layer = data->view_layer; + AbcExporter exporter(data->bmain, &data->eval_ctx, scene, view_layer, data->depsgraph, data->filename, data->settings); const int orig_frame = CFRA; @@ -276,7 +276,7 @@ static void export_startjob(void *customdata, short *stop, short *do_update, flo if (CFRA != orig_frame) { CFRA = orig_frame; - BKE_scene_graph_update_for_newframe(data->bmain->eval_ctx, data->depsgraph, data->bmain, scene, data->scene_layer); + BKE_scene_graph_update_for_newframe(data->bmain->eval_ctx, data->depsgraph, data->bmain, scene, data->view_layer); } data->export_ok = !data->was_canceled; @@ -318,7 +318,7 @@ bool ABC_export( CTX_data_eval_ctx(C, &job->eval_ctx); job->scene = scene; - job->scene_layer = CTX_data_scene_layer(C); + job->view_layer = CTX_data_view_layer(C); job->depsgraph = CTX_data_depsgraph(C); job->bmain = CTX_data_main(C); job->export_ok = false; @@ -347,7 +347,7 @@ bool ABC_export( * Later in the 2.8 development process this may be replaced by using * a specific collection for Alembic I/O, which can then be toggled * between "real" objects and cached Alembic files. */ - job->settings.scene_layer = CTX_data_scene_layer(C); + job->settings.view_layer = CTX_data_view_layer(C); job->settings.frame_start = params->frame_start; job->settings.frame_end = params->frame_end; @@ -634,7 +634,7 @@ enum { struct ImportJobData { Main *bmain; Scene *scene; - SceneLayer *scene_layer; + ViewLayer *view_layer; char filename[1024]; ImportSettings settings; @@ -837,16 +837,16 @@ static void import_endjob(void *user_data) /* Add object to scene. */ Base *base; LayerCollection *lc; - SceneLayer *scene_layer = data->scene_layer; + ViewLayer *view_layer = data->view_layer; - BKE_scene_layer_base_deselect_all(scene_layer); + BKE_view_layer_base_deselect_all(view_layer); - lc = BKE_layer_collection_get_active(scene_layer); + lc = BKE_layer_collection_get_active(view_layer); if (lc == NULL) { - BLI_assert(BLI_listbase_count_ex(&scene_layer->layer_collections, 1) == 0); - /* when there is no collection linked to this SceneLayer, create one */ + BLI_assert(BLI_listbase_count_ex(&view_layer->layer_collections, 1) == 0); + /* when there is no collection linked to this ViewLayer, create one */ SceneCollection *sc = BKE_collection_add(data->scene, NULL, NULL); - lc = BKE_collection_link(scene_layer, sc); + lc = BKE_collection_link(view_layer, sc); } for (iter = data->readers.begin(); iter != data->readers.end(); ++iter) { @@ -855,8 +855,8 @@ static void import_endjob(void *user_data) BKE_collection_object_add(data->scene, lc->scene_collection, ob); - base = BKE_scene_layer_base_find(scene_layer, ob); - BKE_scene_layer_base_select(scene_layer, base); + base = BKE_view_layer_base_find(view_layer, ob); + BKE_view_layer_base_select(view_layer, base); DEG_id_tag_update_ex(data->bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); } @@ -904,7 +904,7 @@ bool ABC_import(bContext *C, const char *filepath, float scale, bool is_sequence ImportJobData *job = new ImportJobData(); job->bmain = CTX_data_main(C); job->scene = CTX_data_scene(C); - job->scene_layer = CTX_data_scene_layer(C); + job->view_layer = CTX_data_view_layer(C); job->import_ok = false; BLI_strncpy(job->filename, filepath, 1024); |