diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_mask.h | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mask.c | 18 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 2 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_MaskOperation.cpp | 2 | ||||
-rw-r--r-- | source/blender/editors/mask/mask_add.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mask/mask_shapekey.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mask.c | 2 |
8 files changed, 24 insertions, 23 deletions
diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h index 9e73e0662ce..7f703a0440f 100644 --- a/source/blender/blenkernel/BKE_mask.h +++ b/source/blender/blenkernel/BKE_mask.h @@ -123,9 +123,9 @@ void BKE_mask_coord_to_image(struct Image *image, struct ImageUser *iuser, float void BKE_mask_update_display(struct Mask *mask, float ctime); -void BKE_mask_evaluate_all_masks(struct Main *bmain, float ctime, const int do_newframe); -void BKE_mask_evaluate(struct Mask *mask, const float ctime, const int do_newframe); -void BKE_mask_layer_evaluate(struct MaskLayer *masklay, const float ctime, const int do_newframe); +void BKE_mask_evaluate_all_masks(struct Main *bmain, float ctime, const bool do_newframe); +void BKE_mask_evaluate(struct Mask *mask, const float ctime, const bool do_newframe); +void BKE_mask_layer_evaluate(struct MaskLayer *masklay, const float ctime, const bool do_newframe); void BKE_mask_update_scene(struct Main *bmain, struct Scene *scene); void BKE_mask_parent_init(struct MaskParent *parent); void BKE_mask_calc_handle_adjacent_interp(struct MaskSpline *spline, struct MaskSplinePoint *point, const float u); @@ -161,12 +161,13 @@ struct MaskLayerShape *BKE_mask_layer_shape_duplicate(struct MaskLayerShape *mas void BKE_mask_layer_shape_unlink(struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape); void BKE_mask_layer_shape_sort(struct MaskLayer *masklay); -int BKE_mask_layer_shape_spline_from_index(struct MaskLayer *masklay, int index, +bool BKE_mask_layer_shape_spline_from_index(struct MaskLayer *masklay, int index, struct MaskSpline **r_masklay_shape, int *r_index); int BKE_mask_layer_shape_spline_to_index(struct MaskLayer *masklay, struct MaskSpline *spline); +/* TODO(sergey): do_init and do_init_interpolate are always true, so let's wipe them later. */ void BKE_mask_layer_shape_changed_add(struct MaskLayer *masklay, int index, - int do_init, int do_init_interpolate); + bool do_init, bool do_init_interpolate); void BKE_mask_layer_shape_changed_remove(struct MaskLayer *masklay, int index, int count); diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index c856d8cfea4..597cfa5d76e 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -1443,7 +1443,7 @@ void BKE_mask_spline_ensure_deform(MaskSpline *spline) } } -void BKE_mask_layer_evaluate(MaskLayer *masklay, const float ctime, const int do_newframe) +void BKE_mask_layer_evaluate(MaskLayer *masklay, const float ctime, const bool do_newframe) { /* animation if available */ if (do_newframe) { @@ -1521,7 +1521,7 @@ void BKE_mask_layer_evaluate(MaskLayer *masklay, const float ctime, const int do } } -void BKE_mask_evaluate(Mask *mask, const float ctime, const int do_newframe) +void BKE_mask_evaluate(Mask *mask, const float ctime, const bool do_newframe) { MaskLayer *masklay; @@ -1562,10 +1562,10 @@ void BKE_mask_update_display(Mask *mask, float ctime) } #endif - BKE_mask_evaluate(mask, ctime, FALSE); + BKE_mask_evaluate(mask, ctime, false); } -void BKE_mask_evaluate_all_masks(Main *bmain, float ctime, const int do_newframe) +void BKE_mask_evaluate_all_masks(Main *bmain, float ctime, const bool do_newframe) { Mask *mask; @@ -1835,8 +1835,8 @@ void BKE_mask_layer_shape_sort(MaskLayer *masklay) BLI_sortlist(&masklay->splines_shapes, mask_layer_shape_sort_cb); } -int BKE_mask_layer_shape_spline_from_index(MaskLayer *masklay, int index, - MaskSpline **r_masklay_shape, int *r_index) +bool BKE_mask_layer_shape_spline_from_index(MaskLayer *masklay, int index, + MaskSpline **r_masklay_shape, int *r_index) { MaskSpline *spline; @@ -1844,12 +1844,12 @@ int BKE_mask_layer_shape_spline_from_index(MaskLayer *masklay, int index, if (index < spline->tot_point) { *r_masklay_shape = spline; *r_index = index; - return TRUE; + return true; } index -= spline->tot_point; } - return FALSE; + return false; } int BKE_mask_layer_shape_spline_to_index(MaskLayer *masklay, MaskSpline *spline) @@ -1891,7 +1891,7 @@ static void interp_weights_uv_v2_apply(const float uv[2], float r_pt[2], const f /* when a new points added - resize all shapekey array */ void BKE_mask_layer_shape_changed_add(MaskLayer *masklay, int index, - int do_init, int do_init_interpolate) + bool do_init, bool do_init_interpolate) { MaskLayerShape *masklay_shape; diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index d4618e28191..9356536557a 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1303,7 +1303,7 @@ void BKE_scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay) * so don't call within 'scene_update_tagged_recursive' */ DAG_scene_update_flags(bmain, sce, lay, TRUE); // only stuff that moves or needs display still - BKE_mask_evaluate_all_masks(bmain, ctime, TRUE); + BKE_mask_evaluate_all_masks(bmain, ctime, true); /* All 'standard' (i.e. without any dependencies) animation is handled here, * with an 'local' to 'macro' order of evaluation. This should ensure that diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 925355d9383..1235018546e 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2341,7 +2341,7 @@ static ImBuf *seq_render_mask(SeqRenderData context, Mask *mask, float nr, short mask_temp = BKE_mask_copy_nolib(mask); - BKE_mask_evaluate(mask_temp, mask->sfra + nr, TRUE); + BKE_mask_evaluate(mask_temp, mask->sfra + nr, true); maskbuf = MEM_mallocN(sizeof(float) * context.rectx * context.recty, __func__); diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp index ba1059c4eb5..39f4302dec9 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.cpp +++ b/source/blender/compositor/operations/COM_MaskOperation.cpp @@ -84,7 +84,7 @@ void MaskOperation::initExecution() this->m_rasterMaskHandles[i] = BKE_maskrasterize_handle_new(); /* re-eval frame info */ - BKE_mask_evaluate(mask_temp, frame_iter, TRUE); + BKE_mask_evaluate(mask_temp, frame_iter, true); BKE_maskrasterize_handle_init(this->m_rasterMaskHandles[i], mask_temp, this->m_maskWidth, this->m_maskHeight, diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c index 4cc9d3b59b1..7a78d60e11e 100644 --- a/source/blender/editors/mask/mask_add.c +++ b/source/blender/editors/mask/mask_add.c @@ -385,7 +385,7 @@ static int add_vertex_subdivide(const bContext *C, Mask *mask, const float co[2] setup_vertex_point(mask, spline, new_point, co, tangent, u, NULL, TRUE, 1.0f); /* TODO - we could pass the spline! */ - BKE_mask_layer_shape_changed_add(masklay, BKE_mask_layer_shape_spline_to_index(masklay, spline) + point_index + 1, TRUE, TRUE); + BKE_mask_layer_shape_changed_add(masklay, BKE_mask_layer_shape_spline_to_index(masklay, spline) + point_index + 1, true, true); masklay->act_spline = spline; masklay->act_point = new_point; @@ -486,7 +486,7 @@ static int add_vertex_extrude(const bContext *C, Mask *mask, MaskLayer *masklay, if (masklay->splines_shapes.first) { point_index = (((int)(new_point - spline->points) + 0) % spline->tot_point); - BKE_mask_layer_shape_changed_add(masklay, BKE_mask_layer_shape_spline_to_index(masklay, spline) + point_index, TRUE, TRUE); + BKE_mask_layer_shape_changed_add(masklay, BKE_mask_layer_shape_spline_to_index(masklay, spline) + point_index, true, true); } if (do_recalc_src) { @@ -548,7 +548,7 @@ static int add_vertex_new(const bContext *C, Mask *mask, MaskLayer *masklay, con { int point_index = (((int)(new_point - spline->points) + 0) % spline->tot_point); - BKE_mask_layer_shape_changed_add(masklay, BKE_mask_layer_shape_spline_to_index(masklay, spline) + point_index, TRUE, TRUE); + BKE_mask_layer_shape_changed_add(masklay, BKE_mask_layer_shape_spline_to_index(masklay, spline) + point_index, true, true); } WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask); diff --git a/source/blender/editors/mask/mask_shapekey.c b/source/blender/editors/mask/mask_shapekey.c index d5fbdca5b0a..0c9ce5f6c79 100644 --- a/source/blender/editors/mask/mask_shapekey.c +++ b/source/blender/editors/mask/mask_shapekey.c @@ -319,7 +319,7 @@ static int mask_shape_key_rekey_exec(bContext *C, wmOperator *op) masklay_shape_tmp; masklay_shape_tmp = masklay_shape_tmp->next) { - BKE_mask_layer_evaluate(masklay, masklay_shape_tmp->frame, TRUE); + BKE_mask_layer_evaluate(masklay, masklay_shape_tmp->frame, true); masklay_shape_tmp_rekey = BKE_mask_layer_shape_varify_frame(masklay, masklay_shape_tmp->frame); BKE_mask_layer_shape_from_mask(masklay, masklay_shape_tmp_rekey); masklay_shape_tmp_rekey->flag = masklay_shape_tmp->flag & MASK_SHAPE_SELECT; @@ -376,7 +376,7 @@ static int mask_shape_key_rekey_exec(bContext *C, wmOperator *op) } /* re-evaluate */ - BKE_mask_layer_evaluate(masklay, frame, TRUE); + BKE_mask_layer_evaluate(masklay, frame, true); } } diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 77d593b67b6..670df017038 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -446,7 +446,7 @@ static void rna_MaskSpline_points_add(ID *id, MaskSpline *spline, int count) BKE_mask_parent_init(&new_point->parent); /* Not efficient, but there's no other way for now */ - BKE_mask_layer_shape_changed_add(layer, spline_shape_index + point_index, TRUE, TRUE); + BKE_mask_layer_shape_changed_add(layer, spline_shape_index + point_index, true, true); } WM_main_add_notifier(NC_MASK | ND_DATA, mask); |