2.5 Animation UI Tweaks:
authorJoshua Leung <aligorith@gmail.com>
Fri, 17 Apr 2009 02:13:35 +0000 (02:13 +0000)
committerJoshua Leung <aligorith@gmail.com>
Fri, 17 Apr 2009 02:13:35 +0000 (02:13 +0000)
* Added back backgrounds behind buttons for modifiers and driver targets
* 'Protect' toggle doesn't draw for F-Curves with no keyframes to prevent editing on anymore
* Inserting keyframes on objects using builtin keyingsets now use the right names

source/blender/editors/animation/anim_channels.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_header.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_draw.c

index e0f760542d9e06199f9150d725c24080614076f8..9e0e50a8de53f1f04725f06253d64babc2c7eecd 100644 (file)
@@ -1494,8 +1494,9 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
                                offset = 0;
                        
                        if (x >= (ACHANNEL_NAMEWIDTH-ACHANNEL_BUTTON_WIDTH)) {
-                               /* toggle protection */
-                               fcu->flag ^= FCURVE_PROTECTED;
+                               /* toggle protection (only if there's a toggle there) */
+                               if (fcu->bezt)
+                                       fcu->flag ^= FCURVE_PROTECTED;
                        }
                        else if (x >= (ACHANNEL_NAMEWIDTH-2*ACHANNEL_BUTTON_WIDTH)) {
                                /* toggle mute */
index 02b7980f0c40e96e5e6bb94439bf804cfa76f654..adc0b744d5339cdc981eb73048df0c4371d8ee69 100644 (file)
@@ -1077,7 +1077,7 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
                                int arraylen, i;
                                
                                /* set initial group name */
-                               groupname= (cks->id) ? cks->id->name : NULL;
+                               groupname= (cks->id) ? cks->id->name+2 : NULL;
                                
                                /* construct the path */
                                // FIXME: this currently only works with a few hardcoded cases
index e220882004cb035a9e24c39ff7c856b427259c11..a551b4f463c76bdb0cc4c32d44516212d1313db2 100644 (file)
@@ -680,10 +680,14 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        else    
                                                mute = ICON_MUTE_IPO_OFF;
                                                
-                                       if (EDITABLE_FCU(fcu))
-                                               protect = ICON_UNLOCKED;
+                                       if (fcu->bezt) {
+                                               if (EDITABLE_FCU(fcu))
+                                                       protect = ICON_UNLOCKED;
+                                               else
+                                                       protect = ICON_LOCKED;
+                                       }
                                        else
-                                               protect = ICON_LOCKED;
+                                               protect = ICON_ZOOMOUT; // XXX editability is irrelevant here, but this icon is temp...
                                        
                                        sel = SEL_FCU(fcu);
                                        
index 8be90caa86fb1ec4b0c65a881b669bfd163ad70d..fa96e1ea81fd34c0954f397eca6bc7d180623b55 100644 (file)
@@ -1558,31 +1558,45 @@ static void saction_idpoin_handle(bContext *C, ID *id, int event)
 {
        SpaceAction *saction= (SpaceAction*)CTX_wm_space_data(C);
        Object *obact= CTX_data_active_object(C);
-       // AnimData *adt= BKE_id_add_animdata((ID *)obact);
-
+       
+       printf("actedit do id: \n");
+       
        switch (event) {
                case UI_ID_BROWSE:
+                       printf("browse \n");
                case UI_ID_DELETE:
+                       printf("browse or delete \n");
                        saction->action= (bAction*)id;
+                       
                        /* we must set this action to be the one used by active object (if not pinned) */
-                       if (saction->pin == 0)
-                               obact->adt->action= saction->action;
+                       if (saction->pin == 0) {
+                               AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
+                               
+                               /* set action */
+                               printf("\tset action \n");
+                               adt->action= saction->action;
+                       }
                        
                        ED_area_tag_redraw(CTX_wm_area(C));
                        ED_undo_push(C, "Assign Action");
                        break;
                case UI_ID_RENAME:
+                       printf("actedit rename \n");
                        break;
                case UI_ID_ADD_NEW:
+                       printf("actedit addnew \n");
                        /* XXX not implemented */
                        break;
                case UI_ID_OPEN:
+                       printf("actedit open \n");
                        /* XXX not implemented */
                        break;
                case UI_ID_ALONE:
+                       printf("actedit alone \n");
                        /* XXX not implemented */
                        break;
                case UI_ID_PIN:
+                       printf("actedit pin \n");
                        break;
        }
 }
@@ -1689,7 +1703,7 @@ void action_header_buttons(const bContext *C, ARegion *ar)
                        /* NAME ETC */
                        //uiClearButLock();
                        
-                       /* NAME ETC (it is assumed that */
+                       /* NAME ETC  */
                        xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)saction->action, ID_AC, &saction->pin, xco, yco,
                                saction_idpoin_handle, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_DELETE|UI_ID_FAKE_USER|UI_ID_ALONE|UI_ID_PIN);
                        
