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/space_sequencer/sequencer_draw.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 7e23f4ed281..8ac562f0ae0 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -970,14 +970,14 @@ static void fcurve_batch_add_verts(GPUVertBuf *vbo,
float y1,
float y2,
float y_height,
- int cfra,
+ int timeline_frame,
float curve_val,
unsigned int *vert_count)
{
float vert_pos[2][2];
- copy_v2_fl2(vert_pos[0], cfra, (curve_val * y_height) + y1);
- copy_v2_fl2(vert_pos[1], cfra, y2);
+ copy_v2_fl2(vert_pos[0], timeline_frame, (curve_val * y_height) + y1);
+ copy_v2_fl2(vert_pos[1], timeline_frame, y2);
GPU_vertbuf_vert_set(vbo, *vert_count, vert_pos[0]);
GPU_vertbuf_vert_set(vbo, *vert_count + 1, vert_pos[1]);
@@ -1026,23 +1026,25 @@ static void draw_seq_fcurve(
float prev_val = INT_MIN;
bool skip = false;
- for (int cfra = eval_start; cfra <= eval_end; cfra += eval_step) {
- curve_val = evaluate_fcurve(fcu, cfra);
+ for (int timeline_frame = eval_start; timeline_frame <= eval_end;
+ timeline_frame += eval_step) {
+ curve_val = evaluate_fcurve(fcu, timeline_frame);
CLAMP(curve_val, 0.0f, 1.0f);
/* Avoid adding adjacent verts that have the same value. */
- if (curve_val == prev_val && cfra < eval_end - eval_step) {
+ if (curve_val == prev_val && timeline_frame < eval_end - eval_step) {
skip = true;
continue;
}
/* If some frames were skipped above, we need to close the shape. */
if (skip) {
- fcurve_batch_add_verts(vbo, y1, y2, y_height, cfra - eval_step, prev_val, &vert_count);
+ fcurve_batch_add_verts(
+ vbo, y1, y2, y_height, timeline_frame - eval_step, prev_val, &vert_count);
skip = false;
}
- fcurve_batch_add_verts(vbo, y1, y2, y_height, cfra, curve_val, &vert_count);
+ fcurve_batch_add_verts(vbo, y1, y2, y_height, timeline_frame, curve_val, &vert_count);
prev_val = curve_val;
}
@@ -1241,7 +1243,7 @@ ImBuf *sequencer_ibuf_get(struct Main *bmain,
struct Depsgraph *depsgraph,
Scene *scene,
SpaceSeq *sseq,
- int cfra,
+ int timeline_frame,
int frame_ofs,
const char *viewname)
{
@@ -1285,10 +1287,10 @@ ImBuf *sequencer_ibuf_get(struct Main *bmain,
}
if (special_seq_update) {
- ibuf = SEQ_render_give_ibuf_direct(&context, cfra + frame_ofs, special_seq_update);
+ ibuf = SEQ_render_give_ibuf_direct(&context, timeline_frame + frame_ofs, special_seq_update);
}
else {
- ibuf = SEQ_render_give_ibuf(&context, cfra + frame_ofs, sseq->chanshown);
+ ibuf = SEQ_render_give_ibuf(&context, timeline_frame + frame_ofs, sseq->chanshown);
}
if (viewport) {
@@ -1766,7 +1768,7 @@ void sequencer_draw_preview(const bContext *C,
Scene *scene,
ARegion *region,
SpaceSeq *sseq,
- int cfra,
+ int timeline_frame,
int offset,
bool draw_overlay,
bool draw_backdrop)
@@ -1788,7 +1790,7 @@ void sequencer_draw_preview(const bContext *C,
/* Get image. */
ibuf = sequencer_ibuf_get(
- bmain, region, depsgraph, scene, sseq, cfra, offset, names[sseq->multiview_eye]);
+ bmain, region, depsgraph, scene, sseq, timeline_frame, offset, names[sseq->multiview_eye]);
/* Setup off-screen buffers. */
GPUViewport *viewport = WM_draw_region_get_viewport(region);
@@ -2318,9 +2320,9 @@ void draw_timeline_seq(const bContext *C, ARegion *region)
/* Draw overlap frame frame indicator. */
if (scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) {
- int cfra_over = (scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS) ?
- scene->ed->over_cfra :
- scene->r.cfra + scene->ed->over_ofs;
+ int overlap_frame = (scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS) ?
+ scene->ed->over_cfra :
+ scene->r.cfra + scene->ed->over_ofs;
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR);
@@ -2334,8 +2336,8 @@ void draw_timeline_seq(const bContext *C, ARegion *region)
immUniformThemeColor(TH_CFRAME);
immBegin(GPU_PRIM_LINES, 2);
- immVertex2f(pos, cfra_over, v2d->cur.ymin);
- immVertex2f(pos, cfra_over, v2d->cur.ymax);
+ immVertex2f(pos, overlap_frame, v2d->cur.ymin);
+ immVertex2f(pos, overlap_frame, v2d->cur.ymax);
immEnd();
immUnbindProgram();