diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-12 15:13:53 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-12 15:13:53 +0400 |
commit | 552887251fa984cc7ff8e15aed59e82227d47c22 (patch) | |
tree | d76816f93fd577580dbd423e5347637ade211d13 /source/blender/makesdna | |
parent | bc6929fcdd87a1eaa721459cd57a25ecfa8bf0d4 (diff) |
Masking support for motion tracks
Added option to use Grease Pencil datablock as a mask for pattern
when doing motion tracking. Option could be found in Tracking Settings
panel.
All strokes would be rasterized separately from each other and every
stroke is treating as a closed spline.
Also added option to apply a mask on track preview which is situated
just after B/B/W channel button under track preview.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_movieclip_types.h | 5 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_tracking_types.h | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index b5ab7898bd9..19004dbc8b8 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -90,7 +90,8 @@ typedef struct MovieClip { } MovieClip; typedef struct MovieClipScopes { - int ok; /* 1 means scopes are ok and recalculation is unneeded */ + short ok; /* 1 means scopes are ok and recalculation is unneeded */ + short use_track_mask; /* whether track's mask should be applied on preview */ int track_preview_height; /* height of track preview widget */ int frame_width, frame_height; /* width and height of frame for which scopes are calculated */ struct MovieTrackingMarker undist_marker; /* undistorted position of marker used for pattern sampling */ @@ -98,7 +99,7 @@ typedef struct MovieClipScopes { struct ImBuf *track_preview; /* ImBuf displayed in track preview */ float track_pos[2]; /* sub-pizel position of marker in track ImBuf */ short track_disabled; /* active track is disabled, special notifier should be drawn */ - char pad[2]; + short track_locked; /* active track is locked, no transformation should be allowed */ int framenr; /* frame number scopes are created for */ struct MovieTrackingTrack *track; /* track scopes are created for */ struct MovieTrackingMarker *marker; /* marker scopes are created for */ diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index 6ca63f2c1c9..84ae1835751 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -287,6 +287,7 @@ enum { #define TRACK_USE_2D_STAB (1 << 8) #define TRACK_PREVIEW_GRAYSCALE (1 << 9) #define TRACK_DOPE_SEL (1 << 10) +#define TRACK_PREVIEW_ALPHA (1 << 11) /* MovieTrackingTrack->motion_model */ #define TRACK_MOTION_MODEL_TRANSLATION 0 @@ -297,8 +298,9 @@ enum { #define TRACK_MOTION_MODEL_HOMOGRAPHY 5 /* MovieTrackingTrack->algorithm_flag */ -#define TRACK_ALGORITHM_FLAG_USE_BRUTE 1 -#define TRACK_ALGORITHM_FLAG_USE_NORMALIZATION 2 +#define TRACK_ALGORITHM_FLAG_USE_BRUTE (1 << 0) +#define TRACK_ALGORITHM_FLAG_USE_NORMALIZATION (1 << 2) +#define TRACK_ALGORITHM_FLAG_USE_MASK (1 << 3) /* MovieTrackingTrack->adjframes */ #define TRACK_MATCH_KEYFRAME 0 |