Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SHARMA VAIBHAV
Thesis Vaibhav - appendix
Commits
4a3a656e
Commit
4a3a656e
authored
Oct 13, 2021
by
SHARMA VAIBHAV
Browse files
Add new file
parent
680f07b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Blender Marker cordinate location model.py
0 → 100644
View file @
4a3a656e
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]))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment