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-12-17 01:51:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-12-17 01:53:25 +0300
commit7e15638cceaf570995ebd7fcd719914885202ccc (patch)
treeaba1c9d0fada3bb4b55d8945c05224344a0263bb /source/blender/editors
parent96ebdbc90ff93f55e202997334ef3ff811f497fb (diff)
Cleanup: style, always use braces
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/physics/physics_fluid.c18
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c3
-rw-r--r--source/blender/editors/space_image/image_draw.c9
3 files changed, 20 insertions, 10 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 6270112677a..1d5c5bf7327 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -259,8 +259,9 @@ static void fluid_bake_sequence(FluidJob *job)
}
/* Show progress bar. */
- if (job->do_update)
+ if (job->do_update) {
*(job->do_update) = true;
+ }
/* Get current pause frame (pointer) - depending on bake type */
pause_frame = job->pause_frame;
@@ -287,10 +288,12 @@ static void fluid_bake_sequence(FluidJob *job)
}
/* Update progress bar */
- if (job->do_update)
+ if (job->do_update) {
*(job->do_update) = true;
- if (job->progress)
+ }
+ if (job->progress) {
*(job->progress) = progress;
+ }
CFRA = frame;
@@ -425,10 +428,12 @@ static void fluid_bake_startjob(void *customdata, short *stop, short *do_update,
fluid_bake_sequence(job);
- if (do_update)
+ if (do_update) {
*do_update = true;
- if (stop)
+ }
+ if (stop) {
*stop = 0;
+ }
}
static void fluid_free_endjob(void *customdata)
@@ -571,8 +576,9 @@ static int fluid_bake_invoke(struct bContext *C,
static int fluid_bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
{
/* no running blender, remove handler and pass through */
- if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_OBJECT_SIM_FLUID))
+ if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_OBJECT_SIM_FLUID)) {
return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
+ }
switch (event->type) {
case ESCKEY:
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index bf198f70a67..7f71110b360 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -1656,8 +1656,9 @@ void paint_2d_stroke(void *ps,
brush_painter_2d_refresh_cache(s, painter, tile, new_coord, mval, pressure, distance, size);
- if (paint_2d_op(s, tile, old_coord, new_coord))
+ if (paint_2d_op(s, tile, old_coord, new_coord)) {
tile->need_redraw = true;
+ }
}
painter->firsttouch = 0;
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 9a633427d82..3f563fe9033 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -549,12 +549,15 @@ static void draw_udim_label(ARegion *ar, float fx, float fy, const char *label)
int textwidth = BLF_width(blf_mono_font, label, strlen(label)) + 10;
float stepx = BLI_rcti_size_x(&ar->v2d.mask) / BLI_rctf_size_x(&ar->v2d.cur);
float opacity;
- if (textwidth < 0.5f * (stepx - 10))
+ if (textwidth < 0.5f * (stepx - 10)) {
opacity = 1.0f;
- else if (textwidth < (stepx - 10))
+ }
+ else if (textwidth < (stepx - 10)) {
opacity = 2.0f - 2.0f * (textwidth / (stepx - 10));
- else
+ }
+ else {
opacity = 0.0f;
+ }
BLF_color4ub(blf_mono_font, 220, 220, 220, 150 * opacity);
BLF_position(blf_mono_font, (int)(x + 10), (int)(y + 10), 0);
BLF_draw_ascii(blf_mono_font, label, strlen(label));