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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_curve.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_curve.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_curve.c b/source/blender/editors/sculpt_paint/paint_curve.c
index 458f021ddb4..c63af64a87a 100644
--- a/source/blender/editors/sculpt_paint/paint_curve.c
+++ b/source/blender/editors/sculpt_paint/paint_curve.c
@@ -189,23 +189,20 @@ static void paintcurve_point_add(bContext *C, wmOperator *op, const int loc[2])
Paint *p = BKE_paint_get_active_from_context(C);
Brush *br = p->brush;
Main *bmain = CTX_data_main(C);
- PaintCurve *pc;
- PaintCurvePoint *pcp;
wmWindow *window = CTX_wm_window(C);
ARegion *region = CTX_wm_region(C);
const float vec[3] = {loc[0], loc[1], 0.0};
- int add_index;
- int i;
- pc = br->paint_curve;
+ PaintCurve *pc = br->paint_curve;
if (!pc) {
br->paint_curve = pc = BKE_paint_curve_add(bmain, "PaintCurve");
}
ED_paintcurve_undo_push_begin(op->type->name);
- pcp = MEM_mallocN((pc->tot_points + 1) * sizeof(PaintCurvePoint), "PaintCurvePoint");
- add_index = pc->add_index;
+ PaintCurvePoint *pcp = MEM_mallocN((pc->tot_points + 1) * sizeof(PaintCurvePoint),
+ "PaintCurvePoint");
+ int add_index = pc->add_index;
if (pc->points) {
if (add_index > 0) {
@@ -229,7 +226,7 @@ static void paintcurve_point_add(bContext *C, wmOperator *op, const int loc[2])
copy_v3_v3(pcp[add_index].bez.vec[2], vec);
/* last step, clear selection from all bezier handles expect the next */
- for (i = 0; i < pc->tot_points; i++) {
+ for (int i = 0; i < pc->tot_points; i++) {
pcp[i].bez.f1 = pcp[i].bez.f2 = pcp[i].bez.f3 = 0;
}