diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 28129b6914b9740e517c246451996c707b0dcfd2..3ac33162c670b2f0daaf18344c95f42a513eee0e 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -21,6 +21,8 @@ bl_info = { "name": "Autodesk FBX format", "author": "Campbell Barton", + "blender": (2, 5, 6), + "api": 34647, "location": "File > Import-Export", "description": "Import-Export FBX meshes, UV's, vertex colors, materials, textures, cameras and lamps", "warning": "", diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py index eb4e8ed288811a87181d74c47c91443c3463f24e..c9694d9cc4a2859a63ef5ecc32ca3f5ae7f1272b 100644 --- a/io_scene_fbx/export_fbx.py +++ b/io_scene_fbx/export_fbx.py @@ -469,8 +469,8 @@ def save(operator, context, filepath="", #return mtx4_z90 * (self.getPoseMatrix(frame) * arm_mat) # dont apply arm matrix anymore return self.getPoseMatrix(frame) * mtx4_z90 else: - #return (mtx4_z90 * ((self.getPoseMatrix(frame) * arm_mat))) * (mtx4_z90 * (self.parent.getPoseMatrix(frame) * arm_mat)).invert() - return (self.parent.getPoseMatrix(frame) * mtx4_z90).invert() * ((self.getPoseMatrix(frame)) * mtx4_z90) + #return (mtx4_z90 * ((self.getPoseMatrix(frame) * arm_mat))) * (mtx4_z90 * (self.parent.getPoseMatrix(frame) * arm_mat)).inverted() + return (self.parent.getPoseMatrix(frame) * mtx4_z90).inverted() * ((self.getPoseMatrix(frame)) * mtx4_z90) # we need thes because cameras and lights modified rotations def getAnimParRelMatrixRot(self, frame): @@ -527,14 +527,14 @@ def save(operator, context, filepath="", def getAnimParRelMatrix(self, frame): if self.fbxParent: #return (self.__anim_poselist[frame] * self.fbxParent.__anim_poselist[frame].inverted() ) * GLOBAL_MATRIX - return (GLOBAL_MATRIX * self.fbxParent.__anim_poselist[frame]).invert() * (GLOBAL_MATRIX * self.__anim_poselist[frame]) + return (GLOBAL_MATRIX * self.fbxParent.__anim_poselist[frame]).inverted() * (GLOBAL_MATRIX * self.__anim_poselist[frame]) else: return GLOBAL_MATRIX * self.__anim_poselist[frame] def getAnimParRelMatrixRot(self, frame): obj_type = self.blenObject.type if self.fbxParent: - matrix_rot = ((GLOBAL_MATRIX * self.fbxParent.__anim_poselist[frame]).invert() * (GLOBAL_MATRIX * self.__anim_poselist[frame])).to_3x3() + matrix_rot = ((GLOBAL_MATRIX * self.fbxParent.__anim_poselist[frame]).inverted() * (GLOBAL_MATRIX * self.__anim_poselist[frame])).to_3x3() else: matrix_rot = (GLOBAL_MATRIX * self.__anim_poselist[frame]).to_3x3() @@ -1441,7 +1441,7 @@ def save(operator, context, filepath="", #m = mtx4_z90 * my_bone.restMatrix matstr = mat4x4str(m) - matstr_i = mat4x4str(m.invert()) + matstr_i = mat4x4str(m.inverted()) file.write('\n\t\tTransform: %s' % matstr_i) # THIS IS __NOT__ THE GLOBAL MATRIX AS DOCUMENTED :/ file.write('\n\t\tTransformLink: %s' % matstr) diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py index c758915fbe771865fb2ba25880af7af357282779..565addd8d60f076180b968283846c3071757a867 100644 --- a/io_scene_x3d/__init__.py +++ b/io_scene_x3d/__init__.py @@ -22,7 +22,7 @@ bl_info = { "name": "Web3D X3D/VRML format", "author": "Campbell Barton, Bart", "blender": (2, 5, 6), - "api": 34386, + "api": 34647, "location": "File > Import-Export", "description": "Import-Export X3D, Import VRML", "warning": "", diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index 0aaa1ccfac813233cb01934bfe3da918053d2eea..6188af5685143293fbb2bdd45bd00fdab1bd729c 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -47,7 +47,7 @@ def round_color(col, cp): def matrix_direction(mtx): - return (mathutils.Vector((0.0, 0.0, -1.0)) * mtx.to_3x3()).normalize()[:] + return (mathutils.Vector((0.0, 0.0, -1.0)) * mtx.to_3x3()).normalized()[:] ##########################################################