First merge with 2.5 branch.
authorArystanbek Dyussenov <arystan.d@gmail.com>
Fri, 8 May 2009 16:02:58 +0000 (16:02 +0000)
committerArystanbek Dyussenov <arystan.d@gmail.com>
Fri, 8 May 2009 16:02:58 +0000 (16:02 +0000)
1  2 
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_graph/graph_edit.c
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/BlenderRoutines/SConscript

index 881d2d95ca4b6c30cae9a4a2de1ca7086e3c9c6b,b177a19a07f56741300014901ae5b58d5935664a..93bdadc27d388186f083650960548dbe15e23598
@@@ -291,7 -291,12 +291,7 @@@ short ANIM_animdata_get_context (const 
        
        /* get useful default context settings from context */
        ac->scene= scene;
 -      if (scene) {
 -              ac->markers.first= scene->markers.first;
 -              ac->markers.last= scene->markers.last;
 -              
 -              ac->obact= (scene->basact)?  scene->basact->object : NULL;
 -      }
 +      ac->obact= (scene && scene->basact)?  scene->basact->object : NULL;
        ac->sa= sa;
        ac->ar= ar;
        ac->spacetype= (sa) ? sa->spacetype : 0;
@@@ -1195,7 -1200,7 +1195,7 @@@ static int animdata_filter_dopesheet (L
                if (base->object) {
                        Object *ob= base->object;
                        Key *key= ob_get_key(ob);
-                       short actOk, keyOk, dataOk, matOk;
+                       short actOk=1, keyOk=1, dataOk=1, matOk=1;
                        
                        /* firstly, check if object can be included, by the following fanimors:
                         *      - if only visible, must check for layer and also viewport visibility
                         */
                        // TODO: if cache is implemented, just check name here, and then 
                        if (filter_mode & ANIMFILTER_VISIBLE) {
-                               /* layer visibility */
-                               if ((ob->lay & sce->lay)==0) continue;
+                               /* layer visibility - we check both object and base, since these may not be in sync yet */
+                               if ((sce->lay & (ob->lay|base->lay))==0) continue;
                                
                                /* outliner restrict-flag */
                                if (ob->restrictflag & OB_RESTRICT_VIEW) continue;
index 58e3aa8e172a4bed06695413dd89f962727e9b24,3848eef360842bb6aba7f620b15f84f6146d9534..97904dcdddfceba8f031f6b1d9addecfc09bb180
@@@ -31,6 -31,7 +31,7 @@@
  
  #include "MEM_guardedalloc.h"
  
+ #include "DNA_action_types.h"
  #include "DNA_scene_types.h"
  #include "DNA_screen_types.h"
  #include "DNA_space_types.h"
@@@ -45,6 -46,7 +46,6 @@@
  
  #include "BKE_context.h"
  #include "BKE_global.h"
 -#include "BKE_fcurve.h"
  #include "BKE_utildefines.h"
  
  #include "WM_api.h"
@@@ -82,6 -84,140 +83,6 @@@ static ListBase *context_get_markers(co
        return &CTX_data_scene(C)->markers;
  }
  
 -/* Get the marker that is closest to this point */
 -TimeMarker *ED_markers_find_nearest_marker (ListBase *markers, float x) 
 -{
 -      TimeMarker *marker, *nearest=NULL;
 -      float dist, min_dist= 1000000;
 -      
 -      if (markers) {
 -              for (marker= markers->first; marker; marker= marker->next) {
 -                      dist = ABS((float)marker->frame - x);
 -                      
 -                      if (dist < min_dist) {
 -                              min_dist= dist;
 -                              nearest= marker;
 -                      }
 -              }
 -      }
 -      
 -      return nearest;
 -}
 -
 -/* Return the time of the marker that occurs on a frame closest to the given time */
 -int ED_markers_find_nearest_marker_time (ListBase *markers, float x)
 -{
 -      TimeMarker *nearest= ED_markers_find_nearest_marker(markers, x);
 -      return (nearest) ? (nearest->frame) : (int)floor(x + 0.5f);
 -}
 -
 -
 -void ED_markers_get_minmax (ListBase *markers, short sel, float *first, float *last)
 -{
 -      TimeMarker *marker;
 -      float min, max;
 -      int selcount = 0;
 -      
 -      /* sanity check */
 -      if (markers == NULL) {
 -              *first = 0.0f;
 -              *last = 0.0f;
 -              return;
 -      }
 -      
 -      if (markers->first && markers->last) {
 -              TimeMarker *first= markers->first;
 -              TimeMarker *last= markers->last;
 -              
 -              min= first->frame;
 -              max= last->frame;
 -      }
 -      else {
 -              *first = 0.0f;
 -              *last = 0.0f;
 -              return;
 -      }
 -      
 -      /* count how many markers are usable - see later */
 -      if (sel) {
 -              for (marker= markers->first; marker; marker= marker->next) {
 -                      if (marker->flag & SELECT)
 -                              selcount++;
 -              }
 -      }
 -      else
 -              selcount= BLI_countlist(markers);
 -      
 -      /* if only selected are to be considered, only consider the selected ones
 -       * (optimisation for not searching list) 
 -       */
 -      if (selcount > 1) {
 -              for (marker= markers->first; marker; marker= marker->next) {
 -                      if (sel) {
 -                              if (marker->flag & SELECT) {
 -                                      if (marker->frame < min)
 -                                              min= (float)marker->frame;
 -                                      else if (marker->frame > max)
 -                                              max= (float)marker->frame;
 -                              }
 -                      }
 -                      else {
 -                              if (marker->frame < min)
 -                                      min= marker->frame;
 -                              else if (marker->frame > max)
 -                                      max= marker->frame;
 -                      }       
 -              }
 -      }
 -      
 -      /* set the min/max values */
 -      *first= min;
 -      *last= max;
 -}
 -
 -/* Adds a marker to list of cfra elems */
 -void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, short only_sel)
 -{
 -      CfraElem *ce, *cen;
 -      
 -      /* should this one only be considered if it is selected? */
 -      if ((only_sel) && ((marker->flag & SELECT)==0))
 -              return;
 -      
 -      /* insertion sort - try to find a previous cfra elem */
 -      for (ce= lb->first; ce; ce= ce->next) {
 -              if (ce->cfra == marker->frame) {
 -                      /* do because of double keys */
 -                      if (marker->flag & SELECT) 
 -                              ce->sel= marker->flag;
 -                      return;
 -              }
 -              else if (ce->cfra > marker->frame) break;
 -      }       
 -      
 -      cen= MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem"); 
 -      if (ce) BLI_insertlinkbefore(lb, ce, cen);
 -      else BLI_addtail(lb, cen);
 -
 -      cen->cfra= marker->frame;
 -      cen->sel= marker->flag;
 -}
 -
 -/* This function makes a list of all the markers. The only_sel
 - * argument is used to specify whether only the selected markers
 - * are added.
 - */
 -void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short only_sel)
 -{
 -      TimeMarker *marker;
 -      
 -      if (markers == NULL)
 -              return;
 -      
 -      for (marker= markers->first; marker; marker= marker->next)
 -              add_marker_to_cfra_elem(lb, marker, only_sel);
 -}
 -
  /* ************* Marker Drawing ************ */
  
  /* function to draw markers */
@@@ -96,12 -232,13 +97,13 @@@ static void draw_marker(View2D *v2d, Ti
        ypixels= v2d->mask.ymax-v2d->mask.ymin;
        UI_view2d_getscale(v2d, &xscale, &yscale);
        
-       glScalef(1.0/xscale, 1.0, 1.0);
+       glScalef(1.0f/xscale, 1.0f, 1.0f);
        
        glEnable(GL_BLEND);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);                      
        
        /* vertical line - dotted */
+       // NOTE: currently only used for sequencer 
        if (flag & DRAW_MARKERS_LINES) {
                setlinestyle(3);
                
                        glColor4ub(0, 0, 0, 96);
                
                glBegin(GL_LINES);
-                       glVertex2f((xpos*xscale)+0.5, 12);
-                       glVertex2f((xpos*xscale)+0.5, 34*yscale); /* a bit lazy but we know it cant be greater then 34 strips high*/
+                       glVertex2f((xpos*xscale)+0.5f, 12.0f);
+                       glVertex2f((xpos*xscale)+0.5f, 34.0f*yscale); /* a bit lazy but we know it cant be greater then 34 strips high */
                glEnd();
                
                setlinestyle(0);
                ICON_MARKER;
        }
        
-       UI_icon_draw(xpos*xscale-5.0, 16.0, icon_id);
+       UI_icon_draw(xpos*xscale-5.0f, 16.0f, icon_id);
        
        glBlendFunc(GL_ONE, GL_ZERO);
        glDisable(GL_BLEND);
        if (marker->name && marker->name[0]) {
                float x, y;
                
-               if(marker->flag & SELECT) {
+               if (marker->flag & SELECT) {
                        UI_ThemeColor(TH_TEXT_HI);
-                       x= xpos*xscale+4.0;
-                       y= (ypixels<=39.0)?(ypixels-10.0):29.0;
+                       x= xpos*xscale + 4.0f;
+                       y= (ypixels <= 39.0f)? (ypixels-10.0f) : 29.0f;
                }
                else {
                        UI_ThemeColor(TH_TEXT);
                        if((marker->frame <= cfra) && (marker->frame+5 > cfra)) {
-                               x= xpos*xscale+4.0;
-                               y= (ypixels<=39.0)?(ypixels-10.0):29.0;
+                               x= xpos*xscale + 4.0f;
+                               y= (ypixels <= 39.0f)? (ypixels - 10.0f) : 29.0f;
                        }
                        else {
-                               x= xpos*xscale+4.0;
-                               y= 17.0;
+                               x= xpos*xscale + 4.0f;
+                               y= 17.0f;
                        }
                }
                UI_DrawString(x, y, marker->name);
        }
-       glScalef(xscale, 1.0, 1.0);
+       
+       glScalef(xscale, 1.0f, 1.0f);
  }
  
  /* Draw Scene-Markers in time window */
@@@ -166,22 -304,22 +169,24 @@@ void draw_markers_time(const bContext *
        View2D *v2d= UI_view2d_fromcontext(C);
        TimeMarker *marker;
        
-       if(markers == NULL)
+       if (markers == NULL)
                return;
        
        /* unselected markers are drawn at the first time */
        for (marker= markers->first; marker; marker= marker->next) {
-               if (!(marker->flag & SELECT)) draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
+               if ((marker->flag & SELECT) == 0) 
+                       draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
        }
        
        /* selected markers are drawn later */
        for (marker= markers->first; marker; marker= marker->next) {
-               if (marker->flag & SELECT) draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
+               if (marker->flag & SELECT) 
+                       draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
        }
  }
  
 +
 +
  /* ************************** add markers *************************** */
  
  /* add TimeMarker at curent frame */
@@@ -191,13 -329,14 +196,14 @@@ static int ed_marker_add(bContext *C, w
        TimeMarker *marker;
        int frame= CTX_data_scene(C)->r.cfra;
        
-       if(markers == NULL)
+       if (markers == NULL)
                return OPERATOR_CANCELLED;
        
        /* two markers can't be at the same place */
-       for(marker= markers->first; marker; marker= marker->next)
-               if(marker->frame == frame) 
+       for (marker= markers->first; marker; marker= marker->next) {
+               if (marker->frame == frame) 
                        return OPERATOR_CANCELLED;
+       }
        
        /* deselect all */
        for(marker= markers->first; marker; marker= marker->next)
@@@ -298,9 -437,13 +304,13 @@@ static void ed_marker_move_exit(bContex
  {
        MarkerMove *mm= op->customdata;
        
+       /* free data */
        MEM_freeN(mm->oldframe);
        MEM_freeN(op->customdata);
        op->customdata= NULL;
+       
+       /* clear custom header prints */
+       ED_area_headerprint(CTX_wm_area(C), NULL);
  }
  
  static int ed_marker_move_invoke(bContext *C, wmOperator *op, wmEvent *evt)
@@@ -365,7 -508,7 +375,7 @@@ static int ed_marker_move_modal(bContex
                case ESCKEY:
                        ed_marker_move_cancel(C, op);
                        return OPERATOR_CANCELLED;
+               
                case LEFTMOUSE:
                case MIDDLEMOUSE:
                case RIGHTMOUSE:
                        
                        break;
                case MOUSEMOVE:
-       
                        dx= v2d->mask.xmax-v2d->mask.xmin;
                        dx= (v2d->cur.xmax-v2d->cur.xmin)/dx;
                        
                                                        sprintf(str, "Marker %.2f offset %.2f", FRA2TIME(selmarker->frame), FRA2TIME(offs));
                                        }
                                        else if (mm->slink->spacetype == SPACE_ACTION) {
- #if 0                                         
XXX                                           if (saction->flag & SACTION_DRAWTIME)
+                                               SpaceAction *saction= (SpaceAction *)mm->slink;
                                              if (saction->flag & SACTION_DRAWTIME)
                                                        sprintf(str, "Marker %.2f offset %.2f", FRA2TIME(selmarker->frame), FRA2TIME(offs));
                                                else
                                                        sprintf(str, "Marker %.2f offset %.2f", (double)(selmarker->frame), (double)(offs));
- #endif                                        
                                        }
                                        else {
                                                sprintf(str, "Marker %.2f offset %.2f", (double)(selmarker->frame), (double)(offs));
                                                else 
                                                        sprintf(str, "Marker offset %.2f ", FRA2TIME(offs));
                                        }
- #if 0                                 
- XXX                                   else if (mm->slink->spacetype == SPACE_ACTION) {
+                                       else if (mm->slink->spacetype == SPACE_ACTION) {
+                                               SpaceAction *saction= (SpaceAction *)mm->slink;
                                                if (saction->flag & SACTION_DRAWTIME)
                                                        sprintf(str, "Marker offset %.2f ", FRA2TIME(offs));
                                                else
                                                        sprintf(str, "Marker offset %.2f ", (double)(offs));
                                        }
- #endif                                        
                                        else {
                                                sprintf(str, "Marker offset %.2f ", (double)(offs));
                                        }
                                }
                                
                                WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
-                               // headerprint(str); XXX
+                               ED_area_headerprint(CTX_wm_area(C), str);
                        }
        }
  
@@@ -511,19 -651,23 +518,23 @@@ static void ed_marker_duplicate_apply(b
        ListBase *markers= context_get_markers(C);
        TimeMarker *marker, *newmarker;
        
-       if(markers == NULL) return;
+       if (markers == NULL) 
+               return;
  
        /* go through the list of markers, duplicate selected markers and add duplicated copies
-       * to the begining of the list (unselect original markers) */
-       for(marker= markers->first; marker; marker= marker->next) {
-               if(marker->flag & SELECT){
+        * to the begining of the list (unselect original markers) 
+        */
+       for (marker= markers->first; marker; marker= marker->next) {
+               if (marker->flag & SELECT) {
                        /* unselect selected marker */
                        marker->flag &= ~SELECT;
+                       
                        /* create and set up new marker */
                        newmarker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
                        newmarker->flag= SELECT;
                        newmarker->frame= marker->frame;
                        BLI_strncpy(newmarker->name, marker->name, sizeof(marker->name));
+                       
                        /* new marker is added to the begining of list */
                        BLI_addhead(markers, newmarker);
                }
@@@ -572,12 -716,13 +583,13 @@@ static void select_timeline_marker_fram
        TimeMarker *marker;
        int select=0;
        
-       for(marker= markers->first; marker; marker= marker->next) {
+       for (marker= markers->first; marker; marker= marker->next) {
                /* if Shift is not set, then deselect Markers */
-               if(!shift) marker->flag &= ~SELECT;
+               if (!shift) marker->flag &= ~SELECT;
+               
                /* this way a not-shift select will allways give 1 selected marker */
-               if((marker->frame == frame) && (!select)) {
-                       if(marker->flag & SELECT) 
+               if ((marker->frame == frame) && (!select)) {
+                       if (marker->flag & SELECT) 
                                marker->flag &= ~SELECT;
                        else
                                marker->flag |= SELECT;
        }
  }
  
- int find_nearest_marker_time(ListBase *markers, float dx)
++int find_nearest_marker_time (ListBase *markers, float dx)
 +{
 +      TimeMarker *marker, *nearest= NULL;
 +      float dist, min_dist= 1000000;
 +      
-       for(marker= markers->first; marker; marker= marker->next) {
++      for (marker= markers->first; marker; marker= marker->next) {
 +              dist = ABS((float)marker->frame - dx);
-               if(dist < min_dist){
++              if (dist < min_dist) {
 +                      min_dist= dist;
 +                      nearest= marker;
 +              }
 +      }
 +      
-       if(nearest) return nearest->frame;
++      if (nearest) return nearest->frame;
 +      else return (int)floor(dx); /* hrmf? */
 +}
 +
 +
  static int ed_marker_select(bContext *C, wmEvent *evt, int extend)
  {
        ListBase *markers= context_get_markers(C);
        
        UI_view2d_region_to_view(v2d, x, y, &viewx, NULL);      
        
 -      cfra= ED_markers_find_nearest_marker_time(markers, viewx);
 +      cfra= find_nearest_marker_time(markers, viewx);
        
        if (extend)
                select_timeline_marker_frame(markers, cfra, 1);
@@@ -822,9 -949,9 +834,9 @@@ static int ed_marker_delete_exec(bConte
                }
        }
        
 -      if (changed)
 +      if(changed) {
                WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
 -      
 +      }
        return OPERATOR_FINISHED;
  }
  
index bef44448829c038f973613f8356bd8e84bbb5911,8243629b4a6c9917a2a309ac2725268f4ada3745..1aadeb7969f6152a81eff9c17770ccdaea89c1b1
@@@ -382,6 -382,20 +382,6 @@@ short bezt_calc_average(BeztEditData *b
        return 0;
  }
  
 -/* helper callback for columnselect_<animeditor>_keys() -> populate list CfraElems with frame numbers from selected beztriples */
 -short bezt_to_cfraelem(BeztEditData *bed, BezTriple *bezt)
 -{
 -      /* only if selected */
 -      if (bezt->f2 & SELECT) {
 -              CfraElem *ce= MEM_callocN(sizeof(CfraElem), "cfraElem");
 -              BLI_addtail(&bed->list, ce);
 -              
 -              ce->cfra= bezt->vec[1][0];
 -      }
 -      
 -      return 0;
 -}
 -
  /* ******************************************* */
  /* Transform */
  
@@@ -412,22 -426,22 +412,22 @@@ static short snap_bezier_cframe(BeztEdi
  
  static short snap_bezier_nearmarker(BeztEditData *bed, BezTriple *bezt)
  {
 -      if (bezt->f2 & SELECT)
 -              bezt->vec[1][0]= (float)ED_markers_find_nearest_marker_time(&bed->list, bezt->vec[1][0]);
 +      //if (bezt->f2 & SELECT)
 +      //      bezt->vec[1][0]= (float)find_nearest_marker_time(bezt->vec[1][0]);  // XXX missing function!
        return 0;
  }
  
  static short snap_bezier_horizontal(BeztEditData *bed, BezTriple *bezt)
  {
        if (bezt->f2 & SELECT) {
 -              bezt->vec[0][1]= bezt->vec[2][1]= (float)floor(bezt->vec[1][1] + 0.5f);
 +              bezt->vec[0][1]= bezt->vec[2][1]= bezt->vec[1][1];
                if ((bezt->h1==HD_AUTO) || (bezt->h1==HD_VECT)) bezt->h1= HD_ALIGN;
                if ((bezt->h2==HD_AUTO) || (bezt->h2==HD_VECT)) bezt->h2= HD_ALIGN;
        }
        return 0;       
  }
  
- // calchandles_ipocurve
  BeztEditFunc ANIM_editkeyframes_snap(short type)
  {
        /* eEditKeyframes_Snap */
index 9e679a5b722abd425873159ae04ae078163e8285,99360450367398657642de752d53b0a8a968e9a2..a486e9067aec6392c80be2d5c019e470e6ef78ba
@@@ -60,6 -60,7 +60,7 @@@
  
  #include "RNA_access.h"
  #include "RNA_define.h"
+ #include "RNA_enum_types.h"
  
  #include "BKE_action.h"
  #include "BKE_depsgraph.h"
@@@ -872,14 -873,6 +873,6 @@@ void ACT_OT_keyframes_extrapolation_typ
  
  /* ******************** Set Interpolation-Type Operator *********************** */
  
- /* defines for set ipo-type for selected keyframes tool */
- EnumPropertyItem prop_actkeys_ipo_types[] = {
-       {BEZT_IPO_CONST, "CONSTANT", "Constant Interpolation", ""},
-       {BEZT_IPO_LIN, "LINEAR", "Linear Interpolation", ""},
-       {BEZT_IPO_BEZ, "BEZIER", "Bezier Interpolation", ""},
-       {0, NULL, NULL, NULL}
- };
  /* this function is responsible for setting interpolation mode for keyframes */
  static void setipo_action_keys(bAnimContext *ac, short mode) 
  {
@@@ -945,21 -938,11 +938,11 @@@ void ACT_OT_keyframes_interpolation_typ
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* id-props */
-       RNA_def_enum(ot->srna, "type", prop_actkeys_ipo_types, 0, "Type", "");
+       RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", "");
  }
  
  /* ******************** Set Handle-Type Operator *********************** */
  
- /* defines for set handle-type for selected keyframes tool */
- EnumPropertyItem prop_actkeys_handletype_types[] = {
-       {HD_AUTO, "AUTO", "Auto Handles", ""},
-       {HD_VECT, "VECTOR", "Vector Handles", ""},
-       {HD_FREE, "FREE", "Free Handles", ""},
-       {HD_ALIGN, "ALIGN", "Aligned Handles", ""},
- //    {-1, "TOGGLE", "Toggle between Free and Aligned Handles", ""},
-       {0, NULL, NULL, NULL}
- };
  /* this function is responsible for setting handle-type of selected keyframes */
  static void sethandles_action_keys(bAnimContext *ac, short mode) 
  {
@@@ -1043,7 -1026,7 +1026,7 @@@ void ACT_OT_keyframes_handle_type_set (
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* id-props */
-       RNA_def_enum(ot->srna, "type", prop_actkeys_handletype_types, 0, "Type", "");
+       RNA_def_enum(ot->srna, "type", beztriple_handle_type_items, 0, "Type", "");
  }
  
  /* ************************************************************************** */
@@@ -1135,6 -1118,7 +1118,6 @@@ static void snap_action_keys(bAnimConte
        
        memset(&bed, 0, sizeof(BeztEditData)); 
        bed.scene= ac->scene;
 -      bed.list= ac->scene->markers; /* for marker-snapping option */
        
        /* snap keyframes */
        for (ale= anim_data.first; ale; ale= ale->next) {
index 52301ac1b0f7c9a4ffb4547cfd84d5d63c70a658,40d66725847b2dd44526b2ce3d8b6b57150c0b77..4c7d855009af2e948febe56738ce153c99e7d13f
@@@ -60,6 -60,7 +60,7 @@@
  
  #include "RNA_access.h"
  #include "RNA_define.h"
+ #include "RNA_enum_types.h"
  
  #include "BKE_action.h"
  #include "BKE_depsgraph.h"
@@@ -1070,14 -1071,6 +1071,6 @@@ void GRAPHEDIT_OT_keyframes_extrapolati
  
  /* ******************** Set Interpolation-Type Operator *********************** */
  
- /* defines for set ipo-type for selected keyframes tool */
- EnumPropertyItem prop_graphkeys_ipo_types[] = {
-       {BEZT_IPO_CONST, "CONSTANT", "Constant Interpolation", ""},
-       {BEZT_IPO_LIN, "LINEAR", "Linear Interpolation", ""},
-       {BEZT_IPO_BEZ, "BEZIER", "Bezier Interpolation", ""},
-       {0, NULL, NULL, NULL}
- };
  /* this function is responsible for setting interpolation mode for keyframes */
  static void setipo_graph_keys(bAnimContext *ac, short mode) 
  {
@@@ -1141,21 -1134,11 +1134,11 @@@ void GRAPHEDIT_OT_keyframes_interpolati
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* id-props */
-       RNA_def_enum(ot->srna, "type", prop_graphkeys_ipo_types, 0, "Type", "");
+       RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", "");
  }
  
  /* ******************** Set Handle-Type Operator *********************** */
  
- /* defines for set handle-type for selected keyframes tool */
- EnumPropertyItem prop_graphkeys_handletype_types[] = {
-       {HD_AUTO, "AUTO", "Auto Handles", ""},
-       {HD_VECT, "VECTOR", "Vector Handles", ""},
-       {HD_FREE, "FREE", "Free Handles", ""},
-       {HD_ALIGN, "ALIGN", "Aligned Handles", ""},
- //    {-1, "TOGGLE", "Toggle between Free and Aligned Handles", ""},
-       {0, NULL, NULL, NULL}
- };
  /* this function is responsible for setting handle-type of selected keyframes */
  static void sethandles_graph_keys(bAnimContext *ac, short mode) 
  {
@@@ -1238,7 -1221,7 +1221,7 @@@ void GRAPHEDIT_OT_keyframes_handletype 
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* id-props */
-       RNA_def_enum(ot->srna, "type", prop_graphkeys_handletype_types, 0, "Type", "");
+       RNA_def_enum(ot->srna, "type", beztriple_handle_type_items, 0, "Type", "");
  }
  
  /* ************************************************************************** */
@@@ -1405,7 -1388,7 +1388,7 @@@ static void snap_graph_keys(bAnimContex
        BeztEditFunc edit_cb;
        
        /* filter data */
 -      filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
 +      filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE| ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
        ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
        
        /* get beztriple editing callbacks */
        
        memset(&bed, 0, sizeof(BeztEditData)); 
        bed.scene= ac->scene;
 -      bed.list= ac->markers; /* for marker-snapping option */
        
        /* snap keyframes */
        for (ale= anim_data.first; ale; ale= ale->next) {
@@@ -1503,11 -1487,10 +1486,11 @@@ static void mirror_graph_keys(bAnimCont
        /* for 'first selected marker' mode, need to find first selected marker first! */
        // XXX should this be made into a helper func in the API?
        if (mode == GRAPHKEYS_MIRROR_MARKER) {
 +              Scene *scene= ac->scene;
                TimeMarker *marker= NULL;
                
                /* find first selected marker */
 -              for (marker= ac->markers.first; marker; marker=marker->next) {
 +              for (marker= scene->markers.first; marker; marker=marker->next) {
                        if (marker->flag & SELECT) {
                                break;
                        }
@@@ -1638,19 -1621,6 +1621,6 @@@ void GRAPHEDIT_OT_keyframes_smooth (wmO
  
  /* ******************** Add F-Curve Modifier Operator *********************** */
  
- /* F-Modifier types - duplicate of existing codes...  */
-       // XXX how can we have this list from the RNA definitions instead?
- EnumPropertyItem prop_fmodifier_types[] = {
-       {FMODIFIER_TYPE_GENERATOR, "GENERATOR", "Generator", ""},
-       {FMODIFIER_TYPE_ENVELOPE, "ENVELOPE", "Envelope", ""},
-       {FMODIFIER_TYPE_CYCLES, "CYCLES", "Cycles", ""},
-       {FMODIFIER_TYPE_NOISE, "NOISE", "Noise", ""},
-       {FMODIFIER_TYPE_FILTER, "FILTER", "Filter", ""},
-       {FMODIFIER_TYPE_PYTHON, "PYTHON", "Python", ""},
-       {FMODIFIER_TYPE_LIMITS, "LIMITS", "Limits", ""},
-       {0, NULL, NULL, NULL}
- };
  static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
  {
        bAnimContext ac;
@@@ -1709,7 -1679,7 +1679,7 @@@ void GRAPHEDIT_OT_fmodifier_add (wmOper
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* id-props */
-       RNA_def_enum(ot->srna, "type", prop_fmodifier_types, 0, "Type", "");
+       RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
  }
  
  /* ************************************************************************** */
index e090a4b9c56cb233bad78375c8d6caa41756154a,3b690a215844122cebe84a6b179e2e7a2d0f9451..107ef9b4b87db069e067f8d503a48f3014d9fc48
@@@ -7,7 -7,6 +7,6 @@@ SET(IN
    ../../../intern/string
    ../../../intern/guardedalloc
    ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer 
-   ../../../intern/bmfont
    ../../../source/gameengine/Converter
    ../../../source/blender/imbuf
    ../../../intern/ghost/include
@@@ -15,6 -14,7 +14,6 @@@
    ../../../source/gameengine/Ketsji 
    ../../../source/blender/blenlib
    ../../../source/blender/blenkernel 
 -  ../../../source/blender/blenfont
    ../../../source/blender/editors/include
    ../../../source/blender/windowmanager
    ../../../source/blender 
index 020402e9bcde21b91bc1933fe69907517cdbe634,a0cc3af361137ccfc7986cdf9239b55e0058062d..684b80dceeecd1996c20e2483510d0d6981d2119
@@@ -5,11 -5,12 +5,11 @@@ sources = env.Glob('*.cpp'
  defs = []
  
  incs = '. #source/kernel/gen_system #intern/string #intern/guardedalloc'
- incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #intern/bmfont'
+ incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer'
  incs += ' #source/gameengine/Converter #source/blender/imbuf'
  incs += ' #intern/ghost/include'
  incs += ' #intern/moto/include #source/gameengine/Ketsji #source/blender/blenlib'
 -incs += ' #source/blender/blenkernel #source/blender'
 -incs += ' #source/blender/blenfont #source/blender/editors/include'
 +incs += ' #source/blender/blenkernel #source/blender #source/blender/editors/include'
  incs += ' #source/blender/makesdna #source/gameengine/Rasterizer #source/gameengine/GameLogic'
  incs += ' #source/gameengine/Expressions #source/gameengine/Network'
  incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common'