Per-track grease pencil data blocks

Added support of tracks to have their own grease pencil datablock.
This is controllable by Clip/Track toggle in Grease Pencil panel
in Clip Editor.

This toggle shows whether grease pencil stroke should go to movie clip's
datablock or to active track. As soon as this toggle is switched to Track,
all further strokes would be added to active track and only strokes which
belongs to active track would be displayed on the screen.

This strokes would be relative to track's position, which means if one
made some strokes to track and started moving it, stokes would be moved
together with track.

Different tracks might share the same grease pencil datablock.

Also hide draw modes which are not supported by space clip.

Initial idea why tracks should have grease pencil datablocks was to
support easy mask creation for tracking. This seemed fastest and
easiest way to achieve mask editing for tracks.

To get mask for specified track there's function BKE_tracking_track_mask_get
which requires MovieTracking structure, track for which mask is creating and
also width and height of current overall frame. it'll return ImBuf with
mask (probably it's more like overkill, because internally it works with
single-channel value buffer and probably that's one should be passing to
libmv).

Probably hacking grease pencil in such way is not ideal solution, but that
part of code might be cleaned up further and it seems to be straightforward
to use grease pencil for such a purpose.

Note: this is commit to tomato branch, not to trunk.
This commit is contained in:
2012-05-14 17:23:37 +00:00
parent 389ae71316
commit c62077ce66
16 changed files with 238 additions and 24 deletions

View File

@@ -17,6 +17,7 @@ incs += ' #/intern/smoke/extern'
incs += ' #/intern/mikktspace'
incs += ' #/intern/audaspace/intern'
incs += ' #/intern/ffmpeg'
incs += ' #/intern/raskter'
incs += ' ' + env['BF_OPENGL_INC']
incs += ' ' + env['BF_ZLIB_INC']