Discussion:
[Bf-python] Source code for 2D Stabilization UI
Leo Sutic
2014-03-26 19:53:35 UTC
Permalink
Hi all,

I'm writing a Python script that will modify movie tracking tracks to
make them better suitable for 2D stabilization. The idea is to use the
feature tracking to create tracks, then use this script to create *new*
tracks from the existing ones, and finally to use the new tracks in the
2D stabilization.

I have the actual modification algorithm all done and tested. All I have
to do is feed it an input track and an output track, and it works great.

What I'm now trying to do is create a nice UI for it, and here I would
like a UI panel with a list of tracks for the current clip, a box to
select the output track and a button that says "Execute":

Input:
[ Track ] +
[ Track.001 ] -
[ ] V
[ ]

Output:
[ ] +

( Execute )

In short, I'd like to duplicate the 2D Stabilization panel, remove some
stuff and put my own code behind the "Execute" button.

I have the button figured out and working, but for the life of me I
can't figure out how to do the list of input tracks and the single box
for the output track.

The space_clip.py contains the UI for the panel, but I'm completely lost
as to how to declare the right properties so that the template_list
function will be happy.

I suspect that the answer is somewhere in the Blender source code and in
the definition of bpy.types MovieTrackingStabilization, but I can't find
it. Anyone knows where it is?

/LS

Loading...