diff options
Diffstat (limited to 'source/blender/blenkernel')
-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 |
4 files changed, 17 insertions, 16 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__); |