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:
authorJoshua Leung <aligorith@gmail.com>2015-10-26 09:29:23 +0300
committerJoshua Leung <aligorith@gmail.com>2015-10-26 10:18:11 +0300
commitb3edd7bdcdbb67abef6436244bb23ec3ef890869 (patch)
tree9829b62e24bf145cafc1740606aabb79bb8bc9f7 /source/blender/editors/space_graph/graph_edit.c
parent0860fdc53cca53441ca9d9d55a30878d9cdda725 (diff)
Graph Editor: Adjusting Change Frame and Jump to Keyframes operators to work with Drivers Cursor
Diffstat (limited to 'source/blender/editors/space_graph/graph_edit.c')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index ca5d2db80e7..e423f564be2 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -1934,10 +1934,18 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
SpaceIpo *sipo = (SpaceIpo *)ac.sl;
Scene *scene = ac.scene;
- /* take the average values, rounding to the nearest int for the current frame */
- CFRA = iroundf(ked.f1 / ked.i1);
- SUBFRA = 0.f;
- sipo->cursorVal = ked.f2 / (float)ked.i1;
+ /* take the average values, rounding to the nearest int as necessary for int results */
+ if (sipo->mode == SIPO_MODE_DRIVERS) {
+ /* Drivers Mode - Affects cursor (float) */
+ sipo->cursorTime = ked.f1 / (float)ked.i1;
+ sipo->cursorVal = ked.f2 / (float)ked.i1;
+ }
+ else {
+ /* Animation Mode - Affects current frame (int) */
+ CFRA = iroundf(ked.f1 / ked.i1);
+ SUBFRA = 0.f;
+ sipo->cursorVal = ked.f2 / (float)ked.i1;
+ }
}
/* set notifier that things have changed */