diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-05 13:40:00 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-05 13:40:00 +0400 |
commit | fdcf4e338519e4c249adb1a033043c3467c9ccc6 (patch) | |
tree | 0186efa98af853cf09e9ee4dfbb17184209017bb /source/blender | |
parent | c557f6f0b64b0ca7ec1cb3f17e2b40bc76e4368a (diff) |
Use enums rather than defines for clips/tracking flags.
Helps a lot when debugging.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesdna/DNA_movieclip_types.h | 56 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_tracking_types.h | 150 |
2 files changed, 126 insertions, 80 deletions
diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index cda51779528..499f1c50155 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -118,38 +118,50 @@ typedef struct MovieClipScopes { } MovieClipScopes; /* MovieClipProxy->build_size_flag */ -#define MCLIP_PROXY_SIZE_25 (1 << 0) -#define MCLIP_PROXY_SIZE_50 (1 << 1) -#define MCLIP_PROXY_SIZE_75 (1 << 2) -#define MCLIP_PROXY_SIZE_100 (1 << 3) -#define MCLIP_PROXY_UNDISTORTED_SIZE_25 (1 << 4) -#define MCLIP_PROXY_UNDISTORTED_SIZE_50 (1 << 5) -#define MCLIP_PROXY_UNDISTORTED_SIZE_75 (1 << 6) -#define MCLIP_PROXY_UNDISTORTED_SIZE_100 (1 << 7) +enum { + MCLIP_PROXY_SIZE_25 = (1 << 0), + MCLIP_PROXY_SIZE_50 = (1 << 1), + MCLIP_PROXY_SIZE_75 = (1 << 2), + MCLIP_PROXY_SIZE_100 = (1 << 3), + MCLIP_PROXY_UNDISTORTED_SIZE_25 = (1 << 4), + MCLIP_PROXY_UNDISTORTED_SIZE_50 = (1 << 5), + MCLIP_PROXY_UNDISTORTED_SIZE_75 = (1 << 6), + MCLIP_PROXY_UNDISTORTED_SIZE_100 = (1 << 7) +}; /* MovieClip->source */ -#define MCLIP_SRC_SEQUENCE 1 -#define MCLIP_SRC_MOVIE 2 +enum { + MCLIP_SRC_SEQUENCE = 1, + MCLIP_SRC_MOVIE = 2 +}; /* MovieClip->selection types */ -#define MCLIP_SEL_NONE 0 -#define MCLIP_SEL_TRACK 1 +enum { + MCLIP_SEL_NONE = 0, + MCLIP_SEL_TRACK = 1 +}; /* MovieClip->flag */ -#define MCLIP_USE_PROXY (1 << 0) -#define MCLIP_USE_PROXY_CUSTOM_DIR (1 << 1) -/*#define MCLIP_CUSTOM_START_FRAME (1<<2)*/ /* UNUSED */ +enum { + MCLIP_USE_PROXY = (1 << 0), + MCLIP_USE_PROXY_CUSTOM_DIR = (1 << 1), + /* MCLIP_CUSTOM_START_FRAME = (1<<2), */ /* UNUSED */ -#define MCLIP_TIMECODE_FLAGS (MCLIP_USE_PROXY | MCLIP_USE_PROXY_CUSTOM_DIR) + MCLIP_TIMECODE_FLAGS = (MCLIP_USE_PROXY | MCLIP_USE_PROXY_CUSTOM_DIR) +}; /* MovieClip->render_size */ -#define MCLIP_PROXY_RENDER_SIZE_FULL 0 -#define MCLIP_PROXY_RENDER_SIZE_25 1 -#define MCLIP_PROXY_RENDER_SIZE_50 2 -#define MCLIP_PROXY_RENDER_SIZE_75 3 -#define MCLIP_PROXY_RENDER_SIZE_100 4 +enum { + MCLIP_PROXY_RENDER_SIZE_FULL = 0, + MCLIP_PROXY_RENDER_SIZE_25 = 1, + MCLIP_PROXY_RENDER_SIZE_50 = 2, + MCLIP_PROXY_RENDER_SIZE_75 = 3, + MCLIP_PROXY_RENDER_SIZE_100 = 4 +}; /* MovieClip->render_flag */ -#define MCLIP_PROXY_RENDER_UNDISTORT 1 +enum { + MCLIP_PROXY_RENDER_UNDISTORT = 1 +}; #endif diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index 6b918ea2395..9c80d30bca4 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -284,95 +284,129 @@ enum { }; /* MovieTrackingMarker->flag */ -#define MARKER_DISABLED (1 << 0) -#define MARKER_TRACKED (1 << 1) -#define MARKER_GRAPH_SEL_X (1 << 2) -#define MARKER_GRAPH_SEL_Y (1 << 3) -#define MARKER_GRAPH_SEL (MARKER_GRAPH_SEL_X | MARKER_GRAPH_SEL_Y) +enum { + MARKER_DISABLED = (1 << 0), + MARKER_TRACKED = (1 << 1), + MARKER_GRAPH_SEL_X = (1 << 2), + MARKER_GRAPH_SEL_Y = (1 << 3), + MARKER_GRAPH_SEL = (MARKER_GRAPH_SEL_X | MARKER_GRAPH_SEL_Y) +}; /* MovieTrackingTrack->flag */ -#define TRACK_HAS_BUNDLE (1 << 1) -#define TRACK_DISABLE_RED (1 << 2) -#define TRACK_DISABLE_GREEN (1 << 3) -#define TRACK_DISABLE_BLUE (1 << 4) -#define TRACK_HIDDEN (1 << 5) -#define TRACK_LOCKED (1 << 6) -#define TRACK_CUSTOMCOLOR (1 << 7) -#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) +enum { + TRACK_HAS_BUNDLE = (1 << 1), + TRACK_DISABLE_RED = (1 << 2), + TRACK_DISABLE_GREEN = (1 << 3), + TRACK_DISABLE_BLUE = (1 << 4), + TRACK_HIDDEN = (1 << 5), + TRACK_LOCKED = (1 << 6), + TRACK_CUSTOMCOLOR = (1 << 7), + TRACK_USE_2D_STAB = (1 << 8), + TRACK_PREVIEW_GRAYSCALE = (1 << 9), + TRACK_DOPE_SEL = (1 << 10), + TRACK_PREVIEW_ALPHA = (1 << 11) +}; /* MovieTrackingTrack->motion_model */ -#define TRACK_MOTION_MODEL_TRANSLATION 0 -#define TRACK_MOTION_MODEL_TRANSLATION_ROTATION 1 -#define TRACK_MOTION_MODEL_TRANSLATION_SCALE 2 -#define TRACK_MOTION_MODEL_TRANSLATION_ROTATION_SCALE 3 -#define TRACK_MOTION_MODEL_AFFINE 4 -#define TRACK_MOTION_MODEL_HOMOGRAPHY 5 +enum { + TRACK_MOTION_MODEL_TRANSLATION = 0, + TRACK_MOTION_MODEL_TRANSLATION_ROTATION = 1, + TRACK_MOTION_MODEL_TRANSLATION_SCALE = 2, + TRACK_MOTION_MODEL_TRANSLATION_ROTATION_SCALE = 3, + TRACK_MOTION_MODEL_AFFINE = 4, + TRACK_MOTION_MODEL_HOMOGRAPHY = 5 +}; /* MovieTrackingTrack->algorithm_flag */ -#define TRACK_ALGORITHM_FLAG_USE_BRUTE (1 << 0) -#define TRACK_ALGORITHM_FLAG_USE_NORMALIZATION (1 << 2) -#define TRACK_ALGORITHM_FLAG_USE_MASK (1 << 3) +enum { + TRACK_ALGORITHM_FLAG_USE_BRUTE = (1 << 0), + TRACK_ALGORITHM_FLAG_USE_NORMALIZATION = (1 << 2), + TRACK_ALGORITHM_FLAG_USE_MASK = (1 << 3) +}; /* MovieTrackingTrack->adjframes */ -#define TRACK_MATCH_KEYFRAME 0 -#define TRACK_MATCH_PREVFRAME 1 +enum { + TRACK_MATCH_KEYFRAME = 0, + TRACK_MATCH_PREVFRAME = 1 +}; /* MovieTrackingSettings->flag */ -#define TRACKING_SETTINGS_SHOW_DEFAULT_EXPANDED (1 << 0) +enum { + TRACKING_SETTINGS_SHOW_DEFAULT_EXPANDED = (1 << 0) +}; /* MovieTrackingSettings->motion_flag */ -#define TRACKING_MOTION_TRIPOD (1 << 0) +enum { + TRACKING_MOTION_TRIPOD = (1 << 0), -#define TRACKING_MOTION_MODAL (TRACKING_MOTION_TRIPOD) + TRACKING_MOTION_MODAL = (TRACKING_MOTION_TRIPOD) +}; /* MovieTrackingSettings->speed */ -#define TRACKING_SPEED_FASTEST 0 -#define TRACKING_SPEED_REALTIME 1 -#define TRACKING_SPEED_HALF 2 -#define TRACKING_SPEED_QUARTER 4 -#define TRACKING_SPEED_DOUBLE 5 +enum { + TRACKING_SPEED_FASTEST = 0, + TRACKING_SPEED_REALTIME = 1, + TRACKING_SPEED_HALF = 2, + TRACKING_SPEED_QUARTER = 4, + TRACKING_SPEED_DOUBLE = 5 +}; /* MovieTrackingObject->reconstruction_flag */ -#define TRACKING_USE_FALLBACK_RECONSTRUCTION (1 << 0) +enum { + TRACKING_USE_FALLBACK_RECONSTRUCTION = (1 << 0) +}; /* MovieTrackingSettings->refine_camera_intrinsics */ -#define REFINE_FOCAL_LENGTH (1 << 0) -#define REFINE_PRINCIPAL_POINT (1 << 1) -#define REFINE_RADIAL_DISTORTION_K1 (1 << 2) -#define REFINE_RADIAL_DISTORTION_K2 (1 << 4) +enum { + REFINE_FOCAL_LENGTH = (1 << 0), + REFINE_PRINCIPAL_POINT = (1 << 1), + REFINE_RADIAL_DISTORTION_K1 = (1 << 2), + REFINE_RADIAL_DISTORTION_K2 = (1 << 4) +}; /* MovieTrackingStrabilization->flag */ -#define TRACKING_2D_STABILIZATION (1 << 0) -#define TRACKING_AUTOSCALE (1 << 1) -#define TRACKING_STABILIZE_ROTATION (1 << 2) +enum { + TRACKING_2D_STABILIZATION = (1 << 0), + TRACKING_AUTOSCALE = (1 << 1), + TRACKING_STABILIZE_ROTATION = (1 << 2) +}; /* MovieTrackingStrabilization->filter */ -#define TRACKING_FILTER_NEAREAST 0 -#define TRACKING_FILTER_BILINEAR 1 -#define TRACKING_FILTER_BICUBIC 2 +enum { + TRACKING_FILTER_NEAREAST = 0, + TRACKING_FILTER_BILINEAR = 1, + TRACKING_FILTER_BICUBIC = 2 +}; /* MovieTrackingReconstruction->flag */ -#define TRACKING_RECONSTRUCTED (1 << 0) +enum { + TRACKING_RECONSTRUCTED = (1 << 0) +}; /* MovieTrackingObject->flag */ -#define TRACKING_OBJECT_CAMERA (1 << 0) +enum { + TRACKING_OBJECT_CAMERA = (1 << 0) +}; -#define TRACKING_CLEAN_SELECT 0 -#define TRACKING_CLEAN_DELETE_TRACK 1 -#define TRACKING_CLEAN_DELETE_SEGMENT 2 +enum { + TRACKING_CLEAN_SELECT = 0, + TRACKING_CLEAN_DELETE_TRACK = 1, + TRACKING_CLEAN_DELETE_SEGMENT = 2 +}; /* MovieTrackingDopesheet->sort_method */ -#define TRACKING_DOPE_SORT_NAME 0 -#define TRACKING_DOPE_SORT_LONGEST 1 -#define TRACKING_DOPE_SORT_TOTAL 2 -#define TRACKING_DOPE_SORT_AVERAGE_ERROR 3 +enum { + TRACKING_DOPE_SORT_NAME = 0, + TRACKING_DOPE_SORT_LONGEST = 1, + TRACKING_DOPE_SORT_TOTAL = 2, + TRACKING_DOPE_SORT_AVERAGE_ERROR = 3 +}; /* MovieTrackingDopesheet->flag */ -#define TRACKING_DOPE_SORT_INVERSE (1 << 0) -#define TRACKING_DOPE_SELECTED_ONLY (1 << 1) -#define TRACKING_DOPE_SHOW_HIDDEN (1 << 2) +enum { + TRACKING_DOPE_SORT_INVERSE = (1 << 0), + TRACKING_DOPE_SELECTED_ONLY = (1 << 1), + TRACKING_DOPE_SHOW_HIDDEN = (1 << 2) +}; #endif |