Fix #30151: Allow Negative Frames does not affect arrow keys
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 12 Feb 2012 11:42:17 +0000 (11:42 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 12 Feb 2012 11:42:17 +0000 (11:42 +0000)
Patch by Tobias Johansson, thanks!

source/blender/editors/screen/screen_ops.c

index 0d724dc..2c652df 100644 (file)
@@ -44,6 +44,7 @@
 #include "DNA_curve_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_meta_types.h"
+#include "DNA_userdef_types.h"
 
 #include "BKE_context.h"
 #include "BKE_customdata.h"
@@ -1821,8 +1822,9 @@ static int frame_offset_exec(bContext *C, wmOperator *op)
        
        delta = RNA_int_get(op->ptr, "delta");
 
-       scene->r.cfra += delta;
-       scene->r.subframe = 0.f;
+       CFRA += delta;
+       FRAMENUMBER_MIN_CLAMP(CFRA);
+       SUBFRA = 0.f;
        
        sound_seek_scene(bmain, scene);