index cfb5d61f90b08d8b685d1ec4133c569619040ab7..d856f15bc1cfa2dd1c864ef5ca454f5a63b665e0 100644 (file)
@@ -154,7 +154,7 @@ static void do_graph_region_driver_buttons(bContext *C, void *arg, int event)
        }
        
        /* default for now */
-       //WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
+       WM_event_add_notifier(C, NC_SCENE, scene);
 }
 
 #if 0 // XXX replace this for RNA
@@ -272,7 +272,10 @@ static void graph_panel_drivers(const bContext *C, ARegion *ar, short cntrl, bAn
        
        /* loop over targets, drawing them */
        for (dtar= driver->targets.first; dtar; dtar= dtar->next) {
-               short height = 60;
+               short height = (dtar->id) ? 80 : 60;
+               
+               /* panel behind buttons */
+               uiDefBut(block, ROUNDBOX, B_REDR, "", 5, yco-height+25, 310, height, NULL, 5.0, 0.0, 12.0, 0, "");
                
                /* variable name */
                uiDefButC(block, TEX, B_REDR, "Name: ", 10,yco,280,20, dtar->name, 0, 63, 0, 0, "Name of target variable (No spaces or dots are allowed. Also, must not start with a symbol or digit).");
@@ -288,9 +291,6 @@ static void graph_panel_drivers(const bContext *C, ARegion *ar, short cntrl, bAn
                
                // XXX should we hide these technical details?
                if (dtar->id) {
-                       /* increase height by one row */
-                       height += 20;
-                       
                        uiBlockBeginAlign(block);
                                /* RNA Path */
                                RNA_pointer_create(ale->id, &RNA_DriverTarget, dtar, &rna_ptr);
@@ -331,10 +331,7 @@ static void do_graph_region_modifier_buttons(bContext *C, void *arg, int event)
 // XXX for now, roundbox has it's callback func set to NULL to not intercept events
 #define DRAW_BACKDROP(height) \
        { \
-               if (active) uiBlockSetCol(block, TH_BUT_ACTION); \
-                       but= uiDefBut(block, ROUNDBOX, B_REDR, "", 10-8, *yco-height, width, height-1, NULL, 5.0, 0.0, 12.0, (float)rb_col, ""); \
-                       uiButSetFunc(but, NULL, NULL, NULL); \
-               if (active) uiBlockSetCol(block, TH_AUTO); \
+               uiDefBut(block, ROUNDBOX, B_REDR, "", -3, *yco-height, width+3, height-1, NULL, 5.0, 0.0, 12.0, (float)rb_col, ""); \
        }
 
 /* callback to verify modifier data */
@@ -383,13 +380,13 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm
        (*height) = 90;
        switch (data->mode) {
                case FCM_GENERATOR_POLYNOMIAL: /* polynomial expression */
-                       (*height) += 20*(data->poly_order+1) + 35;
+                       (*height) += 20*(data->poly_order+1) + 20;
                        break;
                case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* factorised polynomial */
-                       (*height) += 20 * data->poly_order;
+                       (*height) += 20 * data->poly_order + 15;
                        break;
                case FCM_GENERATOR_FUNCTION: /* builtin function */
-                       (*height) += 50; // xxx
+                       (*height) += 55; // xxx
                        break;
                case FCM_GENERATOR_EXPRESSION: /* py-expression */
                        // xxx nothing to draw 
@@ -397,7 +394,7 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm
        }
        
        /* basic settings (backdrop + mode selector + some padding) */
-       //DRAW_BACKDROP((*height)); // XXX buggy...
+       DRAW_BACKDROP((*height));
        uiBlockBeginAlign(block);
                but= uiDefButS(block, MENU, B_FMODIFIER_REDRAW, gen_mode, 10,cy,width-30,19, &data->mode, 0, 0, 0, 0, "Selects type of generator algorithm.");
                uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm);
@@ -505,7 +502,7 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm
                                char func_name[32];
                                
                                /* coefficient outside bracket */
-                               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, cy, 80, 20, cp, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (A) for function");
+                               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 5, cy, 80, 20, cp, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (A) for function");
                                
                                /* opening bracket */
                                switch (data->func_type)
@@ -529,14 +526,14 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm
                                                sprintf(func_name, "<fn?>(");
                                                break;
                                }
-                               uiDefBut(block, LABEL, 1, func_name, 80, cy, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
+                               uiDefBut(block, LABEL, 1, func_name, 85, cy, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
                                
                                /* coefficients inside bracket */
-                               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 115, cy, 75, 20, cp+1, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (B) of x");
+                               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 120, cy, 75, 20, cp+1, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (B) of x");
                                
-                               uiDefBut(block, LABEL, 1, "x+", 190, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
+                               uiDefBut(block, LABEL, 1, "x+", 195, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
                                
-                               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 220, cy, 80, 20, cp+2, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (C) of function");
+                               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 225, cy, 80, 20, cp+2, -FLT_MAX, FLT_MAX, 10, 3, "Coefficient (C) of function");
                                
                                /* closing bracket */
                                        uiDefBut(block, LABEL, 1, ")", 300, cy, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
@@ -561,23 +558,23 @@ static void draw_modifier__cycles(uiBlock *block, FCurve *fcu, FModifier *fcm, i
        int cy= (*yco - 30), cy1= (*yco - 50), cy2= (*yco - 70);
        
        /* set the height */
-       (*height) = 90;
+       (*height) = 80;
        
        /* basic settings (backdrop + some padding) */
-       //DRAW_BACKDROP((*height)); // XXX buggy...
+       DRAW_BACKDROP((*height));
        
        /* 'before' range */
-       uiDefBut(block, LABEL, 1, "Before:", 10, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling before first keyframe");
+       uiDefBut(block, LABEL, 1, "Before:", 5, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling before first keyframe");
        uiBlockBeginAlign(block);
-               uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 10,cy1,150,20, &data->before_mode, 0, 0, 0, 0, "Cycling mode to use before first keyframe");
-               uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 10, cy2, 150, 20, &data->before_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)");
+               uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 5,cy1,150,20, &data->before_mode, 0, 0, 0, 0, "Cycling mode to use before first keyframe");
+               uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 5, cy2, 150, 20, &data->before_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)");
        uiBlockEndAlign(block);
        
        /* 'after' range */
-       uiDefBut(block, LABEL, 1, "After:", 160, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling after last keyframe");
+       uiDefBut(block, LABEL, 1, "After:", 155, cy, 80, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling after last keyframe");
        uiBlockBeginAlign(block);
-               uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 170,cy1,150,20, &data->after_mode, 0, 0, 0, 0, "Cycling mode to use after first keyframe");
-               uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 170, cy2, 150, 20, &data->after_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)");
+               uiDefButS(block, MENU, B_FMODIFIER_REDRAW, cyc_mode, 165,cy1,150,20, &data->after_mode, 0, 0, 0, 0, "Cycling mode to use after first keyframe");
+               uiDefButS(block, NUM, B_FMODIFIER_REDRAW, "Max Cycles:", 165, cy2, 150, 20, &data->after_cycles, 0, 10000, 10, 3, "Maximum number of cycles to allow (0 = infinite)");
        uiBlockEndAlign(block);
 }
 
@@ -748,16 +745,16 @@ static void draw_modifier__envelope(uiBlock *block, FCurve *fcu, FModifier *fcm,
        FMod_Envelope *env= (FMod_Envelope *)fcm->data;
        FCM_EnvelopeData *fed;
        uiBut *but;
-       int cy= (*yco - 30);
+       int cy= (*yco - 28);
        int i;
        
        /* set the height:
         *      - basic settings + variable height from envelope controls
         */
-       (*height) = 96 + (25 * env->totvert);
+       (*height) = 115 + (35 * env->totvert);
        
        /* basic settings (backdrop + general settings + some padding) */
-       //DRAW_BACKDROP((*height)); // XXX buggy...
+       DRAW_BACKDROP((*height));
        
        /* General Settings */
        uiDefBut(block, LABEL, 1, "Envelope:", 10, cy, 100, 20, NULL, 0.0, 0.0, 0, 0, "Settings for cycling before first keyframe");
@@ -783,13 +780,13 @@ static void draw_modifier__envelope(uiBlock *block, FCurve *fcu, FModifier *fcm,
        /* Points List */
        for (i=0, fed=env->data; i < env->totvert; i++, fed++) {
                uiBlockBeginAlign(block);
-                       but=uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Fra:", 5, cy, 100, 20, &fed->time, -FLT_MAX, FLT_MAX, 10, 3, "Frame that envelope point occurs");
+                       but=uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Fra:", 2, cy, 90, 20, &fed->time, -FLT_MAX, FLT_MAX, 10, 1, "Frame that envelope point occurs");
                        uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm);
                        
-                       uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Min:", 105, cy, 100, 20, &fed->min, -FLT_MAX, FLT_MAX, 10, 3, "Minimum bound of envelope at this point");
-                       uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Max:", 205, cy, 100, 20, &fed->max, -FLT_MAX, FLT_MAX, 10, 3, "Maximum bound of envelope at this point");
+                       uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Min:", 92, cy, 100, 20, &fed->min, -FLT_MAX, FLT_MAX, 10, 2, "Minimum bound of envelope at this point");
+                       uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "Max:", 192, cy, 100, 20, &fed->max, -FLT_MAX, FLT_MAX, 10, 2, "Maximum bound of envelope at this point");
                        
-                       but= uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 305, cy, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Delete envelope control point");
+                       but= uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 292, cy, 18, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Delete envelope control point");
                        uiButSetFunc(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i));
                uiBlockBeginAlign(block);
                cy -= 25;
@@ -806,30 +803,30 @@ static void draw_modifier__limits(uiBlock *block, FCurve *fcu, FModifier *fcm, i
        const int textButWidth = ((width/2)-togButWidth);
        
        /* set the height */
-       (*height) = 90;
+       (*height) = 50;
        
        /* basic settings (backdrop + some padding) */
-       //DRAW_BACKDROP((*height)); // XXX buggy...
+       DRAW_BACKDROP((*height));
        
        /* Draw Pairs of LimitToggle+LimitValue */
        uiBlockBeginAlign(block); 
-               uiDefButBitI(block, TOGBUT, FCM_LIMIT_XMIN, B_FMODIFIER_REDRAW, "xMin", 10, *yco-30, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use minimum x value"); 
-               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 10+togButWidth, *yco-30, (textButWidth-5), 18, &data->rect.xmin, -FLT_MAX, FLT_MAX, 0.1,0.5,"Lowest x value to allow"); 
+               uiDefButBitI(block, TOGBUT, FCM_LIMIT_XMIN, B_FMODIFIER_REDRAW, "xMin", 8, *yco-30, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use minimum x value"); 
+               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 8+togButWidth, *yco-30, (textButWidth-5), 18, &data->rect.xmin, -FLT_MAX, FLT_MAX, 0.1,0.5,"Lowest x value to allow"); 
        uiBlockEndAlign(block); 
        
        uiBlockBeginAlign(block); 
-               uiDefButBitI(block, TOGBUT, FCM_LIMIT_XMAX, B_FMODIFIER_REDRAW, "XMax", 10+(width-(textButWidth-5)-togButWidth), *yco-30, 50, 18, &data->flag, 0, 24, 0, 0, "Use maximum x value"); 
-               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 10+(width-textButWidth-5), *yco-30, (textButWidth-5), 18, &data->rect.xmax, -FLT_MAX, FLT_MAX, 0.1,0.5,"Highest x value to allow"); 
+               uiDefButBitI(block, TOGBUT, FCM_LIMIT_XMAX, B_FMODIFIER_REDRAW, "XMax", 8+(width-(textButWidth-5)-togButWidth), *yco-30, 50, 18, &data->flag, 0, 24, 0, 0, "Use maximum x value"); 
+               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 8+(width-textButWidth-5), *yco-30, (textButWidth-5), 18, &data->rect.xmax, -FLT_MAX, FLT_MAX, 0.1,0.5,"Highest x value to allow"); 
        uiBlockEndAlign(block); 
        
        uiBlockBeginAlign(block); 
-               uiDefButBitI(block, TOGBUT, FCM_LIMIT_YMIN, B_FMODIFIER_REDRAW, "yMin", 10, *yco-52, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use minimum y value"); 
-               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 10+togButWidth, *yco-52, (textButWidth-5), 18, &data->rect.ymin, -FLT_MAX, FLT_MAX, 0.1,0.5,"Lowest y value to allow"); 
+               uiDefButBitI(block, TOGBUT, FCM_LIMIT_YMIN, B_FMODIFIER_REDRAW, "yMin", 8, *yco-52, togButWidth, 18, &data->flag, 0, 24, 0, 0, "Use minimum y value"); 
+               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 8+togButWidth, *yco-52, (textButWidth-5), 18, &data->rect.ymin, -FLT_MAX, FLT_MAX, 0.1,0.5,"Lowest y value to allow"); 
        uiBlockEndAlign(block);
        
        uiBlockBeginAlign(block); 
-               uiDefButBitI(block, TOGBUT, FCM_LIMIT_YMAX, B_FMODIFIER_REDRAW, "YMax", 10+(width-(textButWidth-5)-togButWidth), *yco-52, 50, 18, &data->flag, 0, 24, 0, 0, "Use maximum y value"); 
-               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 10+(width-textButWidth-5), *yco-52, (textButWidth-5), 18, &data->rect.ymax, -FLT_MAX, FLT_MAX, 0.1,0.5,"Highest y value to allow"); 
+               uiDefButBitI(block, TOGBUT, FCM_LIMIT_YMAX, B_FMODIFIER_REDRAW, "YMax", 8+(width-(textButWidth-5)-togButWidth), *yco-52, 50, 18, &data->flag, 0, 24, 0, 0, "Use maximum y value"); 
+               uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 8+(width-textButWidth-5), *yco-52, (textButWidth-5), 18, &data->rect.ymax, -FLT_MAX, FLT_MAX, 0.1,0.5,"Highest y value to allow"); 
        uiBlockEndAlign(block); 
 }
 
