diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-19 15:40:57 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-19 15:40:57 +0300 |
commit | 2dac8b3ee043d9d50e334c7430dc3aee49a3315e (patch) | |
tree | 6418b183fd9de74906e38072182bb8c04a314e54 /tests/python/alembic_tests.py | |
parent | b148ac5cf77a869bcca5b51716141400bb90a70d (diff) |
Alembic import/export: added as_background_job option
The ABC_export and ABC_import functions both take a as_background_job
parameter, and return a boolean.
When as_background_job=true, returns false immediately after scheduling
a background job. This was the old behaviour of this function, which makes
it very hard for scripts to do something with the data after the import
or export completes.
When as_background_job=false, performs the export synchronously, and
returns true when the export was ok, and false if there were any errors.
This allows further processing.
The Scene.alembic_export() function is deprecated, and will be removed from
Blender 2.8 in favour of calling the bpy.ops.wm.alembic_export() operator.
As such, it has been hard-coded to the old background job behaviour.
Diffstat (limited to 'tests/python/alembic_tests.py')
-rwxr-xr-x | tests/python/alembic_tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/python/alembic_tests.py b/tests/python/alembic_tests.py index 4af69dd23fb..1cdfd75426a 100755 --- a/tests/python/alembic_tests.py +++ b/tests/python/alembic_tests.py @@ -317,7 +317,8 @@ class HairParticlesExportTest(AbstractAlembicTest): abc = tempdir / 'hair-particles.abc' script = "import bpy; bpy.ops.wm.alembic_export(filepath='%s', start=1, end=1, " \ "renderable_only=True, visible_layers_only=True, flatten=False, " \ - "export_hair=%r, export_particles=%r)" % (abc, export_hair, export_particles) + "export_hair=%r, export_particles=%r, as_background_job=False)" \ + % (abc, export_hair, export_particles) self.run_blender('hair-particles.blend', script) return abc |