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_ops.c')
-rw-r--r--source/blender/editors/animation/anim_ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 0e0bf275d8f..aa61afbac78 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -43,6 +41,7 @@
#include "BKE_context.h"
#include "BKE_global.h"
+#include "BKE_main.h"
#include "BKE_sound.h"
#include "UI_view2d.h"
@@ -78,6 +77,7 @@ static int change_frame_poll(bContext *C)
/* Set the new frame number */
static void change_frame_apply(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
/* set the new frame number */
@@ -86,7 +86,7 @@ static void change_frame_apply(bContext *C, wmOperator *op)
SUBFRA = 0.f;
/* do updates */
- sound_seek_scene(C);
+ sound_seek_scene(bmain, scene);
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
}
@@ -199,8 +199,8 @@ static int previewrange_define_exec(bContext *C, wmOperator *op)
* - must clamp within allowable limits
* - end must not be before start (though this won't occur most of the time)
*/
- if (sfra < 1) sfra = 1.0f;
- if (efra < 1) efra = 1.0f;
+ FRAMENUMBER_MIN_CLAMP(sfra);
+ FRAMENUMBER_MIN_CLAMP(efra);
if (efra < sfra) efra= sfra;
scene->r.flag |= SCER_PRV_RANGE;