Graph Editor: Added 2D Cursor
I've finally given in, and implemented a '2d-cursor' for the Graph Editor. This is simply represented as an additional horizontal line that meets with the current frame indicator, forming a cross-hair. It can be disabled from the View menu. Currently, the only tool which takes this into account is the Snapping tools (Shift-S), where I've hooked up a tool I added some time ago. TODO: - expose this cursor to the transform tools for scaling/rotation options...
This commit is contained in:
@@ -81,6 +81,7 @@ static void graph_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
|
||||
uiItemS(layout);
|
||||
|
||||
uiItemR(layout, NULL, 0, &spaceptr, "show_cframe_indicator", 0);
|
||||
uiItemR(layout, NULL, 0, &spaceptr, "show_cursor", 0);
|
||||
uiItemR(layout, NULL, 0, &spaceptr, "show_sliders", 0);
|
||||
uiItemR(layout, NULL, 0, &spaceptr, "automerge_keyframes", 0);
|
||||
|
||||
@@ -162,6 +163,7 @@ static void graph_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
|
||||
{
|
||||
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
|
||||
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_CFRA);
|
||||
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_VALUE);
|
||||
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_FRAME);
|
||||
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_SECOND);
|
||||
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_MARKER);
|
||||
|
||||
Reference in New Issue
Block a user