0
$\begingroup$

I'd like to remove all tracks in a movieclip that don't have any segment. Since there's no such operator, I'd like to do it in python but I can't find a way to check if a track has a segment.

I've tried things like tracks['some-track'].has_bundle or average_error but these don't certify it.

$\endgroup$
0
$\begingroup$

This seems to be a good check:

track = bpy.data.movieclips['some_clip'].tracking.tracks['some_track']
len(track.markers) <= 3

As I understand it, each track has one marker per tracked frame and for some reason, some tracks with no segment can still have up to 3 markers.

There might be a better solution but so far I haven't had an issue with that.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.