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.vfx@gmail.com>2014-03-31 13:31:28 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-03-31 13:31:28 +0400
commit93aa9b3755954d178a9067c1bcc37ebb7e18af42 (patch)
treeada9faf5d874cf2cd6d3860949a1e2dee5d24009
parent8dc300ecbacdb6ce489a5171c120484ee0575c9a (diff)
Code cleanup: use bool insted of int/short in MCE
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_draw.c7
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c4
-rw-r--r--source/blender/editors/space_clip/tracking_select.c4
3 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c
index 288e658e727..a732ac69fb9 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_draw.c
+++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c
@@ -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);
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index fe4e34f1b09..22878d3a0cd 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -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));
diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c
index 449cccaa643..b60d4473ab5 100644
--- a/source/blender/editors/space_clip/tracking_select.c
+++ b/source/blender/editors/space_clip/tracking_select.c
@@ -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);