Fix T49119: Batch-Generate Previews operator fails.
authorBastien Montagne <montagne29@wanadoo.fr>
Sat, 20 Aug 2016 12:48:33 +0000 (14:48 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Sat, 20 Aug 2016 12:49:44 +0000 (14:49 +0200)
previews render utils needed to be updated slightly against new behavior of maindata.remove.

release/scripts/modules/bl_previews_utils/bl_previews_render.py

index 6c29223cf556cb25e7870ef7db36a1edfea767c8..f7317184bd2922833105ab0e89f2f855076896de 100644 (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)