Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-06-19 11:24:57 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-06-19 11:24:57 +0300
commit2dff08c8ce9b9ce7511328cbe107d26a9539c38a (patch)
tree773c39810e8bcba57038b31ac0efde6d7561b21c /source/blender/io/alembic
parentf106369ce8577aa9115fead1eff3acd34273a86b (diff)
Alembic: always export transforms as inheriting
Blender now always exports transforms as as "inheriting", as Blender has no concept of parenting without inheriting the transform. Previously only objects with an actual parent were marked as "inheriting", and parentless objects as "non-inheriting". However, certain packages (for example USD's Alembic plugin) are incompatible with non-inheriting transforms and will completely ignore such transforms, placing all such objects at the world origin. When importing non-inheriting transforms from Alembic, Blender will break the parent-child relation and thus force the child to (correctly) interpret the transform as world matrix.
Diffstat (limited to 'source/blender/io/alembic')
-rw-r--r--source/blender/io/alembic/intern/abc_writer_transform.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/io/alembic/intern/abc_writer_transform.cc b/source/blender/io/alembic/intern/abc_writer_transform.cc
index 1ec7db0a1c6..ef3e7e29db2 100644
--- a/source/blender/io/alembic/intern/abc_writer_transform.cc
+++ b/source/blender/io/alembic/intern/abc_writer_transform.cc
@@ -97,7 +97,12 @@ void AbcTransformWriter::do_write()
m_matrix = convert_matrix_datatype(yup_mat);
m_sample.setMatrix(m_matrix);
- m_sample.setInheritsXforms(m_inherits_xform);
+
+ /* Always export as "inherits transform", as this is the only way in which Blender works. The
+ * above code has already taken care of writing the correct matrix so that this option is not
+ * necessary. However, certain packages (for example the USD Alembic exporter) are incompatible
+ * with non-inheriting transforms and will completely ignore the transform if that is used. */
+ m_sample.setInheritsXforms(true);
m_schema.set(m_sample);
}