Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-24 11:56:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-24 11:56:06 +0400
commite80cdf3f08fa30e9742fd57c3e2caf1dc3731320 (patch)
treeff67f6d3cf55f7aa6ef4045885af580fb5bbe753 /io_scene_fbx
parentdc957fc300560c93f05c410bb05762c7f0b8f00a (diff)
fix for change to row major matrices
Diffstat (limited to 'io_scene_fbx')
-rw-r--r--io_scene_fbx/export_fbx.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py
index e7c61f18..a310325a 100644
--- a/io_scene_fbx/export_fbx.py
+++ b/io_scene_fbx/export_fbx.py
@@ -128,7 +128,12 @@ def sane_groupname(data):
def mat4x4str(mat):
- return '%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,%.15f' % tuple([f for v in mat for f in v])
+ # blender matrix is row major, fbx is col major so transpose on write
+ return ("%.15f,%.15f,%.15f,%.15f,"
+ "%.15f,%.15f,%.15f,%.15f,"
+ "%.15f,%.15f,%.15f,%.15f,"
+ "%.15f,%.15f,%.15f,%.15f" %
+ tuple([f for v in mat.transposed() for f in v]))
def action_bone_names(obj, action):