Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2022-05-12 11:04:02 +0300
committerSergey Sharybin <sergey@blender.org>2022-05-12 12:37:05 +0300
commit81f23ad57a0156ee8fed44e372ff81d69d022e7b (patch)
tree688c62568d206e87b1c2b874ae0bff4d81c47a94 /source/blender/blenkernel
parentca5f832fe9a640a3ab6b874852356ddd4d9e3f1a (diff)
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.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_tracking.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h
index 2d115cfb351..c6388c186f0 100644
--- a/source/blender/blenkernel/BKE_tracking.h
+++ b/source/blender/blenkernel/BKE_tracking.h
@@ -29,6 +29,32 @@ 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