Bugfix #20817: Graph Editor, Drivers: Driving a Shapekey by a bone rotation: Unable...
authorJoshua Leung <aligorith@gmail.com>
Mon, 25 Jan 2010 23:11:01 +0000 (23:11 +0000)
committerJoshua Leung <aligorith@gmail.com>
Mon, 25 Jan 2010 23:11:01 +0000 (23:11 +0000)
Wrong filters were used for F-Curves for adding the modifiers. Now the Graph Editor curve visibility settings are only taken into account for this when the hotkey version (i.e. only_active == False) is used, which means that the button works again.

source/blender/editors/space_action/action_edit.c
source/blender/editors/space_graph/graph_edit.c

index 1ab4364951d6c065044457b5c00cc918cd2ae188..f94ff80c5095233f7cdb7192838af1d68b0da828 100644 (file)
@@ -1277,7 +1277,7 @@ void ACTION_OT_snap (wmOperatorType *ot)
 /* defines for mirror keyframes tool */
 EnumPropertyItem prop_actkeys_mirror_types[] = {
        {ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", ""},
-       {ACTKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", ""},
+       {ACTKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", ""}, // XXX this is probably better suited to the graph editor only, where we can see the effects
        {ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", ""},
        {ACTKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", ""},
        {0, NULL, 0, NULL, NULL}
index 9fda92a58520b5d959e4c1974bf3f2d739f295c4..b3532963c3bb66da25b4e596386c3d56c7f78cb0 100644 (file)
@@ -1923,11 +1923,11 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
        type= RNA_enum_get(op->ptr, "type");
        
        /* filter data */
-       filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
+       filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
        if (RNA_boolean_get(op->ptr, "only_active"))
                filter |= ANIMFILTER_ACTIVE;
        else
-               filter |= ANIMFILTER_SEL;
+               filter |= (ANIMFILTER_SEL|ANIMFILTER_CURVEVISIBLE);
        ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
        
        /* smooth keyframes */