diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-10-20 16:04:56 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-10-20 16:04:56 +0400 |
commit | 00f3d83b6ab5f4f9ee4f69457e492db72a03cf30 (patch) | |
tree | dd57f5d8b0bb859a0403225a11d118844a728c68 /source/blender/makesrna/intern/rna_space.c | |
parent | ec6bccfad1609fa09a703d7496310da246fd5825 (diff) |
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...
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 72856e54bdf..b989c83fbc3 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1241,6 +1241,17 @@ static void rna_def_space_graph(BlenderRNA *brna) RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points."); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); + /* cursor */ + prop= RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCURSOR); + RNA_def_property_ui_text(prop, "Show Cursor", "Show 2D cursor."); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); + + prop= RNA_def_property(srna, "cursor_value", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "cursorVal"); + RNA_def_property_ui_text(prop, "Cursor Y-Value", "Graph Editor 2D-Value cursor - Y-Value component"); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); + // TODO... autosnap, dopesheet? } |