[Bf-extensions-cvs] [54eaab8] master: FBX: correction to previous commit.

Bastien Montagne noreply at git.blender.org
Tue Oct 7 15:29:55 CEST 2014


Commit: 54eaab823ad64e62c0ba564588ca3812a220d8eb
Author: Bastien Montagne
Date:   Tue Oct 7 15:27:53 2014 +0200
Branches: master
https://developer.blender.org/rBA54eaab823ad64e62c0ba564588ca3812a220d8eb

FBX: correction to previous commit.

Better to use real Scale matrix than mere float multiplication here, I think.

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

M	io_scene_fbx_experimental/export_fbx_bin.py

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

diff --git a/io_scene_fbx_experimental/export_fbx_bin.py b/io_scene_fbx_experimental/export_fbx_bin.py
index 1b9b88d..e69ba58 100644
--- a/io_scene_fbx_experimental/export_fbx_bin.py
+++ b/io_scene_fbx_experimental/export_fbx_bin.py
@@ -2739,7 +2739,7 @@ def save_single(operator, scene, filepath="",
     # (1.0 meaning centimeter, afaik). We use that to reflect user's default unit as set in Blender with scale_length.
     # However, we always get values in BU (i.e. meters), so we have to reverse-apply that scale in global matrix...
     if scene.unit_settings.system != 'NONE':
-        global_matrix *= (1.0 / scene.unit_settings.scale_length)
+        global_matrix = global_matrix * Matrix.Scale(1.0 / scene.unit_settings.scale_length, 4)
     global_scale = global_matrix.median_scale
     global_matrix_inv = global_matrix.inverted()
     # For transforming mesh normals.



More information about the Bf-extensions-cvs mailing list