diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-20 13:50:20 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-20 13:50:20 +0300 |
commit | aa4102a441c00dfa321c9627bb8c04c4b350f115 (patch) | |
tree | 0285c49e86ba451509c7a39f4943d8f770b2eadf /tests/python/bl_alembic_import_test.py | |
parent | 8e0c57a812e8eb557bddd2d2bb1e6c812cd1e065 (diff) | |
parent | ae79eb2105de519bcc408256d25272efa3195818 (diff) |
Merge branch 'master' into blender2.8
Disabled a unittest, to be re-enabled when T51261 is fixed.
# Conflicts:
# source/blender/alembic/intern/alembic_capi.cc
Diffstat (limited to 'tests/python/bl_alembic_import_test.py')
-rw-r--r-- | tests/python/bl_alembic_import_test.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/python/bl_alembic_import_test.py b/tests/python/bl_alembic_import_test.py index c27a7f23acf..5f7b4440e5f 100644 --- a/tests/python/bl_alembic_import_test.py +++ b/tests/python/bl_alembic_import_test.py @@ -63,6 +63,30 @@ class SimpleImportTest(unittest.TestCase): self.assertEqual(objects['Cube_003'], objects['Cube_005'].parent) self.assertEqual(objects['Cube_003'], objects['Cube_006'].parent) + def DISABLED_test_select_after_import(self): + self.fail('FIXME: Disabled until https://developer.blender.org/T51261 is fixed') + + # Add a sphere, so that there is something in the scene, selected, and active, + # before we do the Alembic import. + bpy.ops.mesh.primitive_uv_sphere_add() + sphere = bpy.context.active_object + self.assertEqual('Sphere', sphere.name) + self.assertEqual([sphere], bpy.context.selected_objects) + + bpy.ops.wm.alembic_import( + filepath=str(self.testdir / "cubes-hierarchy.abc"), + as_background_job=False) + + # The active object is probably the first one that was imported, but this + # behaviour is not defined. At least it should be one of the cubes, and + # not the sphere. + self.assertNotEqual(sphere, bpy.context.active_object) + self.assertTrue('Cube' in bpy.context.active_object.name) + + # All cubes should be selected, but the sphere shouldn't be. + for ob in bpy.data.objects: + self.assertEqual('Cube' in ob.name, ob.select_get()) + def main(): global args |