From 5b97c00e9fc4e1e5d6cdfa7130eab5aada0e068e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Thu, 19 Aug 2021 14:13:45 +0200 Subject: Alembic import: option to always add a cache reader The current behavior of the Alembic importer is to only create a `MeshSequenceCache` modifier or a `Transform Cache` constraint to imported objects if they have some animated properties. Since static objects do not have a cache reader, when reloading files those objects are not updated. Currently, the only way to properly reload a file because of this is to reimport it. This adds an option to the importer to always add a cache reader, even if there is no animated data, to ensure that all objects coming from Alembic archive are linked to them and updated properly upon reloads. Reviewed by: brecht, sybren Ref D10197. --- source/blender/io/alembic/intern/alembic_capi.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/io/alembic/intern/alembic_capi.cc') diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc index b94b75b2216..deb945b767c 100644 --- a/source/blender/io/alembic/intern/alembic_capi.cc +++ b/source/blender/io/alembic/intern/alembic_capi.cc @@ -663,6 +663,7 @@ bool ABC_import(bContext *C, int sequence_len, int offset, bool validate_meshes, + bool always_add_cache_reader, bool as_background_job) { /* Using new here since MEM_* functions do not call constructor to properly initialize data. */ @@ -681,6 +682,7 @@ bool ABC_import(bContext *C, job->settings.sequence_len = sequence_len; job->settings.sequence_offset = offset; job->settings.validate_meshes = validate_meshes; + job->settings.always_add_cache_reader = always_add_cache_reader; job->error_code = ABC_NO_ERROR; job->was_cancelled = false; job->archive = nullptr; -- cgit v1.2.3