Simplified some test code in render_layer_common.py

This commit is contained in:
Sybren A. Stüvel
2017-04-07 17:51:23 +02:00
parent ad60283bc8
commit 31c272e840

View File

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