From e80cdf3f08fa30e9742fd57c3e2caf1dc3731320 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 24 Dec 2011 07:56:06 +0000 Subject: fix for change to row major matrices --- io_scene_fbx/export_fbx.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'io_scene_fbx') 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): -- cgit v1.2.3