Fix T64827 (part two): "Batch-Generate Previews" fails with certain files

Some values (not properly handled by do_versions?) could cause
'rna_backup_restore()' to throw an error resulting in the whole preview
generation not being saved to the .blend file.

I've checked folowwing demo files:
- race_spaceship.blend
- wasp_bot.blend

Here the offending seetings were:
- `UnitSettings` (`length_unit`, ...)
- `FFmpegSettings` (`ffmpeg_preset`, ...)

For now, these are now excluded in `exclude_props`

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5255
This commit is contained in:
Philipp Oeser 2019-07-15 11:53:57 +02:00
parent 70d193203b
commit 8a5a8282ce
Notes: blender-bot 2023-02-14 02:32:26 +01:00
Referenced by commit f3899c13cd, Fix T64827: "Batch-Generate Previews" crashes.
Referenced by commit 125e0cfb25, Revert "Fix T64827 (part two): "Batch-Generate Previews" fails with certain files"
Referenced by issue #64827, "Batch-Generate Previews" crashes
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern):
if engine == '__SCENE':
backup_scene, backup_world, backup_camera, backup_light, backup_camera_data, backup_light_data = [()] * 6
scene = bpy.context.window.scene
exclude_props = {('world',), ('camera',), ('tool_settings',), ('preview',)}
exclude_props = {('world',), ('camera',), ('tool_settings',), ('preview',), ('render','ffmpeg'), ('unit_settings',)}
backup_scene = tuple(rna_backup_gen(scene, exclude_props=exclude_props))
world = scene.world
camera = scene.camera