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/animation/anim_draw.c')
-rw-r--r--source/blender/editors/animation/anim_draw.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index ee1522c7b76..d9dcbf1d57e 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -120,9 +120,9 @@ void ANIM_draw_framerange(Scene *scene, View2D *v2d)
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformThemeColorShadeAlpha(TH_BACK, -25, -100);
- if (SFRA < EFRA) {
- immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax);
- immRectf(pos, (float)EFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ if (scene->r.sfra < scene->r.efra) {
+ immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, (float)scene->r.sfra, v2d->cur.ymax);
+ immRectf(pos, (float)scene->r.efra, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
}
else {
immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
@@ -135,11 +135,11 @@ void ANIM_draw_framerange(Scene *scene, View2D *v2d)
immBegin(GPU_PRIM_LINES, 4);
- immVertex2f(pos, (float)SFRA, v2d->cur.ymin);
- immVertex2f(pos, (float)SFRA, v2d->cur.ymax);
+ immVertex2f(pos, (float)scene->r.sfra, v2d->cur.ymin);
+ immVertex2f(pos, (float)scene->r.sfra, v2d->cur.ymax);
- immVertex2f(pos, (float)EFRA, v2d->cur.ymin);
- immVertex2f(pos, (float)EFRA, v2d->cur.ymax);
+ immVertex2f(pos, (float)scene->r.efra, v2d->cur.ymin);
+ immVertex2f(pos, (float)scene->r.efra, v2d->cur.ymax);
immEnd();
immUnbindProgram();
@@ -530,7 +530,7 @@ static bool find_prev_next_keyframes(struct bContext *C, int *r_nextfra, int *r_
bool donenext = false, doneprev = false;
int nextcount = 0, prevcount = 0;
- cfranext = cfraprev = (float)(CFRA);
+ cfranext = cfraprev = (float)(scene->r.cfra);
/* seed up dummy dopesheet context with flags to perform necessary filtering */
if ((scene->flag & SCE_KEYS_NO_SELONLY) == 0) {
@@ -559,7 +559,7 @@ static bool find_prev_next_keyframes(struct bContext *C, int *r_nextfra, int *r_
aknext = ED_keylist_find_next(keylist, cfranext);
if (aknext) {
- if (CFRA == (int)aknext->cfra) {
+ if (scene->r.cfra == (int)aknext->cfra) {
/* make this the new starting point for the search and ignore */
cfranext = aknext->cfra;
}
@@ -577,7 +577,7 @@ static bool find_prev_next_keyframes(struct bContext *C, int *r_nextfra, int *r_
akprev = ED_keylist_find_prev(keylist, cfraprev);
if (akprev) {
- if (CFRA == (int)akprev->cfra) {
+ if (scene->r.cfra == (int)akprev->cfra) {
/* make this the new starting point for the search */
}
else {
@@ -599,14 +599,14 @@ static bool find_prev_next_keyframes(struct bContext *C, int *r_nextfra, int *r_
*r_prevfra = cfraprev;
}
else {
- *r_prevfra = CFRA - (cfranext - CFRA);
+ *r_prevfra = scene->r.cfra - (cfranext - scene->r.cfra);
}
if (donenext) {
*r_nextfra = cfranext;
}
else {
- *r_nextfra = CFRA + (CFRA - cfraprev);
+ *r_nextfra = scene->r.cfra + (scene->r.cfra - cfraprev);
}
return true;