diff options
Diffstat (limited to 'source/blender/editors/mask/mask_ops.c')
-rw-r--r-- | source/blender/editors/mask/mask_ops.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index aea346b63a6..a4943373288 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -1073,12 +1073,12 @@ static int mask_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) Mask *mask = CTX_data_edit_mask(C); MaskLayer *masklay; - int change = FALSE; + bool changed = false; /* do actual selection */ for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { MaskSpline *spline; - int change_layer = FALSE; + bool changed_layer = false; if (masklay->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; @@ -1087,19 +1087,19 @@ static int mask_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) for (spline = masklay->splines.first; spline; spline = spline->next) { if (ED_mask_spline_select_check(spline)) { BKE_mask_spline_direction_switch(masklay, spline); - change = TRUE; - change_layer = TRUE; + changed = true; + changed_layer = true; } } - if (change_layer) { + if (changed_layer) { if (IS_AUTOKEY_ON(scene)) { ED_mask_layer_shape_auto_key(masklay, CFRA); } } } - if (change) { + if (changed) { /* TODO: only update this spline */ BKE_mask_update_display(mask, CFRA); @@ -1136,12 +1136,12 @@ static int mask_normals_make_consistent_exec(bContext *C, wmOperator *UNUSED(op) MaskLayer *masklay; int i; - int change = FALSE; + bool changed = false; /* do actual selection */ for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { MaskSpline *spline; - int change_layer = FALSE; + bool changed_layer = false; if (masklay->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; @@ -1153,20 +1153,20 @@ static int mask_normals_make_consistent_exec(bContext *C, wmOperator *UNUSED(op) if (MASKPOINT_ISSEL_ANY(point)) { BKE_mask_calc_handle_point_auto(spline, point, FALSE); - change = TRUE; - change_layer = TRUE; + changed = true; + changed_layer = true; } } } - if (change_layer) { + if (changed_layer) { if (IS_AUTOKEY_ON(scene)) { ED_mask_layer_shape_auto_key(masklay, CFRA); } } } - if (change) { + if (changed) { /* TODO: only update this spline */ BKE_mask_update_display(mask, CFRA); @@ -1204,7 +1204,7 @@ static int set_handle_type_exec(bContext *C, wmOperator *op) MaskLayer *masklay; int handle_type = RNA_enum_get(op->ptr, "type"); - bool change = false; + bool changed = false; for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { MaskSpline *spline; @@ -1222,13 +1222,13 @@ static int set_handle_type_exec(bContext *C, wmOperator *op) BezTriple *bezt = &point->bezt; bezt->h1 = bezt->h2 = handle_type; - change = true; + changed = true; } } } } - if (change) { + if (changed) { WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); DAG_id_tag_update(&mask->id, 0); @@ -1269,14 +1269,14 @@ static int mask_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op)) { Mask *mask = CTX_data_edit_mask(C); MaskLayer *masklay; - int changed = FALSE; + bool changed = false; for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { if (masklay->restrictflag & OB_RESTRICT_VIEW) { ED_mask_layer_select_set(masklay, TRUE); masklay->restrictflag &= ~OB_RESTRICT_VIEW; - changed = 1; + changed = true; } } @@ -1312,7 +1312,7 @@ static int mask_hide_view_set_exec(bContext *C, wmOperator *op) Mask *mask = CTX_data_edit_mask(C); MaskLayer *masklay; const int unselected = RNA_boolean_get(op->ptr, "unselected"); - int changed = FALSE; + bool changed = false; for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { @@ -1325,7 +1325,7 @@ static int mask_hide_view_set_exec(bContext *C, wmOperator *op) ED_mask_layer_select_set(masklay, FALSE); masklay->restrictflag |= OB_RESTRICT_VIEW; - changed = 1; + changed = true; if (masklay == BKE_mask_layer_active(mask)) { BKE_mask_layer_active_set(mask, NULL); } @@ -1334,7 +1334,7 @@ static int mask_hide_view_set_exec(bContext *C, wmOperator *op) else { if (!ED_mask_layer_select_check(masklay)) { masklay->restrictflag |= OB_RESTRICT_VIEW; - changed = 1; + changed = true; if (masklay == BKE_mask_layer_active(mask)) { BKE_mask_layer_active_set(mask, NULL); } @@ -1376,7 +1376,7 @@ static int mask_feather_weight_clear_exec(bContext *C, wmOperator *UNUSED(op)) Scene *scene = CTX_data_scene(C); Mask *mask = CTX_data_edit_mask(C); MaskLayer *masklay; - int changed = FALSE; + bool changed = false; int i; for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { @@ -1393,7 +1393,7 @@ static int mask_feather_weight_clear_exec(bContext *C, wmOperator *UNUSED(op)) if (MASKPOINT_ISSEL_ANY(point)) { BezTriple *bezt = &point->bezt; bezt->weight = 0.0f; - changed = TRUE; + changed = true; } } } |