Hi guys.
I’m traying to save the location of an object and save it in a txt file, I can do that in one frame but I don’t how to put this and make it for each frame depending the length of the timeline. This is the code: (I am a NOOB with Python, sorry for the syntaxis)
import bpy, os
selection = bpy.context.selected_objects
resultado1 = “”
for sel in selection:
dims = sel.location
resultado1 += "%s : Locación: X=%.03fm Y=%.03fm Z=%.03fm
" % (sel.name, dims.x, dims.y, dims.z)
path = “C:/Users/Luis Voronov/Desktop/Guardar Datos”
os.makedirs(path, exist_ok=True)
file = open(“Datos.txt”, “w”)
file.write(resultado1)
file.close()
Can anyone help me?
Thanks.