Fix T51262: Blender CRASH with alembic file

Also added a unit test for exporting & importing very long names.
This commit is contained in:
2017-04-25 12:05:55 +02:00
parent 1f85a35a3d
commit 3128600a8a
3 changed files with 100 additions and 2 deletions

View File

@@ -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