diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-02-14 17:21:19 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-02-14 17:41:17 +0300 |
commit | 7c5a44c71f13ef00067f5c5951a275eb2eab2eef (patch) | |
tree | b6863c96d32b1f0a63df2713c795372a2a11c483 /source/blender/blenloader | |
parent | f457dc122d1d58f5e0e35db746104b69332597b0 (diff) |
Alembic: refactor import and export of transformations
The Alembic importer now works with local coordinates. Previously, the
importer converted transformations from Alembic to world coordinates
before processing them further; this processing often included
re-converting to local coordinates. This change made it possible to
remove some code that assumed that a child transform was only read after
its parent transform.
Blender's Alembic code follows the Maya convention, where in the zero
orientation the camera looks forward instead of down. This extra
rotation is now handled more consistently, and now also properly handles
children of cameras. This fixes T73269.
Unit tests were added to at least ensure that the importer and exporter
are compatible with each other, and that static and animated camera
transforms are handled in the same way.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index f9c89747120..d306049a7e0 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -4473,5 +4473,14 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ + + /* Alembic Transform Cache changed from world to local space. */ + LISTBASE_FOREACH (Object *, ob, &bmain->objects) { + LISTBASE_FOREACH (bConstraint *, con, &ob->constraints) { + if (con->type == CONSTRAINT_TYPE_TRANSFORM_CACHE) { + con->ownspace = CONSTRAINT_SPACE_LOCAL; + } + } + } } } |