diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-02-15 17:30:34 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-06 17:04:31 +0300 |
commit | cbe0709db2df800db218ea91da2933a745500f57 (patch) | |
tree | 81f2bc7ce2e748d9b5ccc4e88a9b6e4c83e7c06c /source/blender | |
parent | 62a47f9660c18787de4def41dde149c67e416547 (diff) |
Alembic: Don't compute world matrix when it's not necessary.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/alembic/intern/abc_util.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/alembic/intern/abc_util.cc b/source/blender/alembic/intern/abc_util.cc index f51e15fd25a..68306af1e42 100644 --- a/source/blender/alembic/intern/abc_util.cc +++ b/source/blender/alembic/intern/abc_util.cc @@ -232,11 +232,7 @@ void convert_matrix(const Imath::M44d &xform, Object *ob, create_transform_matrix(r_mat); - if (ob->parent) { - mul_m4_m4m4(r_mat, ob->parent->obmat, r_mat); - } - /* TODO(kevin) */ - else if (!has_alembic_parent) { + if (!has_alembic_parent) { /* Only apply scaling to root objects, parenting will propagate it. */ float scale_mat[4][4]; scale_m4_fl(scale_mat, scale); @@ -263,6 +259,9 @@ void create_transform_matrix(Object *obj, float transform_mat[4][4]) unit_m4(mat); /* get local matrix. */ + /* TODO Sybren: when we're exporting as "flat", i.e. non-hierarchial, + * we should export the world matrix even when the object has a parent + * Blender Object. */ if (obj->parent) { invert_m4_m4(invmat, obj->parent->obmat); mul_m4_m4m4(mat, invmat, obj->obmat); |