diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-06-03 17:55:21 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-06-03 17:55:21 +0300 |
commit | 6b9a3be03d034f07ab3780c5d190b5325af1c87a (patch) | |
tree | c07daf385f434521b3a67c6810e70c75f57936e1 /source/blender | |
parent | e7156be86e8daa13c43f4347349a91d7fcc51cc1 (diff) |
Cleanup: clang-format
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_extra.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 50 | ||||
-rw-r--r-- | source/blender/sequencer/intern/strip_transform.c | 4 |
3 files changed, 41 insertions, 14 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c index b68ccf6e4d9..f875254a685 100644 --- a/source/blender/draw/engines/overlay/overlay_extra.c +++ b/source/blender/draw/engines/overlay/overlay_extra.c @@ -1315,7 +1315,6 @@ static void OVERLAY_relationship_lines(OVERLAY_ExtraCallBuffers *cb, if ((curcon->ui_expand_flag & (1 << 0)) && BKE_constraint_targets_get(curcon, &targets)) { bConstraintTarget *ct; - for (ct = targets.first; ct; ct = ct->next) { /* calculate target's matrix */ if (cti->get_target_matrix) { diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 08e42a5b4c4..25701c323b9 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -668,7 +668,10 @@ float sequence_handle_size_get_clamped(Sequence *seq, const float pixelx) const float maxhandle = (pixelx * SEQ_HANDLE_SIZE) * U.pixelsize; /* Ensure that handle is not wider, than quarter of strip. */ - return min_ff(maxhandle, ((float)(SEQ_time_right_handle_frame_get(seq) - SEQ_time_left_handle_frame_get(seq)) / 4.0f)); + return min_ff( + maxhandle, + ((float)(SEQ_time_right_handle_frame_get(seq) - SEQ_time_left_handle_frame_get(seq)) / + 4.0f)); } /* Draw a handle, on left or right side of strip. */ @@ -739,7 +742,11 @@ static void draw_seq_handle(View2D *v2d, BLF_set_default(); /* Calculate if strip is wide enough for showing the labels. */ - numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%d%d", SEQ_time_left_handle_frame_get(seq), SEQ_time_right_handle_frame_get(seq)); + numstr_len = BLI_snprintf_rlen(numstr, + sizeof(numstr), + "%d%d", + SEQ_time_left_handle_frame_get(seq), + SEQ_time_right_handle_frame_get(seq)); float tot_width = BLF_width(fontid, numstr, numstr_len); if ((x2 - x1) / pixelx > 20 + tot_width) { @@ -747,12 +754,14 @@ static void draw_seq_handle(View2D *v2d, float text_margin = 1.2f * handsize_clamped; if (direction == SEQ_LEFTHANDLE) { - numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%d", SEQ_time_left_handle_frame_get(seq)); + numstr_len = BLI_snprintf_rlen( + numstr, sizeof(numstr), "%d", SEQ_time_left_handle_frame_get(seq)); x1 += text_margin; y1 += 0.09f; } else { - numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%d", SEQ_time_right_handle_frame_get(seq) - 1); + numstr_len = BLI_snprintf_rlen( + numstr, sizeof(numstr), "%d", SEQ_time_right_handle_frame_get(seq) - 1); x1 = x2 - (text_margin + pixelx * BLF_width(fontid, numstr, numstr_len)); y1 += 0.09f; } @@ -913,7 +922,8 @@ static size_t draw_seq_text_get_overlay_string(SpaceSeq *sseq, char strip_duration_text[16]; if (sseq->timeline_overlay.flag & SEQ_TIMELINE_SHOW_STRIP_DURATION) { - const int strip_duration = SEQ_time_right_handle_frame_get(seq) - SEQ_time_left_handle_frame_get(seq); + const int strip_duration = SEQ_time_right_handle_frame_get(seq) - + SEQ_time_left_handle_frame_get(seq); SNPRINTF(strip_duration_text, "%d", strip_duration); if (i != 0) { text_array[i++] = text_sep; @@ -1038,7 +1048,11 @@ static void draw_color_strip_band( immUniformColor4ubv(col); - immRectf(pos, SEQ_time_left_handle_frame_get(seq), y1, SEQ_time_right_handle_frame_get(seq), text_margin_y); + immRectf(pos, + SEQ_time_left_handle_frame_get(seq), + y1, + SEQ_time_right_handle_frame_get(seq), + text_margin_y); /* 1px line to better separate the color band. */ UI_GetColorPtrShade3ubv(col, col, -20); @@ -1335,7 +1349,8 @@ static void draw_seq_strip(const bContext *C, /* Draw strip body. */ x1 = SEQ_time_has_left_still_frames(seq) ? seq->start : SEQ_time_left_handle_frame_get(seq); y1 = seq->machine + SEQ_STRIP_OFSBOTTOM; - x2 = SEQ_time_has_right_still_frames(seq) ? (seq->start + seq->len) : SEQ_time_right_handle_frame_get(seq); + x2 = SEQ_time_has_right_still_frames(seq) ? (seq->start + seq->len) : + SEQ_time_right_handle_frame_get(seq); y2 = seq->machine + SEQ_STRIP_OFSTOP; /* Limit body to strip bounds. Meta strip can end up with content outside of strip range. */ @@ -2597,7 +2612,8 @@ static void draw_cache_view(const bContext *C) continue; } - if (SEQ_time_left_handle_frame_get(seq) > v2d->cur.xmax || SEQ_time_right_handle_frame_get(seq) < v2d->cur.xmin) { + if (SEQ_time_left_handle_frame_get(seq) > v2d->cur.xmax || + SEQ_time_right_handle_frame_get(seq) < v2d->cur.xmin) { continue; } @@ -2607,7 +2623,11 @@ static void draw_cache_view(const bContext *C) if (scene->ed->cache_flag & SEQ_CACHE_VIEW_RAW) { const float bg_color[4] = {1.0f, 0.1f, 0.02f, 0.1f}; immUniformColor4f(bg_color[0], bg_color[1], bg_color[2], bg_color[3]); - immRectf(pos, SEQ_time_left_handle_frame_get(seq), stripe_bot, SEQ_time_right_handle_frame_get(seq), stripe_top); + immRectf(pos, + SEQ_time_left_handle_frame_get(seq), + stripe_bot, + SEQ_time_right_handle_frame_get(seq), + stripe_top); } stripe_bot += stripe_ht + stripe_ofs_y; @@ -2616,7 +2636,11 @@ static void draw_cache_view(const bContext *C) if (scene->ed->cache_flag & SEQ_CACHE_VIEW_PREPROCESSED) { const float bg_color[4] = {0.1f, 0.1f, 0.75f, 0.1f}; immUniformColor4f(bg_color[0], bg_color[1], bg_color[2], bg_color[3]); - immRectf(pos, SEQ_time_left_handle_frame_get(seq), stripe_bot, SEQ_time_right_handle_frame_get(seq), stripe_top); + immRectf(pos, + SEQ_time_left_handle_frame_get(seq), + stripe_bot, + SEQ_time_right_handle_frame_get(seq), + stripe_top); } stripe_top = seq->machine + SEQ_STRIP_OFSTOP - stripe_ofs_y; @@ -2625,7 +2649,11 @@ static void draw_cache_view(const bContext *C) if (scene->ed->cache_flag & SEQ_CACHE_VIEW_COMPOSITE) { const float bg_color[4] = {1.0f, 0.6f, 0.0f, 0.1f}; immUniformColor4f(bg_color[0], bg_color[1], bg_color[2], bg_color[3]); - immRectf(pos, SEQ_time_left_handle_frame_get(seq), stripe_bot, SEQ_time_right_handle_frame_get(seq), stripe_top); + immRectf(pos, + SEQ_time_left_handle_frame_get(seq), + stripe_bot, + SEQ_time_right_handle_frame_get(seq), + stripe_top); } } diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c index 051dc3961ba..ebf317eff05 100644 --- a/source/blender/sequencer/intern/strip_transform.c +++ b/source/blender/sequencer/intern/strip_transform.c @@ -25,8 +25,8 @@ #include "SEQ_time.h" #include "SEQ_transform.h" -#include "strip_time.h" #include "sequencer.h" +#include "strip_time.h" #include "CLG_log.h" @@ -198,7 +198,7 @@ void SEQ_transform_translate_sequence(Scene *evil_scene, Sequence *seq, int delt else { /* All other strip types. */ seq->start += delta; /* Only to make files usable in older versions. */ - seq->startdisp = SEQ_time_left_handle_frame_get(seq); + seq->startdisp = SEQ_time_left_handle_frame_get(seq); seq->enddisp = SEQ_time_right_handle_frame_get(seq); } |