[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25892] trunk/blender/source/blender/ editors/space_graph: Graph Editor: Snapping + Cursor
Joshua Leung
aligorith at gmail.com
Mon Jan 11 07:32:06 CET 2010
Revision: 25892
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25892
Author: aligorith
Date: 2010-01-11 07:32:05 +0100 (Mon, 11 Jan 2010)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_graph/graph_buttons.c
trunk/blender/source/blender/editors/space_graph/graph_edit.c
Modified: trunk/blender/source/blender/editors/space_graph/graph_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2010-01-11 05:55:34 UTC (rev 25891)
+++ trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2010-01-11 06:32:05 UTC (rev 25892)
@@ -147,7 +147,7 @@
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 @@
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 ************** */
Modified: trunk/blender/source/blender/editors/space_graph/graph_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_edit.c 2010-01-11 05:55:34 UTC (rev 25891)
+++ trunk/blender/source/blender/editors/space_graph/graph_edit.c 2010-01-11 06:32:05 UTC (rev 25892)
@@ -1686,7 +1686,7 @@
/* 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;
More information about the Bf-blender-cvs
mailing list