diff options
-rw-r--r-- | source/blender/io/alembic/intern/abc_writer_transform.cc | 7 | ||||
-rw-r--r-- | tests/python/alembic_tests.py | 4 |
2 files changed, 8 insertions, 3 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); } diff --git a/tests/python/alembic_tests.py b/tests/python/alembic_tests.py index ec290001a6f..705bb98a060 100644 --- a/tests/python/alembic_tests.py +++ b/tests/python/alembic_tests.py @@ -194,7 +194,7 @@ class HierarchicalAndFlatExportTest(AbstractAlembicTest): # Now check the resulting Alembic file. xform = self.abcprop(abc, '/Cube_012/.xform') - self.assertEqual(0, xform['.inherits']) + self.assertEqual(1, xform['.inherits'], "Blender transforms always inherit") self.assertAlmostEqualFloatArray( xform['.vals'], @@ -233,7 +233,7 @@ class DupliGroupExportTest(AbstractAlembicTest): # Now check the resulting Alembic file. xform = self.abcprop(abc, '/Suzanne/.xform') - self.assertEqual(0, xform['.inherits']) + self.assertEqual(1, xform['.inherits']) self.assertAlmostEqualFloatArray( xform['.vals'], |