diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-25 13:05:55 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-25 13:06:03 +0300 |
commit | 3128600a8ab2badd9ea39c80133f15f766794ec6 (patch) | |
tree | 486b87dfa78fc7571e2727be69e4f16f43d0135d /tests/python/bl_alembic_import_test.py | |
parent | 1f85a35a3db362124cc355ddc86588a434a613a5 (diff) |
Fix T51262: Blender CRASH with alembic file
Also added a unit test for exporting & importing very long names.
Diffstat (limited to 'tests/python/bl_alembic_import_test.py')
-rw-r--r-- | tests/python/bl_alembic_import_test.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/python/bl_alembic_import_test.py b/tests/python/bl_alembic_import_test.py index 33ccc49f301..3e12cc0a844 100644 --- a/tests/python/bl_alembic_import_test.py +++ b/tests/python/bl_alembic_import_test.py @@ -122,6 +122,15 @@ class SimpleImportTest(unittest.TestCase): self.assertAlmostEqual(y, 0) self.assertAlmostEqual(z, 0) + def test_import_long_names(self): + # This file contains very long names. The longest name is 4047 chars. + bpy.ops.wm.alembic_import( + filepath=str(self.testdir / "long-names.abc"), + as_background_job=False) + + self.assertIn('Cube', bpy.data.objects) + self.assertEqual('CubeShape', bpy.data.objects['Cube'].data.name) + def main(): global args |