diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-01-11 09:32:05 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-01-11 09:32:05 +0300 |
commit | 1afb01876c8b35fb2b72ca89d6e12d844a811cf2 (patch) | |
tree | de86b507024f9fb46fa4879ec90a75072bc615e2 /source/blender/editors/space_graph | |
parent | 1f12e8c59f9bcdcef8b632b2a93d1b1875209b27 (diff) |
Graph Editor: Snapping + Cursor
Added buttons beside the numeric inputs for cursor location to make it more obvious how the cursor can be used for numeric manipulation of selected keyframes.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 14 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 2 |
2 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index a866ebd75e2..7dfb11a9827 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -147,7 +147,7 @@ static void graph_panel_view(const bContext *C, Panel *pa) SpaceIpo *sipo= CTX_wm_space_graph(C); Scene *scene= CTX_data_scene(C); PointerRNA spaceptr, sceneptr; - uiLayout *col, *subcol; + uiLayout *col, *subcol, *row; /* get RNA pointers for use when creating the UI elements */ RNA_id_pointer_create(&scene->id, &sceneptr); @@ -159,12 +159,16 @@ static void graph_panel_view(const bContext *C, Panel *pa) subcol= uiLayoutColumn(col, 1); uiLayoutSetActive(subcol, RNA_boolean_get(&spaceptr, "show_cursor")); - uiItemR(subcol, "Cursor X", 0, &sceneptr, "current_frame", 0); - uiItemR(subcol, "Cursor Y", 0, &spaceptr, "cursor_value", 0); - + uiItemO(subcol, "Cursor from Selection", 0, "GRAPH_OT_frame_jump"); + subcol= uiLayoutColumn(col, 1); uiLayoutSetActive(subcol, RNA_boolean_get(&spaceptr, "show_cursor")); - uiItemO(subcol, "Cursor from Selection", 0, "GRAPH_OT_frame_jump"); + row= uiLayoutSplit(subcol, 0.7, 1); + uiItemR(row, "Cursor X", 0, &sceneptr, "current_frame", 0); + uiItemEnumO(row, "To Keys", 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_CFRA); + row= uiLayoutSplit(subcol, 0.7, 1); + uiItemR(row, "Cursor Y", 0, &spaceptr, "cursor_value", 0); + uiItemEnumO(row, "To Keys", 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_VALUE); } /* ******************* active F-Curve ************** */ diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index ffc450b5368..2adf783b338 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1686,7 +1686,7 @@ void GRAPH_OT_snap (wmOperatorType *ot) /* identifiers */ ot->name= "Snap Keys"; ot->idname= "GRAPH_OT_snap"; - ot->description= "Snap selected keyframes to the times specified."; + ot->description= "Snap selected keyframes to the chosen times/values."; /* api callbacks */ ot->invoke= WM_menu_invoke; |