Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-04-19 15:40:57 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-04-19 15:40:57 +0300
commit2dac8b3ee043d9d50e334c7430dc3aee49a3315e (patch)
tree6418b183fd9de74906e38072182bb8c04a314e54 /tests
parentb148ac5cf77a869bcca5b51716141400bb90a70d (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')
-rwxr-xr-xtests/python/alembic_tests.py3
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