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:
authorCampbell Barton <ideasman42@gmail.com>2019-04-22 02:19:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-22 12:48:16 +0300
commit620b960d3d8cfd90b9f0df6ba3671c33eccb8309 (patch)
tree64f69db4bf9d44f0a32d1c92b0714bf2dc98ff2d /source/blender/editors/gpencil/gpencil_brush.c
parentbba60bb564cf5a16cfcac744d4ba82cf8eba3da9 (diff)
Cleanup: style, use braces for editors
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_brush.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index c1503bb57b2..f9a5ff3a0cf 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -368,8 +368,9 @@ static bool gp_brush_thickness_apply(
* the upper end of this range. Therefore, we don't actually clamp
* down on the upper end.
*/
- if (pt->pressure < 0.0f)
+ if (pt->pressure < 0.0f) {
pt->pressure = 0.0f;
+ }
return true;
}
@@ -937,8 +938,9 @@ static bool gp_brush_weight_apply(
}
/* weight should stay within [0.0, 1.0] */
- if (pt->pressure < 0.0f)
+ if (pt->pressure < 0.0f) {
pt->pressure = 0.0f;
+ }
return true;
}
@@ -1394,8 +1396,9 @@ static void gpsculpt_brush_init_stroke(tGP_BrushEditData *gso)
int cfra_eval = (int)DEG_get_ctime(gso->depsgraph);
/* only try to add a new frame if this is the first stroke, or the frame has changed */
- if ((gpd == NULL) || (cfra_eval == gso->cfra))
+ if ((gpd == NULL) || (cfra_eval == gso->cfra)) {
return;
+ }
/* go through each layer, and ensure that we've got a valid frame to use */
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
@@ -1735,10 +1738,12 @@ static void gpsculpt_brush_apply(bContext *C, wmOperator *op, PointerRNA *itempt
gso->pressure = RNA_float_get(itemptr, "pressure");
- if (RNA_boolean_get(itemptr, "pen_flip"))
+ if (RNA_boolean_get(itemptr, "pen_flip")) {
gso->flag |= GP_SCULPT_FLAG_INVERT;
- else
+ }
+ else {
gso->flag &= ~GP_SCULPT_FLAG_INVERT;
+ }
/* Store coordinates as reference, if operator just started running */
if (gso->first) {
@@ -1838,8 +1843,9 @@ static void gpsculpt_brush_apply_event(bContext *C, wmOperator *op, const wmEven
/* reapply */
static int gpsculpt_brush_exec(bContext *C, wmOperator *op)
{
- if (!gpsculpt_brush_init(C, op))
+ if (!gpsculpt_brush_init(C, op)) {
return OPERATOR_CANCELLED;
+ }
RNA_BEGIN (op->ptr, itemptr, "stroke") {
gpsculpt_brush_apply(C, op, &itemptr);
@@ -1868,8 +1874,9 @@ static int gpsculpt_brush_invoke(bContext *C, wmOperator *op, const wmEvent *eve
}
/* init painting data */
- if (!gpsculpt_brush_init(C, op))
+ if (!gpsculpt_brush_init(C, op)) {
return OPERATOR_CANCELLED;
+ }
gso = op->customdata;