Fix T49119: Batch-Generate Previews operator fails.

previews render utils needed to be updated slightly against new behavior of maindata.remove.
This commit is contained in:
Bastien Montagne 2016-08-20 14:48:33 +02:00
parent 8e02b024c0
commit 67dcad4011
Notes: blender-bot 2023-02-14 07:40:52 +01:00
Referenced by issue #49119, Batch-Generate Previews operator fails
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
scene.objects.unlink(bpy.data.objects[render_context.camera, None])
if render_context.lamp:
scene.objects.unlink(bpy.data.objects[render_context.lamp, None])
bpy.data.scenes.remove(scene)
bpy.data.scenes.remove(scene, do_unlink=True)
scene = None
else:
rna_backup_restore(scene, render_context.backup_scene)