diff options
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index d35bd5ab2fe..c616ca2b5eb 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2951,9 +2951,9 @@ static int frame_offset_exec(bContext *C, wmOperator *op) int delta = RNA_int_get(op->ptr, "delta"); - CFRA += delta; - FRAMENUMBER_MIN_CLAMP(CFRA); - SUBFRA = 0.0f; + scene->r.cfra += delta; + FRAMENUMBER_MIN_CLAMP(scene->r.cfra); + scene->r.subframe = 0.0f; areas_do_frame_follow(C, false); @@ -2992,7 +2992,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); wmTimer *animtimer = CTX_wm_screen(C)->animtimer; - /* Don't change CFRA directly if animtimer is running as this can cause + /* Don't change scene->r.cfra directly if animtimer is running as this can cause * first/last frame not to be actually shown (bad since for example physics * simulations aren't reset properly). */ @@ -3010,10 +3010,10 @@ static int frame_jump_exec(bContext *C, wmOperator *op) } else { if (RNA_boolean_get(op->ptr, "end")) { - CFRA = PEFRA; + scene->r.cfra = PEFRA; } else { - CFRA = PSFRA; + scene->r.cfra = PSFRA; } areas_do_frame_follow(C, true); @@ -3062,7 +3062,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - float cfra = (float)(CFRA); + float cfra = (float)(scene->r.cfra); /* Initialize binary-tree-list for getting keyframes. */ struct AnimKeylist *keylist = ED_keylist_create(); @@ -3104,9 +3104,9 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) } while ((ak != NULL) && (done == false)) { - if (CFRA != (int)ak->cfra) { + if (scene->r.cfra != (int)ak->cfra) { /* this changes the frame, so set the frame and we're done */ - CFRA = (int)ak->cfra; + scene->r.cfra = (int)ak->cfra; done = true; } else { @@ -3165,20 +3165,20 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot) static int marker_jump_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - int closest = CFRA; + int closest = scene->r.cfra; const bool next = RNA_boolean_get(op->ptr, "next"); bool found = false; /* find matching marker in the right direction */ LISTBASE_FOREACH (TimeMarker *, marker, &scene->markers) { if (next) { - if ((marker->frame > CFRA) && (!found || closest > marker->frame)) { + if ((marker->frame > scene->r.cfra) && (!found || closest > marker->frame)) { closest = marker->frame; found = true; } } else { - if ((marker->frame < CFRA) && (!found || closest < marker->frame)) { + if ((marker->frame < scene->r.cfra) && (!found || closest < marker->frame)) { closest = marker->frame; found = true; } @@ -3192,7 +3192,7 @@ static int marker_jump_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - CFRA = closest; + scene->r.cfra = closest; areas_do_frame_follow(C, true); @@ -4714,7 +4714,7 @@ static int screen_animation_step_invoke(bContext *C, wmOperator *UNUSED(op), con if (sad->flag & ANIMPLAY_FLAG_JUMPED) { DEG_id_tag_update(&scene->id, ID_RECALC_FRAME_CHANGE); #ifdef PROFILE_AUDIO_SYNCH - old_frame = CFRA; + old_frame = scene->r.cfra; #endif } |