[Bf-extensions-cvs] [f1c6cfa2] blender-v2.79-release: Fix part of T52649: When using 'selected objects' option, export could fail.

Bastien Montagne noreply at git.blender.org
Mon Sep 4 21:01:25 CEST 2017


Commit: f1c6cfa21594e7c8b7a43cd1e0653d8a812929c6
Author: Bastien Montagne
Date:   Mon Sep 4 19:23:16 2017 +0200
Branches: blender-v2.79-release
https://developer.blender.org/rBAf1c6cfa21594e7c8b7a43cd1e0653d8a812929c6

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

===================================================================

M	io_scene_fbx/export_fbx_bin.py

===================================================================

diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index 880cd448..e9e1248e 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -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



More information about the Bf-extensions-cvs mailing list