From e069b00331a1cf3316053c61bca6b49e37155eef Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 23 Jan 2011 13:06:39 +0000 Subject: add accessor function to private variable, direct access was giving an error. --- io_scene_fbx/export_fbx.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'io_scene_fbx') diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py index 4cdc55da..f1eabc67 100644 --- a/io_scene_fbx/export_fbx.py +++ b/io_scene_fbx/export_fbx.py @@ -446,6 +446,9 @@ def save(operator, context, filepath="", self.__anim_poselist[f] = self.__pose_bone.matrix.copy() + def getPoseBone(self): + return self.__pose_bone + # get pose from frame. def getPoseMatrix(self, f): # ---------------------------------------------- return self.__anim_poselist[f] @@ -798,7 +801,7 @@ def save(operator, context, filepath="", file.write('\n\t\tVersion: 232') #poseMatrix = write_object_props(my_bone.blenBone, None, None, my_bone.fbxArm.parRelMatrix())[3] - poseMatrix = write_object_props(my_bone.blenBone, pose_bone=my_bone.__pose_bone)[3] # dont apply bone matricies anymore + poseMatrix = write_object_props(my_bone.blenBone, pose_bone=my_bone.getPoseBone())[3] # dont apply bone matricies anymore pose_items.append((my_bone.fbxName, poseMatrix)) # file.write('\n\t\t\tProperty: "Size", "double", "",%.6f' % ((my_bone.blenData.head['ARMATURESPACE'] - my_bone.blenData.tail['ARMATURESPACE']) * my_bone.fbxArm.parRelMatrix()).length) @@ -2076,7 +2079,7 @@ def save(operator, context, filepath="", my_mesh.blenMaterialList = mats my_mesh.blenTextures = list(texture_mapping_local.keys()) - # sort the name so we get pradictable output, some items may be NULL + # sort the name so we get predictable output, some items may be NULL my_mesh.blenMaterials.sort(key=lambda m: (getattr(m[0], "name", ""), getattr(m[1], "name", ""))) my_mesh.blenTextures.sort(key=lambda m: getattr(m, "name", "")) -- cgit v1.2.3