Code cleanup: use bool insted of int/short in MCE
This commit is contained in:
@@ -79,7 +79,7 @@ static void track_channel_color(MovieTrackingTrack *track, float default_color[3
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_keyframe_shape(float x, float y, float xscale, float yscale, short sel, float alpha)
|
||||
static void draw_keyframe_shape(float x, float y, float xscale, float yscale, bool sel, float alpha)
|
||||
{
|
||||
/* coordinates for diamond shape */
|
||||
static const float _unit_diamond_shape[4][2] = {
|
||||
@@ -216,7 +216,8 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *ar, Scene *scene)
|
||||
{
|
||||
MovieTrackingTrack *track = channel->track;
|
||||
float alpha;
|
||||
int i, sel = track->flag & TRACK_DOPE_SEL;
|
||||
int i;
|
||||
bool sel = (track->flag & TRACK_DOPE_SEL) != 0;
|
||||
|
||||
/* selection background */
|
||||
if (sel) {
|
||||
@@ -329,7 +330,7 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *ar)
|
||||
{
|
||||
MovieTrackingTrack *track = channel->track;
|
||||
float font_height, color[3];
|
||||
int sel = track->flag & TRACK_DOPE_SEL;
|
||||
bool sel = (track->flag & TRACK_DOPE_SEL) != 0;
|
||||
|
||||
track_channel_color(track, NULL, color);
|
||||
glColor3fv(color);
|
||||
|
||||
@@ -392,7 +392,7 @@ typedef struct {
|
||||
float *min, *max, *pos, *offset, (*corners)[2];
|
||||
float spos[2];
|
||||
|
||||
short lock, accurate;
|
||||
bool lock, accurate;
|
||||
|
||||
/* data to restore on cancel */
|
||||
float old_search_min[2], old_search_max[2], old_pos[2], old_offset[2];
|
||||
@@ -460,7 +460,7 @@ static SlideMarkerData *create_slide_marker_data(SpaceClip *sc, MovieTrackingTra
|
||||
data->height = height;
|
||||
|
||||
if (action == SLIDE_ACTION_SIZE)
|
||||
data->lock = 1;
|
||||
data->lock = true;
|
||||
|
||||
/* backup marker's settings */
|
||||
memcpy(data->old_corners, marker->pattern_corners, sizeof(data->old_corners));
|
||||
|
||||
@@ -558,7 +558,7 @@ void CLIP_OT_select_border(wmOperatorType *ot)
|
||||
|
||||
/********************** lasso select operator *********************/
|
||||
|
||||
static int do_lasso_select_marker(bContext *C, const int mcords[][2], const short moves, short select)
|
||||
static int do_lasso_select_marker(bContext *C, const int mcords[][2], const short moves, bool select)
|
||||
{
|
||||
SpaceClip *sc = CTX_wm_space_clip(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
@@ -650,7 +650,7 @@ static int clip_lasso_select_exec(bContext *C, wmOperator *op)
|
||||
const int (*mcords)[2] = WM_gesture_lasso_path_to_array(C, op, &mcords_tot);
|
||||
|
||||
if (mcords) {
|
||||
short select;
|
||||
bool select;
|
||||
|
||||
select = !RNA_boolean_get(op->ptr, "deselect");
|
||||
do_lasso_select_marker(C, mcords, mcords_tot, select);
|
||||
|
||||
Reference in New Issue
Block a user