Commit 4a3a656e authored by SHARMA VAIBHAV's avatar SHARMA VAIBHAV
Browse files

Add new file

parent 680f07b8
import bpy
import os
D = bpy.data
if not os.path.exists(bpy.path.abspath('//') + 'data'):
os.makedirs(bpy.path.abspath('//') + 'data')
for clip in D.movieclips:
for track in clip.tracking.tracks:
name = '\\tr_{0}_{1}.csv'.format(clip.name.split('.')[0], track.name)
fn=bpy.path.abspath('//')+'data\\' + name
with open(fn, 'w') as f:
f.write('Frame,x,y\n')
for marker in track.markers:
coords = marker.co.xy
frameno = marker.frame
f.write('{0},{1},{2}\n'.format(frameno, coords[0]*clip.size[0], coords[1]*clip.size[1]))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment