diff options
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_mask_types.h | 13 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_tracking_types.h | 55 |
3 files changed, 69 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_mask_types.h b/source/blender/makesdna/DNA_mask_types.h index 1b6b802f2de..1b1c912d179 100644 --- a/source/blender/makesdna/DNA_mask_types.h +++ b/source/blender/makesdna/DNA_mask_types.h @@ -58,15 +58,18 @@ typedef struct Mask { typedef struct MaskParent { // int flag; /* parenting flags */ /* not used */ - int pad; int id_type; /* type of parenting */ + int type; /* type of parenting */ ID *id; /* ID block of entity to which mask/spline is parented to * in case of parenting to movie tracking data set to MovieClip datablock */ char parent[64]; /* entity of parent to which parenting happened * in case of parenting to movie tracking data contains name of layer */ char sub_parent[64]; /* sub-entity of parent to which parenting happened * in case of parenting to movie tracking data contains name of track */ - float parent_orig[2]; /* track location at the moment of parenting */ + float parent_orig[2]; /* track location at the moment of parenting, + stored in mask space*/ + + float parent_corners_orig[4][2]; /* Original corners of plane track at the moment of parenting */ } MaskParent; typedef struct MaskSplinePointUW { @@ -141,6 +144,12 @@ typedef struct MaskLayer { /* MaskParent->flag */ /* #define MASK_PARENT_ACTIVE (1 << 0) */ /* UNUSED */ +/* MaskParent->type */ +enum { + MASK_PARENT_POINT_TRACK = 0, /* parenting happens to point track */ + MASK_PARENT_PLANE_TRACK = 1, /* parenting happens to plane track */ +}; + /* MaskSpline->flag */ /* reserve (1 << 0) for SELECT */ enum { diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 9ff4392242e..109cdf5f1a1 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -827,6 +827,10 @@ typedef struct NodeTranslateData { char pad[6]; } NodeTranslateData; +typedef struct NodePlaneTrackDeformData { + char tracking_object[64]; + char plane_track_name[64]; +} NodePlaneTrackDeformData; typedef struct NodeShaderScript { int mode; diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index 04cd69bc5ae..f81ac4dab06 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -144,6 +144,44 @@ typedef struct MovieTrackingTrack { struct bGPdata *gpd; /* grease-pencil data */ } MovieTrackingTrack; +typedef struct MovieTrackingPlaneMarker { + /* Corners of the plane in the following order: + * + * Y + * ^ + * | (3) --- (2) + * | | | + * | | | + * | | | + * | (0) --- (1) + * +-------------> X + * + * The coordinates are stored in frame normalized coordinates. + */ + float corners[4][2]; + + int framenr; /* Number of frame plane marker is associated with */ + int flag; /* Marker's flag (alive, ...) */ +} MovieTrackingPlaneMarker; + +typedef struct MovieTrackingPlaneTrack { + struct MovieTrackingPlaneTrack *next, *prev; + + char name[64]; /* MAX_NAME */ + + MovieTrackingTrack **point_tracks; /* Array of point tracks used to define this plane. + Each element is a pointer to MovieTrackingTrack. */ + int point_tracksnr, pad; /* Number of tracks in point_tracks array. */ + + MovieTrackingPlaneMarker *markers; /* Markers in the plane track */ + int markersnr; /* Count of markers in track (size of markers array) */ + + int flag; /* flags (selection, ...) */ + + /* Runtime data */ + int last_marker, pad2; /* Most recently used marker */ +} MovieTrackingPlaneTrack; + typedef struct MovieTrackingSettings { int flag; @@ -225,6 +263,7 @@ typedef struct MovieTrackingObject { float scale; /* scale of object solution in amera space */ ListBase tracks; /* list of tracks use to tracking this object */ + ListBase plane_tracks; /* list of plane tracks used by this object */ MovieTrackingReconstruction reconstruction; /* reconstruction data for this object */ /* reconstruction options */ @@ -280,9 +319,11 @@ typedef struct MovieTracking { MovieTrackingSettings settings; /* different tracking-related settings */ MovieTrackingCamera camera; /* camera intrinsics */ ListBase tracks; /* list of tracks used for camera object */ + ListBase plane_tracks; /* list of plane tracks used by camera object */ MovieTrackingReconstruction reconstruction; /* reconstruction data for camera object */ MovieTrackingStabilization stabilization; /* stabilization data */ - MovieTrackingTrack *act_track; /* active track */ + MovieTrackingTrack *act_track; /* active track */ + MovieTrackingPlaneTrack *act_plane_track; /* active plane track */ ListBase objects; int objectnr, tot_object; /* index of active object and total number of objects */ @@ -432,4 +473,16 @@ enum { TRACKING_COVERAGE_OK = 2 }; +/* MovieTrackingPlaneMarker->flag */ +enum { + PLANE_MARKER_DISABLED = (1 << 0), + PLANE_MARKER_TRACKED = (1 << 1), +}; + +/* MovieTrackingPlaneTrack->flag */ +enum { + PLANE_TRACK_HIDDEN = (1 << 1), + PLANE_TRACK_LOCKED = (1 << 2), +}; + #endif /* __DNA_TRACKING_TYPES_H__ */ |