0 Members and 2 Guests are viewing this topic.
for bonename in thearmature.data.bones.keys(): posebonemat = mathutils.Matrix(pose.bones[bonename].matrix ) # @ivar poseMatrix: The total transformation of this PoseBone including constraints. -- different from localMatrix try: bone = BONES[bonename] #look up md5bone except: print( "found a posebone animating a bone that is not part of the exported armature: " + bonename ) continue if bone.parent: # need parentspace-matrix parentposemat = mathutils.Matrix(pose.bones[bone.parent.name].matrix ) # @ivar poseMatrix: The total transformation of this PoseBone including constraints. -- different from localMatrix posebonemat = posebonemat*parentposemat.invert() else: posebonemat = posebonemat*thearmature.matrix_world loc = [posebonemat, posebonemat, posebonemat, ] rot = posebonemat.to_quat().normalize() rot = [rot.w,rot.x,rot.y,rot.z] animation.addkeyforbone(bone.id, time, loc, rot)
Was testing the script today and came across a minor issue, it's currently exporting all frames present in the Actions editor time line. Sometimes you need to 'over-pose' an animation to make sure it cycles correctly, right now the script is exporting those extra unwanted frames (its exporting 1>120 instead of 1>100). You need to add a UI input field so "start >> end" frames can be marked? Or read the rendering datablock that has "start >> end" data associated with still image rendering to get the actual limit?.
found bundled python: D:\PROGRA~1\BLENDE~1\BLENDE~1.54B\2.54\pythonread blend: F:\IMvu-WIPs\PET bunny\sneakyidle3 v254.blendTraceback (most recent call last): File "C:\Users\[user]\AppData\Roaming\Blender Foundation\Blender\2.54\scripts\io\io_export_md5.py", line 832, in execute name = self.properties.md5name,AttributeError: 'EXPORT_OT_md5' object has no attribute 'md5name'