This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent 7ec864d04f
commit 652c1c0ee6
+5 -5
View File
@@ -6,11 +6,11 @@ def exportData(ob):
while(par is not None):
par = par.parent
file.write('{\n' + ob.type+": "+ob.name+"\n")
file.write("pos: "+str(ob.location.x)+" "+str(ob.location.y)+" "+str(ob.location.z)+"\n")
file.write("rot: "+str(ob.rotation_quaternion.w)+" "+str(ob.rotation_quaternion.x)+" "+str(ob.rotation_quaternion.y)+" "+str(-ob.rotation_quaternion.z)+"\n")
file.write("scale: "+str(ob.scale.x)+" "+str(ob.scale.y)+" "+str(ob.scale.z)+"\n")
file.write("parent: "+('-' if par is None else par.name)+"\n")
file.write('{\n' + ob.type + ": " + ob.name + '\n')
file.write('pos: ' + str(ob.location.x) + ' ' + str(ob.location.y) + ' ' + str(ob.location.z) + '\n')
file.write('rot: ' + str(ob.rotation_quaternion.w) + ' ' + str(ob.rotation_quaternion.x) + ' ' + str(ob.rotation_quaternion.y) + ' ' + str(-ob.rotation_quaternion.z) + '\n')
file.write('scale: ' + str(ob.scale.x) + ' ' + str(ob.scale.y) + ' ' + str(ob.scale.z) + '\n')
file.write('parent: ' + ('-' if par is None else par.name) + '\n')
if(ob.type=="ARMATURE"):
numAnims=len(ob.animation_data.nla_tracks[0].strips)
file.write("bones: "+str(len(ob.data.bones)) + ' ' + str(numAnims) + ' ')