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
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-04-07 18:51:23 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-04-07 18:51:23 +0300
commit31c272e840af0ae4400ffee87e6ac86076580ee5 (patch)
treea3e91b77467e64a2d5050c887100aa1a2786ec83 /tests/python/render_layer
parentad60283bc87ff85332bdfe46a8db06fb1ad03de2 (diff)
Simplified some test code in render_layer_common.py
Diffstat (limited to 'tests/python/render_layer')
-rw-r--r--tests/python/render_layer/render_layer_common.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/python/render_layer/render_layer_common.py b/tests/python/render_layer/render_layer_common.py
index 645b111b49c..4fb714e429e 100644
--- a/tests/python/render_layer/render_layer_common.py
+++ b/tests/python/render_layer/render_layer_common.py
@@ -127,11 +127,10 @@ def query_scene(filepath, name, callbacks):
with blendfile.open_blend(filepath) as blend:
scenes = [block for block in blend.blocks if block.code == b'SC']
for scene in scenes:
- if scene.get((b'id', b'name'))[2:] == name:
- output = []
- for callback in callbacks:
- output.append(callback(scene))
- return output
+ if scene.get((b'id', b'name'))[2:] != name:
+ continue
+
+ return [callback(scene) for callback in callbacks]
# ############################################################