Commit: 2cace77aa16c566f96023af32fb1682f41f747eb Author: Falk David Date: Fri Aug 21 10:46:35 2020 +0200 Branches: soc-2020-greasepencil-curve https://developer.blender.org/rB2cace77aa16c566f96023af32fb1682f41f747eb
GPencil: Make parameters const =================================================================== M source/blender/blenkernel/BKE_gpencil.h M source/blender/blenkernel/BKE_gpencil_curve.h M source/blender/blenkernel/intern/gpencil.c M source/blender/blenkernel/intern/gpencil_curve.c =================================================================== diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h index 429ddf4e551..4ec8609831b 100644 --- a/source/blender/blenkernel/BKE_gpencil.h +++ b/source/blender/blenkernel/BKE_gpencil.h @@ -167,7 +167,7 @@ struct bGPDstroke *BKE_gpencil_stroke_add_existing_style(struct bGPDframe *gpf, int totpoints, short thickness); -struct bGPDcurve *BKE_gpencil_stroke_editcurve_new(int tot_curve_points); +struct bGPDcurve *BKE_gpencil_stroke_editcurve_new(const int tot_curve_points); /* Stroke and Fill - Alpha Visibility Threshold */ #define GPENCIL_ALPHA_OPACITY_THRESH 0.001f diff --git a/source/blender/blenkernel/BKE_gpencil_curve.h b/source/blender/blenkernel/BKE_gpencil_curve.h index 0f6d2f37d29..3c52b67dfdc 100644 --- a/source/blender/blenkernel/BKE_gpencil_curve.h +++ b/source/blender/blenkernel/BKE_gpencil_curve.h @@ -43,18 +43,18 @@ void BKE_gpencil_convert_curve(struct Main *bmain, const float sample); struct bGPDcurve *BKE_gpencil_stroke_editcurve_generate(struct bGPDstroke *gps, - float error_threshold, - float corner_angle); + const float error_threshold, + const float corner_angle); void BKE_gpencil_stroke_editcurve_update(struct bGPDstroke *gps, - float error_threshold, - float corner_angle); + const float error_threshold, + const float corner_angle); void BKE_gpencil_editcurve_stroke_sync_selection(struct bGPDstroke *gps, struct bGPDcurve *gpc); void BKE_gpencil_stroke_editcurve_sync_selection(struct bGPDstroke *gps, struct bGPDcurve *gpc); void BKE_gpencil_strokes_selected_update_editcurve(struct bGPdata *gpd); void BKE_gpencil_strokes_selected_sync_selection_editcurve(struct bGPdata *gpd); void BKE_gpencil_stroke_update_geometry_from_editcurve(struct bGPDstroke *gps, const uint resolution, - bool is_adaptive); + const bool is_adaptive); void BKE_gpencil_editcurve_recalculate_handles(struct bGPDstroke *gps); void BKE_gpencil_editcurve_subdivide(struct bGPDstroke *gps, const int cuts); diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index da6b3808802..d6b2a358f63 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -687,7 +687,7 @@ bGPDstroke *BKE_gpencil_stroke_add_existing_style( return gps; } -bGPDcurve *BKE_gpencil_stroke_editcurve_new(int tot_curve_points) +bGPDcurve *BKE_gpencil_stroke_editcurve_new(const int tot_curve_points) { bGPDcurve *new_gp_curve = (bGPDcurve *)MEM_callocN(sizeof(bGPDcurve), __func__); new_gp_curve->tot_curve_points = tot_curve_points; diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c index d8bfa6b1d95..0ae6fb6a267 100644 --- a/source/blender/blenkernel/intern/gpencil_curve.c +++ b/source/blender/blenkernel/intern/gpencil_curve.c @@ -567,8 +567,8 @@ void BKE_gpencil_convert_curve(Main *bmain, * Creates a bGPDcurve by doing a cubic curve fitting on the grease pencil stroke points. */ bGPDcurve *BKE_gpencil_stroke_editcurve_generate(bGPDstroke *gps, - float error_threshold, - float corner_angle) + const float error_threshold, + const float corner_angle) { if (gps->totpoints < 1) { return NULL; @@ -705,8 +705,8 @@ bGPDcurve *BKE_gpencil_stroke_editcurve_generate(bGPDstroke *gps, * Updates the editcurve for a stroke. Frees the old curve if one exists and generates a new one. */ void BKE_gpencil_stroke_editcurve_update(bGPDstroke *gps, - float error_threshold, - float corner_angle) + const float error_threshold, + const float corner_angle) { if (gps == NULL || gps->totpoints < 0) { return; @@ -1000,7 +1000,7 @@ static float *gpencil_stroke_points_from_editcurve_fixed_resolu(bGPDcurve_point */ void BKE_gpencil_stroke_update_geometry_from_editcurve(bGPDstroke *gps, const uint resolution, - bool adaptive) + const bool adaptive) { if (gps == NULL || gps->editcurve == NULL) { return; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs