diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-08-19 15:13:45 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-08-19 15:29:42 +0300 |
commit | 5b97c00e9fc4e1e5d6cdfa7130eab5aada0e068e (patch) | |
tree | 08d14532c3dca9f64ff676b4167338073845497c /source/blender/io/alembic/intern/alembic_capi.cc | |
parent | 4db4123409de6f42a519cd03275d680b3d821298 (diff) |
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.
Diffstat (limited to 'source/blender/io/alembic/intern/alembic_capi.cc')
-rw-r--r-- | source/blender/io/alembic/intern/alembic_capi.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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; |