Revision: 19678
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19678
Author:   aligorith
Date:     2009-04-12 15:19:21 +0200 (Sun, 12 Apr 2009)

Log Message:
-----------
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

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
    branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c
    
branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c
    branches/blender2.5/blender/source/blender/editors/space_graph/graph_ops.c
    
branches/blender2.5/blender/source/blender/editors/space_graph/graph_select.c

Modified: 
branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c  
2009-04-12 10:56:36 UTC (rev 19677)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c  
2009-04-12 13:19:21 UTC (rev 19678)
@@ -563,7 +563,7 @@
                        lastchan= agrp->channels.last;
                
                
-               /* there are some situations, where only the channels of the 
animive group should get considered */
+               /* there are some situations, where only the channels of the 
action group should get considered */
                if (!(filter_mode & ANIMFILTER_ACTGROUPED) || (agrp->flag & 
AGRP_ACTIVE)) {
                        /* filters here are a bit convoulted...
                         *      - groups show a "summary" of keyframes beside 
their name which must accessable for tools which handle keyframes
@@ -574,8 +574,9 @@
                         *      - group is expanded
                         *      - we're interested in keyframes, but not if 
they appear in selected channels
                         */
+                       // XXX what was the selection check here for again?
                        if ( (!(filter_mode & ANIMFILTER_VISIBLE) || 
EXPANDED_AGRP(agrp)) || 
-                                ( ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) && 
(filter_mode & ANIMFILTER_CURVESONLY) ) ) 
+                                ( /*ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) &&*/ 
(filter_mode & ANIMFILTER_CURVESONLY) ) ) 
                        {
                                if (!(filter_mode & ANIMFILTER_FOREDIT) || 
EDITABLE_AGRP(agrp)) {
                                        // XXX the 'owner' info here needs 
review...

Modified: 
branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c 
2009-04-12 10:56:36 UTC (rev 19677)
+++ branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c 
2009-04-12 13:19:21 UTC (rev 19678)
@@ -786,7 +786,7 @@
        
        /* 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:

Modified: 
branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c   
    2009-04-12 10:56:36 UTC (rev 19677)
+++ 
branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c   
    2009-04-12 13:19:21 UTC (rev 19678)
@@ -66,8 +66,6 @@
 enum {
        B_REDR  = 0,
        B_MODECHANGE,
-       B_GRAPHCOPYKEYS,
-       B_GRAPHPASTEKEYS,
 } eActHeader_ButEvents;
 
 /* ************************ header area region *********************** */
@@ -198,17 +196,17 @@
                        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);
        

Modified: 
branches/blender2.5/blender/source/blender/editors/space_graph/graph_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_graph/graph_ops.c  
2009-04-12 10:56:36 UTC (rev 19677)
+++ branches/blender2.5/blender/source/blender/editors/space_graph/graph_ops.c  
2009-04-12 13:19:21 UTC (rev 19678)
@@ -160,6 +160,9 @@
                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);

Modified: 
branches/blender2.5/blender/source/blender/editors/space_graph/graph_select.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/space_graph/graph_select.c   
    2009-04-12 10:56:36 UTC (rev 19677)
+++ 
branches/blender2.5/blender/source/blender/editors/space_graph/graph_select.c   
    2009-04-12 13:19:21 UTC (rev 19678)
@@ -671,7 +671,7 @@
                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);
        }
        


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to