diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-10 03:10:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-10 03:10:20 +0300 |
commit | 4d24ac5ca09e45b3afb6873ddfdf3530ff98f097 (patch) | |
tree | 12117afafc25e8475fdb22e4853ace35f68ed1d7 | |
parent | b781657f437870bf2c14dd5901388de0fdf4ef52 (diff) |
patch [#25979] fixes for addons/io_scene_fbx, io_scene_x3d
from Filiciss Muhgue (filiciss)
fixes [#25997] Export to X3D reports error TypeError: 'NoneType' object is not scriptable.
-rw-r--r-- | io_scene_fbx/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_fbx/export_fbx.py | 10 | ||||
-rw-r--r-- | io_scene_x3d/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_x3d/export_x3d.py | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 28129b69..3ac33162 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 eb4e8ed2..c9694d9c 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 c758915f..565addd8 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 0aaa1ccf..6188af56 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()[:] ########################################################## |