diff options
author | Matt Ebb <matt@mke3.net> | 2010-06-27 09:39:55 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-06-27 09:39:55 +0400 |
commit | 03fa4bb9992293b51eb7c24f2c1f810df634e632 (patch) | |
tree | 7dacebe843bf9c041b3ebb220665f428d58e2804 /source/blender/editors/space_graph | |
parent | ea4e5a08cdb782d314cee48dde5dff9331054fe3 (diff) |
Partial cleanup of timing system, with some guidance from Joshua:
* Fractional frames support has been changed to use a new var, scene->r.subframe.
This is a 0.0-1.0 float representing a subframe interval, used in generating a final float
frame number to evaluate animation system etc.
* Changed frame_to_float() and some instances of bsystem_time() into a convenience function:
float BKE_curframe(scene) which retrieves the floating point current frame, after subframe
and frame length corrections.
* Removed blur_offs and field_offs globals. These are now stored in render, used to
generate a scene->r.subframe before render database processing.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_ops.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 6834dfac58a..a4a72ad2cd4 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1582,6 +1582,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *op) /* take the average values, rounding to the nearest int for the current frame */ CFRA= (int)floor((ked.f1 / ked.i1) + 0.5f); + SUBFRA= 0.f; sipo->cursorVal= ked.f2 / (float)ked.i1; } diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index c6d601f9305..fa9acb282c7 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -71,6 +71,7 @@ static void graphview_cursor_apply(bContext *C, wmOperator *op) * NOTE: sync this part of the code with ANIM_OT_change_frame */ CFRA= RNA_int_get(op->ptr, "frame"); + SUBFRA=0.f; sound_seek_scene(C); /* set the cursor value */ |