diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-06-18 19:10:19 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-06-19 11:17:41 +0300 |
commit | 0d744cf673e893bd1e44fa7fd91e916935a3ff45 (patch) | |
tree | 2b4363a95be2b5745c7e604e65e979bc7671517a /tests/python | |
parent | 0ae7883d7d34bb2553407a028e9510e407a36d00 (diff) |
Alembic: export object data with object data name
Previously the Alembic exporter exported a mesh object to
`{object.name}/{object.name}Shape`. Now it exports to
`{object.name}/{mesh.name}` instead. The same change also applies to
other object data types.
Note that the code now is a bit hackish, as `m_name` is set even in
cases where it isn't used. This hackishness was already there, though,
but it's now just more visible. This will all be cleaned up when the
Alembic exporter is ported to use the `AbstractHierarchyImporter`
structure of the Universal Scene Description (USD) exporter.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D7672
Diffstat (limited to 'tests/python')
-rw-r--r-- | tests/python/alembic_tests.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/python/alembic_tests.py b/tests/python/alembic_tests.py index 2d477c5a6f0..fbb9496c9df 100644 --- a/tests/python/alembic_tests.py +++ b/tests/python/alembic_tests.py @@ -253,10 +253,10 @@ class CurveExportTest(AbstractAlembicTest): self.run_blender('single-curve.blend', script) # Now check the resulting Alembic file. - abcprop = self.abcprop(abc, '/NurbsCurve/NurbsCurveShape/.geom') + abcprop = self.abcprop(abc, '/NurbsCurve/CurveData/.geom') self.assertEqual(abcprop['.orders'], [4]) - abcprop = self.abcprop(abc, '/NurbsCurve/NurbsCurveShape/.geom/.userProperties') + abcprop = self.abcprop(abc, '/NurbsCurve/CurveData/.geom/.userProperties') self.assertEqual(abcprop['blender:resolution'], 10) @@ -286,7 +286,7 @@ class HairParticlesExportTest(AbstractAlembicTest): abcprop = self.abcprop(abc, '/Suzanne/Non-hair particle system/.geom') self.assertIn('.velocities', abcprop) - abcprop = self.abcprop(abc, '/Suzanne/SuzanneShape/.geom') + abcprop = self.abcprop(abc, '/Suzanne/MonkeyMesh/.geom') self.assertIn('.faceIndices', abcprop) @with_tempdir @@ -299,7 +299,7 @@ class HairParticlesExportTest(AbstractAlembicTest): self.assertRaises(AbcPropError, self.abcprop, abc, '/Suzanne/Non-hair particle system/.geom') - abcprop = self.abcprop(abc, '/Suzanne/SuzanneShape/.geom') + abcprop = self.abcprop(abc, '/Suzanne/MonkeyMesh/.geom') self.assertIn('.faceIndices', abcprop) @with_tempdir @@ -311,7 +311,7 @@ class HairParticlesExportTest(AbstractAlembicTest): abcprop = self.abcprop(abc, '/Suzanne/Non-hair particle system/.geom') self.assertIn('.velocities', abcprop) - abcprop = self.abcprop(abc, '/Suzanne/SuzanneShape/.geom') + abcprop = self.abcprop(abc, '/Suzanne/MonkeyMesh/.geom') self.assertIn('.faceIndices', abcprop) @with_tempdir @@ -322,7 +322,7 @@ class HairParticlesExportTest(AbstractAlembicTest): self.assertRaises(AbcPropError, self.abcprop, abc, '/Suzanne/Non-hair particle system/.geom') - abcprop = self.abcprop(abc, '/Suzanne/SuzanneShape/.geom') + abcprop = self.abcprop(abc, '/Suzanne/MonkeyMesh/.geom') self.assertIn('.faceIndices', abcprop) @@ -342,7 +342,7 @@ class UVMapExportTest(AbstractAlembicTest): self.maxDiff = 1000 # The main UV map should be written to .geom - abcprop = self.abcprop(abc, '/Cube/CubeShape/.geom/uv') + abcprop = self.abcprop(abc, '/Cube/Cube/.geom/uv') self.assertEqual(abcprop['.vals'], [ [0.625, 0.75], [0.875, 0.75], @@ -361,7 +361,7 @@ class UVMapExportTest(AbstractAlembicTest): ]) # The second UV map should be written to .arbGeomParams - abcprop = self.abcprop(abc, '/Cube/CubeShape/.geom/.arbGeomParams/Secondary') + abcprop = self.abcprop(abc, '/Cube/Cube/.geom/.arbGeomParams/Secondary') self.assertEqual(abcprop['.vals'], [ [0.75, 0.375], [0.75, 0.125], @@ -465,7 +465,7 @@ class LongNamesExportTest(AbstractAlembicTest): 0.0, 3.0, 0.0, 1.0, ]) - abcprop = self.abcprop(abc, '%s/CubeShape/.geom' % name) + abcprop = self.abcprop(abc, '%s/Cube/.geom' % name) self.assertIn('.faceCounts', abcprop) |