Fix part of T52649: When using 'selected objects' option, export could fail.

Broken logic in selecting 'best' scene to take settings from while
generating temp new scene used to export selected objects only.

Safe enough to be backported to 2.79
This commit is contained in:
Bastien Montagne 2017-09-04 19:23:16 +02:00
parent b27d39a2e0
commit a87b9998d8
1 changed files with 1 additions and 1 deletions

View File

@ -3129,7 +3129,7 @@ def save(operator, context,
# Find the 'most used' source scene, and use its unit settings. This is somewhat weak, but should work
# fine in most cases, and avoids stupid issues like T41931.
best_src_scene = None
best_src_scene_users = 0
best_src_scene_users = -1
for sce, nbr_users in src_scenes.items():
if (nbr_users) > best_src_scene_users:
best_src_scene_users = nbr_users