@@ -849,12 +846,8 @@ static void graph_panel_modifier_draw(uiBlock *block, FCurve *fcu, FModifier *fc
                uiBlockSetEmboss(block, UI_EMBOSSN);
                
                /* rounded header */
-#if 0 // XXX buggy...
-               if (active) uiBlockSetCol(block, TH_BUT_ACTION);
-                       rb_col= (active)?-20:20;
-                       but= uiDefBut(block, ROUNDBOX, B_REDR, "", 10-8, *yco-2, width, 24, NULL, 5.0, 0.0, 15.0, (float)(rb_col-20), ""); 
-               if (active) uiBlockSetCol(block, TH_AUTO);
-#endif // XXX buggy
+               rb_col= (active)?-20:20;
+               but= uiDefBut(block, ROUNDBOX, B_REDR, "", 0, *yco-2, width, 24, NULL, 5.0, 0.0, 15.0, (float)(rb_col-20), ""); 
                
                /* expand */
                uiDefIconButBitS(block, ICONTOG, FMODIFIER_FLAG_EXPANDED, B_REDR, ICON_TRIA_RIGHT,      5, *yco-1, 20, 20, &fcm->flag, 0.0, 0.0, 0, 0, "Modifier is expanded");
index e8c84b1d74dd8ee3a5a9740c32cf3160ab1b80b2..6f33a5dd6821a6ee2e40956d500a59da2be71769 100644 (file)
@@ -1211,10 +1211,14 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
                                        else    
                                                mute = ICON_MUTE_IPO_OFF;
                                                
-                                       if (EDITABLE_FCU(fcu))
-                                               protect = ICON_UNLOCKED;
+                                       if (fcu->bezt) {
+                                               if (EDITABLE_FCU(fcu))
+                                                       protect = ICON_UNLOCKED;
+                                               else
+                                                       protect = ICON_LOCKED;
+                                       }
                                        else
-                                               protect = ICON_LOCKED;
+                                               protect = ICON_ZOOMOUT; // XXX editability is irrelevant here, but this icon is temp...
                                        
                                        sel = SEL_FCU(fcu);