Cleanup: Move tracking constants to be printable enums
Replace old-style define with an enumerator values. Also move to the top of the file preparing for making those stronger typed.
This commit is contained in:
parent
ca5f832fe9
commit
81f23ad57a
|
@ -28,6 +28,32 @@ struct Scene;
|
|||
struct bGPDlayer;
|
||||
struct rcti;
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Common types and constants.
|
||||
*/
|
||||
|
||||
enum {
|
||||
TRACK_CLEAR_UPTO = 0,
|
||||
TRACK_CLEAR_REMAINED = 1,
|
||||
TRACK_CLEAR_ALL = 2,
|
||||
};
|
||||
|
||||
enum {
|
||||
CLAMP_PAT_DIM = 1,
|
||||
CLAMP_PAT_POS = 2,
|
||||
CLAMP_SEARCH_DIM = 3,
|
||||
CLAMP_SEARCH_POS = 4,
|
||||
};
|
||||
|
||||
typedef enum eTrackArea {
|
||||
TRACK_AREA_POINT = (1 << 0),
|
||||
TRACK_AREA_PAT = (1 << 1),
|
||||
TRACK_AREA_SEARCH = (1 << 2),
|
||||
|
||||
TRACK_AREA_NONE = 0,
|
||||
TRACK_AREA_ALL = (TRACK_AREA_POINT | TRACK_AREA_PAT | TRACK_AREA_SEARCH),
|
||||
} eTrackArea;
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Common functions.
|
||||
*/
|
||||
|
@ -787,22 +813,6 @@ void BKE_tracking_get_rna_path_prefix_for_plane_track(
|
|||
(((marker)->flag & MARKER_DISABLED) == 0 || ((sc)->flag & SC_HIDE_DISABLED) == 0 || \
|
||||
((sc)->clip->tracking.act_track == track))
|
||||
|
||||
#define TRACK_CLEAR_UPTO 0
|
||||
#define TRACK_CLEAR_REMAINED 1
|
||||
#define TRACK_CLEAR_ALL 2
|
||||
|
||||
#define CLAMP_PAT_DIM 1
|
||||
#define CLAMP_PAT_POS 2
|
||||
#define CLAMP_SEARCH_DIM 3
|
||||
#define CLAMP_SEARCH_POS 4
|
||||
|
||||
#define TRACK_AREA_NONE -1
|
||||
#define TRACK_AREA_POINT 1
|
||||
#define TRACK_AREA_PAT 2
|
||||
#define TRACK_AREA_SEARCH 4
|
||||
|
||||
#define TRACK_AREA_ALL (TRACK_AREA_POINT | TRACK_AREA_PAT | TRACK_AREA_SEARCH)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue