Open in new Blender: switch to the scene that rendered the mkv

This commit is contained in:
Sybren A. Stüvel 2016-10-13 10:06:15 +02:00
parent 5117ec7cde
commit 0b2f0a3ec1

View File

@ -460,6 +460,8 @@ class ATTRACT_OT_open_meta_blendfile(AttractOperatorMixin, Operator):
cmd[1:1] = [v for v in sys.argv if v.startswith('--enable-')] cmd[1:1] = [v for v in sys.argv if v.startswith('--enable-')]
if scene: if scene:
cmd.extend(['--python-expr',
'import bpy; bpy.context.screen.scene = bpy.data.scenes["%s"]' % scene])
cmd.extend(['--scene', scene]) cmd.extend(['--scene', scene])
subprocess.Popen(cmd) subprocess.Popen(cmd)