Alembic: constraint for transform animation is using world matrix again

In rB7c5a44c71f13 I changed the way transform matrices are loaded from
Alembic. Instead of having the Alembic importer convert matrices from
local (in the Alembic file) to World (to pass to the constraint handling
the animation of transforms), I set the constraint space to
`CONSTRAINT_SPACE_LOCAL`.

This worked thanks to rB7728bfd4c45c. However, that commit was reverted,
which meant that for parentless objects `CONSTRAINT_SPACE_LOCAL` no
longer means "local space".

The situation is resolved by setting the constraint to world space
again, and computing the world matrix in the Alembic importer.
This commit is contained in:
2020-03-09 18:22:49 +01:00
parent e672cf11c3
commit b080de79db
4 changed files with 34 additions and 6 deletions

View File

@@ -4802,5 +4802,14 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
/* Alembic Transform Cache changed from local to world space. */
LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
LISTBASE_FOREACH (bConstraint *, con, &ob->constraints) {
if (con->type == CONSTRAINT_TYPE_TRANSFORM_CACHE) {
con->ownspace = CONSTRAINT_SPACE_WORLD;
}
}
}
}
}