diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-04-12 17:19:21 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-04-12 17:19:21 +0400 |
commit | 1fec143198d34dd50a55ef313f2daf55a75cd414 (patch) | |
tree | 55abfa8ebb0097244dec8dd27e4e91634d090819 /source/blender/editors/space_graph | |
parent | 2db495d4e3249f9026950e032dbf231e13104f43 (diff) |
Graph Editor: Bugfixes
* Fixed bug with curves sometimes not being displayed. Will investigate further tomorrow.
* Copy/Paste buttons in header now work. I've ported these over to use operator buttons
* Ctrl-Alt-Shift-RMB now selects all the keyframes in multiple F-Curves at once
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_header.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_ops.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 0353f590347..97c9995eab6 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -786,7 +786,7 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri /* build list of curves to draw */ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CURVESONLY|ANIMFILTER_CURVEVISIBLE); - filter |= (sel) ? (ANIMFILTER_SEL) : (ANIMFILTER_UNSEL); + filter |= ((sel) ? (ANIMFILTER_SEL) : (ANIMFILTER_UNSEL)); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* for each curve: diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c index 1d53434fa70..e19c0702b3d 100644 --- a/source/blender/editors/space_graph/graph_header.c +++ b/source/blender/editors/space_graph/graph_header.c @@ -66,8 +66,6 @@ enum { B_REDR = 0, B_MODECHANGE, - B_GRAPHCOPYKEYS, - B_GRAPHPASTEKEYS, } eActHeader_ButEvents; /* ************************ header area region *********************** */ @@ -198,17 +196,17 @@ void graph_header_buttons(const bContext *C, ARegion *ar) uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Cameras"); uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Curves"); uiBlockEndAlign(block); - xco += 30; + xco += 15; } else { // XXX this case shouldn't happen at all... for now, just pad out same amount of space - xco += 6*XIC + 35; + xco += 6*XIC + 15; } /* copy + paste */ uiBlockBeginAlign(block); - uiDefIconBut(block, BUT, B_GRAPHCOPYKEYS, ICON_COPYDOWN, xco,yco,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer"); - uiDefIconBut(block, BUT, B_GRAPHPASTEKEYS, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer"); + uiDefIconButO(block, BUT, "GRAPHEDIT_OT_keyframes_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco+=XIC,yco,XIC,YIC, "Copies the selected keyframes from the selected channel(s) to the buffer"); + uiDefIconButO(block, BUT, "GRAPHEDIT_OT_keyframes_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, "Pastes the keyframes from the buffer"); uiBlockEndAlign(block); xco += (XIC + 8); diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 72b7b90f037..a23f0081c04 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -160,6 +160,9 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, ListBase *keymap) RNA_enum_set(kmi->ptr, "left_right", GRAPHKEYS_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); RNA_boolean_set(kmi->ptr, "curves", 1); + kmi= WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "curves", 1); + RNA_boolean_set(kmi->ptr, "extend", 1); /* deselect all */ WM_keymap_add_item(keymap, "GRAPHEDIT_OT_keyframes_select_all_toggle", AKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 592ba0e2eb1..4b6e55d2a03 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -671,7 +671,7 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short select_mode, s select_mode= SELECT_ADD; /* deselect all other channels and keyframes */ - ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + //ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); deselect_graph_keys(ac, 0, SELECT_SUBTRACT); } |