NLA SoC: Merge from 2.5
authorJoshua Leung <aligorith@gmail.com>
Wed, 10 Jun 2009 03:36:28 +0000 (03:36 +0000)
committerJoshua Leung <aligorith@gmail.com>
Wed, 10 Jun 2009 03:36:28 +0000 (03:36 +0000)
20669 to 20771

(sheesh, that took an hour, not including having to restart the whole process after TortoiseSVN bailed out midway through the first try)

1  2 
source/blender/blenkernel/intern/object.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/interface/view2d.c
source/blender/editors/screen/screen_ops.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/makesrna.c

index 7a83162f7a747f0db238dc2d1d7d7c0fef8a5b49,81bd78f18511e752005e2a39353a6b3aa64b7ce2..c2916bc2231c70e698a005d35d2ff66c2e11543f
@@@ -977,6 -977,8 +977,8 @@@ Object *add_only_object(int type, char 
        ob->anisotropicFriction[2] = 1.0f;
        ob->gameflag= OB_PROP|OB_COLLISION;
        ob->margin = 0.0;
+       /* ob->pad3 == Contact Processing Threshold */
+       ob->m_contactProcessingThreshold = 1.;
        
        /* NT fluid sim defaults */
        ob->fluidsimFlag = 0;
@@@ -1131,6 -1133,9 +1133,9 @@@ static void copy_object_pose(Object *ob
                         * is changed to object->proxy_from when evaluating the driver. */
                        if(con->ipo && !con->ipo->id.lib) {
                                IpoCurve *icu;
+                               
+                               con->ipo= copy_ipo(con->ipo);
+                               
                                for(icu= con->ipo->curve.first; icu; icu= icu->next) {
                                        if(icu->driver && icu->driver->ob==ob)
                                                icu->driver->ob= obn;
@@@ -1193,12 -1198,18 +1198,12 @@@ Object *copy_object(Object *ob
                        armature_rebuild_pose(obn, obn->data);
        }
        copy_defgroups(&obn->defbase, &ob->defbase);
 -#if 0 // XXX old animation system
 -      copy_nlastrips(&obn->nlastrips, &ob->nlastrips);
 -#endif // XXX old animation system
        copy_constraints(&obn->constraints, &ob->constraints);
  
        /* increase user numbers */
        id_us_plus((ID *)obn->data);
 -#if 0 // XXX old animation system
 -      id_us_plus((ID *)obn->ipo);
 -      id_us_plus((ID *)obn->action);
 -#endif // XXX old animation system
        id_us_plus((ID *)obn->dup_group);
 +      // FIXME: add this for animdata too...
  
        for(a=0; a<obn->totcol; a++) id_us_plus((ID *)obn->mat[a]);
        
index c306f5bcde495f7db9d18047c402bffcc7f7759f,ce3a35c7194a4d0461408d7381ff770ed6c4197d..fe19496bd38eb510704b425c1e21de4f0eb8f1b1
  
  #include "readfile.h"
  
+ #include "PIL_time.h"
  #include <errno.h>
  
  /*
@@@ -611,10 -613,16 +613,16 @@@ static BHeadN *get_bhead(FileData *fd
        BHead  bhead;
        BHeadN *new_bhead = 0;
        int readsize;
+       
        if (fd) {
                if ( ! fd->eof) {
  
+                       /* not strictly needed but shuts valgrind up
+                        * since uninitialized memory gets compared */
+                       memset(&bhead8, 0, sizeof(BHead8));
+                       memset(&bhead4, 0, sizeof(BHead4));
+                       memset(&bhead,  0, sizeof(BHead));
+                       
                        // First read the bhead structure.
                        // Depending on the platform the file was written on this can
                        // be a big or little endian BHead4 or BHead8 structure.
@@@ -1489,6 -1497,8 +1497,8 @@@ static void lib_link_brush(FileData *fd
                if(brush->id.flag & LIB_NEEDLINK) {
                        brush->id.flag -= LIB_NEEDLINK;
  
+                       brush->clone.image= newlibadr_us(fd, brush->id.lib, brush->clone.image);
+                       
                        for(a=0; a<MAX_MTEX; a++) {
                                mtex= brush->mtex[a];
                                if(mtex)
@@@ -1657,26 -1667,10 +1667,26 @@@ static void lib_link_constraint_channel
  
  /* Data Linking ----------------------------- */
  
 +static void lib_link_fmodifiers(FileData *fd, ID *id, ListBase *list)
 +{
 +      FModifier *fcm;
 +      
 +      for (fcm= list->first; fcm; fcm= fcm->next) {
 +              /* data for specific modifiers */
 +              switch (fcm->type) {
 +                      case FMODIFIER_TYPE_PYTHON:
 +                      {
 +                              FMod_Python *data= (FMod_Python *)fcm->data;
 +                              data->script = newlibadr(fd, id->lib, data->script);
 +                      }
 +                              break;
 +              }
 +      }
 +}
 +
  static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list) 
  {
        FCurve *fcu;
 -      FModifier *fcm;
        
        /* relink ID-block references... */
        for (fcu= list->first; fcu; fcu= fcu->next) {
                }
                
                /* modifiers */
 -              for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) {
 -                      /* data for specific modifiers */
 -                      switch (fcm->type) {
 -                              case FMODIFIER_TYPE_PYTHON:
 -                              {
 -                                      FMod_Python *data= (FMod_Python *)fcm->data;
 -                                      data->script = newlibadr(fd, id->lib, data->script);
 -                              }
 -                                      break;
 +              lib_link_fmodifiers(fd, id, &fcu->modifiers);
 +      }
 +}
 +
 +
 +/* NOTE: this assumes that link_list has already been called on the list */
 +static void direct_link_fmodifiers(FileData *fd, ListBase *list)
 +{
 +      FModifier *fcm;
 +      
 +      for (fcm= list->first; fcm; fcm= fcm->next) {
 +              /* relink general data */
 +              fcm->data = newdataadr(fd, fcm->data);
 +              fcm->edata= NULL;
 +              
 +              /* do relinking of data for specific types */
 +              switch (fcm->type) {
 +                      case FMODIFIER_TYPE_GENERATOR:
 +                      {
 +                              FMod_Generator *data= (FMod_Generator *)fcm->data;
 +                              
 +                              data->coefficients= newdataadr(fd, data->coefficients);
 +                      }
 +                              break;
 +                      case FMODIFIER_TYPE_ENVELOPE:
 +                      {
 +                              FMod_Envelope *data= (FMod_Envelope *)fcm->data;
 +                              
 +                              data->data= newdataadr(fd, data->data);
                        }
 +                              break;
 +                      case FMODIFIER_TYPE_PYTHON:
 +                      {
 +                              FMod_Python *data= (FMod_Python *)fcm->data;
 +                              
 +                              data->prop = newdataadr(fd, data->prop);
 +                              IDP_DirectLinkProperty(data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
 +                      }
 +                              break;
                }
        }
  }
  static void direct_link_fcurves(FileData *fd, ListBase *list)
  {
        FCurve *fcu;
 -      FModifier *fcm;
        
        /* link F-Curve data to F-Curve again (non ID-libs) */
        for (fcu= list->first; fcu; fcu= fcu->next) {
                
                /* modifiers */
                link_list(fd, &fcu->modifiers);
 -              for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) {
 -                      /* relink general data */
 -                      fcm->data = newdataadr(fd, fcm->data);
 -                      fcm->edata= NULL;
 -                      
 -                      /* do relinking of data for specific types */
 -                      switch (fcm->type) {
 -                              case FMODIFIER_TYPE_GENERATOR:
 -                              {
 -                                      FMod_Generator *data= (FMod_Generator *)fcm->data;
 -                                      
 -                                      data->coefficients= newdataadr(fd, data->coefficients);
 -                              }
 -                                      break;
 -                              case FMODIFIER_TYPE_ENVELOPE:
 -                              {
 -                                      FMod_Envelope *data= (FMod_Envelope *)fcm->data;
 -                                      
 -                                      data->data= newdataadr(fd, data->data);
 -                              }
 -                                      break;
 -                              case FMODIFIER_TYPE_PYTHON:
 -                              {
 -                                      FMod_Python *data= (FMod_Python *)fcm->data;
 -                                      
 -                                      data->prop = newdataadr(fd, data->prop);
 -                                      IDP_DirectLinkProperty(data->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
 -                              }
 -                                      break;
 -                      }
 -              }
 +              direct_link_fmodifiers(fd, &fcu->modifiers);
        }
  }
  
@@@ -1816,44 -1812,6 +1826,44 @@@ static void direct_link_action(FileDat
        }
  }
  
 +
 +static void lib_link_nladata (FileData *fd, ID *id, ListBase *list)
 +{
 +      NlaTrack *nlt;
 +      NlaStrip *strip;
 +      
 +      /* we only acare about the NLA strips inside the tracks */
 +      for (nlt= list->first; nlt; nlt= nlt->next) {
 +              for (strip= nlt->strips.first; strip; strip= strip->next) {
 +                      /* reassign the counted-reference to action */
 +                      strip->act = newlibadr_us(fd, id->lib, strip->act);
 +              }
 +      }
 +}
 +
 +/* NOTE: this assumes that link_list has already been called on the list */
 +static void direct_link_nladata(FileData *fd, ListBase *list)
 +{
 +      NlaTrack *nlt;
 +      NlaStrip *strip;
 +      
 +      for (nlt= list->first; nlt; nlt= nlt->next) {
 +              /* relink list of strips */
 +              link_list(fd, &nlt->strips);
 +              
 +              /* relink strip data */
 +              for (strip= nlt->strips.first; strip; strip= strip->next) {
 +                      /* strip's F-Curves */
 +                      link_list(fd, &strip->fcurves);
 +                      direct_link_fcurves(fd, &strip->fcurves);
 +                      
 +                      /* strip's F-Modifiers */
 +                      link_list(fd, &strip->modifiers);
 +                      direct_link_fcurves(fd, &strip->modifiers);
 +              }
 +      }
 +}
 +
  /* ------- */
  
  static void lib_link_keyingsets(FileData *fd, ID *id, ListBase *list)
@@@ -1896,7 -1854,6 +1906,7 @@@ static void lib_link_animdata(FileData 
        
        /* link action data */
        adt->action= newlibadr_us(fd, id->lib, adt->action);
 +      adt->tmpact= newlibadr_us(fd, id->lib, adt->tmpact);
        
        /* link drivers */
        lib_link_fcurves(fd, id, &adt->drivers);
        /* overrides don't have lib-link for now, so no need to do anything */
        
        /* link NLA-data */
 -      // TODO... 
 +      lib_link_nladata(fd, id, &adt->nla_tracks);
  }
  
  static void direct_link_animdata(FileData *fd, AnimData *adt)
        // TODO...
        
        /* link NLA-data */
 -      // TODO...
 +      link_list(fd, &adt->nla_tracks);
 +      direct_link_nladata(fd, &adt->nla_tracks);
  }     
  
  /* ************ READ NODE TREE *************** */
@@@ -3200,6 -3156,18 +3210,18 @@@ static void direct_link_mesh(FileData *
                        lvl->colfaces= newdataadr(fd, lvl->colfaces);
                }
        }
+       /* Gracefully handle corrupted mesh */
+       if(mesh->mr && !mesh->mr->verts) {
+               /* If totals match, simply load the current mesh verts into multires */
+               if(mesh->totvert == ((MultiresLevel*)mesh->mr->levels.last)->totvert)
+                       mesh->mr->verts = MEM_dupallocN(mesh->mvert);
+               else {
+                       /* Otherwise, we can't recover the data, silently remove multires */
+                       multires_free(mesh->mr);
+                       mesh->mr = NULL;
+               }
+       }
        
        if((fd->flags & FD_FLAGS_SWITCH_ENDIAN) && mesh->tface) {
                TFace *tf= mesh->tface;
@@@ -3391,6 -3359,10 +3413,10 @@@ static void lib_link_object(FileData *f
                                        bAddObjectActuator *eoa= act->data;
                                        if(eoa) eoa->ob= newlibadr(fd, ob->id.lib, eoa->ob);
                                }
+                               else if(act->type==ACT_OBJECT) {
+                                       bObjectActuator *oa= act->data;
+                                       oa->reference= newlibadr(fd, ob->id.lib, oa->reference);
+                               }
                                else if(act->type==ACT_EDIT_OBJECT) {
                                        bEditObjectActuator *eoa= act->data;
                                        if(eoa==NULL) {
                                                eoa->me= newlibadr(fd, ob->id.lib, eoa->me);
                                        }
                                }
+                               else if(act->type==ACT_OBJECT) {
+                                       bObjectActuator *oa= act->data;
+                                       if(oa==NULL) {
+                                               init_actuator(act);
+                                       }
+                                       else {
+                                               oa->reference= newlibadr(fd, ob->id.lib, oa->reference);
+                                       }
+                               }
                                else if(act->type==ACT_SCENE) {
                                        bSceneActuator *sa= act->data;
                                        sa->camera= newlibadr(fd, ob->id.lib, sa->camera);
@@@ -3505,6 -3486,11 +3540,11 @@@ static void direct_link_modifiers(FileD
  
                        smd->emCache = smd->mCache = 0;
                }
+               else if (md->type==eModifierType_Armature) {
+                       ArmatureModifierData *amd = (ArmatureModifierData*) md;
+                       
+                       amd->prevCos= NULL;
+               }
                else if (md->type==eModifierType_Cloth) {
                        ClothModifierData *clmd = (ClothModifierData*) md;
                        
@@@ -4011,6 -3997,7 +4051,7 @@@ static void direct_link_scene(FileData 
                                if (seq->flag & SEQ_USE_PROXY) {
                                        seq->strip->proxy = newdataadr(
                                                fd, seq->strip->proxy);
+                                       seq->strip->proxy->anim = 0;
                                } else {
                                        seq->strip->proxy = 0;
                                }
@@@ -4442,6 -4429,22 +4483,22 @@@ void lib_link_screen_restore(Main *newm
                                        /* not very nice, but could help */
                                        if((v3d->layact & v3d->lay)==0) v3d->layact= v3d->lay;
                                        
+                               }
+                               else if(sl->spacetype==SPACE_IPO) {
+                                       /* XXX animato */
+ #if 0
+                                       SpaceIpo *sipo= (SpaceIpo *)sl;
+                                       sipo->ipo= restore_pointer_by_name(newmain, (ID *)sipo->ipo, 0);
+                                       if(sipo->blocktype==ID_SEQ) 
+                                               sipo->from= (ID *)find_sequence_from_ipo_helper(newmain, sipo->ipo);
+                                       else 
+                                               sipo->from= restore_pointer_by_name(newmain, (ID *)sipo->from, 0);
+                                       
+                                       // not free sipo->ipokey, creates dependency with src/
+                                       if(sipo->editipo) MEM_freeN(sipo->editipo);
+                                       sipo->editipo= NULL;
+ #endif
                                }
                                else if(sl->spacetype==SPACE_BUTS) {
                                        SpaceButs *sbuts= (SpaceButs *)sl;
@@@ -4691,11 -4694,6 +4748,11 @@@ static void direct_link_screen(FileDat
                                sipo->ads= newdataadr(fd, sipo->ads);
                                sipo->ghostCurves.first= sipo->ghostCurves.last= NULL;
                        }
 +                      else if (sl->spacetype==SPACE_NLA) {
 +                              SpaceNla *snla= (SpaceNla*)sl;
 +                              
 +                              snla->ads= newdataadr(fd, snla->ads);
 +                      }
                        else if (sl->spacetype==SPACE_OUTLINER) {
                                SpaceOops *soops= (SpaceOops*) sl;
                                
@@@ -5587,6 -5585,16 +5644,16 @@@ static void area_add_window_regions(Scr
                                ar->regiontype= RGN_TYPE_UI;
                                ar->alignment= RGN_ALIGN_TOP;
                                break;
+ #if 0
+                       case SPACE_BUTS:
+                               /* context UI region */
+                               ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
+                               BLI_addtail(lb, ar);
+                               ar->regiontype= RGN_TYPE_CHANNELS;
+                               ar->alignment= RGN_ALIGN_TOP;
+                               break;
+ #endif
                }
        }
  
                                ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
                                ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
                                ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
 -                              ar->v2d.align= V2D_ALIGN_NO_POS_Y;
 +                              ar->v2d.align= V2D_ALIGN_NO_NEG_Y;
                                ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
                                break;
                        }
@@@ -8901,7 -8909,7 +8968,7 @@@ static void do_versions(FileData *fd, L
                /* Adjustments needed after Bullets update */
                for(ob = main->object.first; ob; ob= ob->id.next) {
                        ob->damping *= 0.635f;
-                       ob->rdamping = 0.1 + (0.59f * ob->rdamping);
+                       ob->rdamping = 0.1 + (0.8f * ob->rdamping);
                }
        }
        
                for (sce= main->scene.first; sce; sce= sce->id.next) {
                        sce->r.domeangle = 180;
                        sce->r.domemode = 1;
-                       sce->r.domesize = 1.0f;
                        sce->r.domeres = 4;
                        sce->r.domeresbuf = 1.0f;
+                       sce->r.dometilt = 0;
                }
                /* DBVT culling by default */
                for(wrld=main->world.first; wrld; wrld= wrld->id.next) {
                }
        }
  
+       if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 5)) {
+               Object *ob;
+               World *wrld;
+               for(ob = main->object.first; ob; ob= ob->id.next) {
+                       ob->m_contactProcessingThreshold = 1.; //pad3 is used for m_contactProcessingThreshold
+                       if(ob->parent) {
+                               /* check if top parent has compound shape set and if yes, set this object
+                                  to compound shaper as well (was the behaviour before, now it's optional) */
+                               Object *parent= newlibadr(fd, lib, ob->parent);
+                               while (parent && parent->parent != NULL) {
+                                       parent = newlibadr(fd, lib, parent->parent);
+                               }
+                               if(parent) {
+                                       if (parent->gameflag & OB_CHILD)
+                                               ob->gameflag |= OB_CHILD;
+                               }
+                       }
+               }
+               for(wrld=main->world.first; wrld; wrld= wrld->id.next) {
+                       wrld->ticrate = 60;
+                       wrld->maxlogicstep = 5;
+                       wrld->physubstep = 1;
+                       wrld->maxphystep = 5;
+               }
+       }
+       if (main->versionfile < 249) {
+               Scene *sce;
+               for (sce= main->scene.first; sce; sce= sce->id.next)
+                       sce->r.renderer= 0;
+               
+       }
+       
+       // correct introduce of seed for wind force
+       if (main->versionfile < 249 && main->subversionfile < 1) {
+               Object *ob;
+               for(ob = main->object.first; ob; ob= ob->id.next) {
+                       if(ob->pd)
+                               ob->pd->seed = ((unsigned int)(ceil(PIL_check_seconds_timer()))+1) % 128;
+               }
+       
+       }
        if (main->versionfile < 250) {
                bScreen *screen;
                Scene *scene;
                                         
                                        multires_load_old(dm, me->mr);
  
-                                       *MultiresDM_get_flags(dm) |= MULTIRES_DM_UPDATE_ALWAYS;
+                                       MultiresDM_mark_as_modified(dm);
                                        dm->release(dm);
                                        orig->release(orig);
  
                        }
                }
        }
+       
  
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */
        /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */
@@@ -9402,12 -9454,9 +9513,12 @@@ static void expand_keyingsets(FileData 
  static void expand_animdata(FileData *fd, Main *mainvar, AnimData *adt)
  {
        FCurve *fcd;
 +      NlaTrack *nlt;
 +      NlaStrip *strip;
        
        /* own action */
        expand_doit(fd, mainvar, adt->action);
 +      expand_doit(fd, mainvar, adt->tmpact);
        
        /* drivers - assume that these F-Curves have driver data to be in this list... */
        for (fcd= adt->drivers.first; fcd; fcd= fcd->next) {
                for (dtar= driver->targets.first; dtar; dtar= dtar->next)
                        expand_doit(fd, mainvar, dtar->id);
        }
 +      
 +      /* nla-data - referenced actions */
 +      for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
 +              for (strip= nlt->strips.first; strip; strip= strip->next) 
 +                      expand_doit(fd, mainvar, strip->act);
 +      }
  }     
  
  static void expand_particlesettings(FileData *fd, Main *mainvar, ParticleSettings *part)
@@@ -9906,6 -9949,10 +10017,10 @@@ static void expand_object(FileData *fd
                                expand_doit(fd, mainvar, eoa->me);
                        }
                }
+               else if(act->type==ACT_OBJECT) {
+                       bObjectActuator *oa= act->data;
+                       expand_doit(fd, mainvar, oa->reference);
+               }
                else if(act->type==ACT_SCENE) {
                        bSceneActuator *sa= act->data;
                        expand_doit(fd, mainvar, sa->camera);
index 19c95ce7ce002ecbd273fac53ff2f474ddaa5369,4621be6eda095da703f3ba12943ca3ec1b9508bc..aa1cc5790efbb2188d622c31b25167c0c7580c82
@@@ -207,23 -207,6 +207,23 @@@ void UI_view2d_region_reinit(View2D *v2
                        }
                                break;
                                
 +                      /* 'stack view' - practically the same as list/channel view, except is located in the pos y half instead. 
 +                       *      zoom, aspect ratio, and alignment restrictions are set here */
 +                      case V2D_COMMONVIEW_STACK:
 +                      {
 +                              /* zoom + aspect ratio are locked */
 +                              v2d->keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT);
 +                              v2d->minzoom= v2d->maxzoom= 1.0f;
 +                              
 +                              /* tot rect has strictly regulated placement, and must only occur in +/+ quadrant */
 +                              v2d->align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y);
 +                              v2d->keeptot = V2D_KEEPTOT_STRICT;
 +                              tot_changed= 1;
 +                              
 +                              /* scroller settings are currently not set here... that is left for regions... */
 +                      }
 +                              break;
 +                              
                        /* 'header' regions - zoom, aspect ratio, alignment, and panning restrictions are set here */
                        case V2D_COMMONVIEW_HEADER:
                        {
                                
                                v2d->tot.xmin= 0.0f;
                                v2d->tot.xmax= winx;
 -
 +                              
                                v2d->tot.ymax= 0.0f;
                                v2d->tot.ymin= -winy;
 -
 +                              
                                v2d->cur= v2d->tot;
                        }
                                break;
 -
 +                              
                                /* other view types are completely defined using their own settings already */
                        default:
                                /* we don't do anything here, as settings should be fine, but just make sure that rect */
@@@ -1306,12 -1289,16 +1306,16 @@@ static void scroll_printstr(View2DScrol
        
        /* get string to print */
        if (unit == V2D_UNIT_SECONDS) {
-               /* SMPTE timecode style:
+               /* Timecode:
                 *      - In general, minutes and seconds should be shown, as most clips will be
                 *        within this length. Hours will only be included if relevant.
                 *      - Only show frames when zoomed in enough for them to be relevant 
-                *        (using separator convention of ';' for frames, ala QuickTime).
+                *        (using separator of '!' for frames).
                 *        When showing frames, use slightly different display to avoid confusion with mm:ss format
+                * TODO: factor into reusable function.
+                * Meanwhile keep in sync:
+                *        source/blender/editors/animation/anim_draw.c
+                *        source/blender/editors/interface/view2d.c
                 */
                int hours=0, minutes=0, seconds=0, frames=0;
                char neg[2]= "";
                /* print timecode to temp string buffer */
                if (power <= 0) {
                        /* include "frames" in display */
-                       if (hours) sprintf(str, "%s%02d:%02d:%02d;%02d", neg, hours, minutes, seconds, frames);
-                       else if (minutes) sprintf(str, "%s%02d:%02d;%02d", neg, minutes, seconds, frames);
-                       else sprintf(str, "%s%d;%02d", neg, seconds, frames);
+                       if (hours) sprintf(str, "%s%02d:%02d:%02d!%02d", neg, hours, minutes, seconds, frames);
+                       else if (minutes) sprintf(str, "%s%02d:%02d!%02d", neg, minutes, seconds, frames);
+                       else sprintf(str, "%s%d!%02d", neg, seconds, frames);
                }
                else {
                        /* don't include 'frames' in display */
index 3e237bff46a6ec5247813c1ae0441c968c22ed97,3f4d175c94e8f86a5150b44e07d627ae60781548..8e72ebae3c05aeb8695f8b721b1dc95d8b45a462
@@@ -164,7 -164,6 +164,7 @@@ int ED_operator_node_active(bContext *C
        return 0;
  }
  
 +// XXX rename
  int ED_operator_ipo_active(bContext *C)
  {
        return ed_spacetype_test(C, SPACE_IPO);
@@@ -180,11 -179,6 +180,11 @@@ int ED_operator_image_active(bContext *
        return ed_spacetype_test(C, SPACE_IMAGE);
  }
  
 +int ED_operator_nla_active(bContext *C)
 +{
 +      return ed_spacetype_test(C, SPACE_NLA);
 +}
 +
  int ED_operator_object_active(bContext *C)
  {
        return NULL != CTX_data_active_object(C);
@@@ -2547,7 -2541,7 +2547,7 @@@ static int screen_render_invoke(bContex
        //      BKE_report in render!
        //      RE_error_cb(re, error_cb);
  
-       WM_jobs_start(steve);
+       WM_jobs_start(CTX_wm_manager(C), steve);
        
        G.afbreek= 0;
        
index 8acefdad9a24e8a25da25236e2a423be503a9670,7391201776e0528ef94801de2c125183ac7652d0..2219535bfd30380f872bcf4c4b3e643e2eadbbed
@@@ -320,9 -320,9 +320,9 @@@ typedef struct RenderData 
  
        /* Dome variables */
        short domeres, domemode;
-       short domeangle, pad9;
-       float domesize;
+       short domeangle, dometilt;
        float domeresbuf;
+       float pad2;
        struct Text *dometext;
  
  } RenderData;
@@@ -679,6 -679,7 +679,7 @@@ typedef struct Scene 
  #define R_STAMP_INFO          0x4000
  #define R_FULL_SAMPLE         0x8000
  #define R_COMP_RERENDER               0x10000
+ #define R_RECURS_PROTECTION     0x20000
  
  /* r->stamp */
  #define R_STAMP_TIME  0x0001
  #define MAXFRAMEF     300000.0f
  
  #define MINFRAME      1
- #define MINFRAMEF     1.0
+ #define MINFRAMEF     1.0f
  
  /* depricate this! */
  #define TESTBASE(v3d, base)   ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
  /* sce->flag */
  #define SCE_DS_SELECTED                       (1<<0)
  #define SCE_DS_COLLAPSED              (1<<1)
 +#define SCE_NLA_EDIT_ON                       (1<<2)
  
  
        /* return flag next_object function */
+ #define F_ERROR                       -1
  #define F_START                       0
  #define F_SCENE                       1
  #define F_SET                 2
index 0a342634753db4bb46989d87163129e6bb3cb9c5,3864bcd0a21f3d7219bf8456d22261dfcf955abc..c7abd8f7f83e346c40c1a64fc4bdf4383754e086
@@@ -121,7 -121,7 +121,7 @@@ typedef struct SpaceButs 
        struct RenderInfo *ri;
  
        short cursens, curact;
-       short align, pad;               /* align for panels */
+       short align, preview;           /* align for panels, preview is signal to refresh */
        View2D v2d; /* depricated, copied to region */
        
        short mainb, menunr;    /* texnr and menunr have to remain shorts */
        short oldkeypress;              /* for keeping track of the sub tab key cycling */
        char flag, texact;
        
-       void *path;             /* runtime */
+       void *path;                             /* runtime */
+       int pathflag, dataicon; /* runtime */
        ID *pinid;
  } SpaceButs;
  
@@@ -154,7 -155,8 +155,8 @@@ typedef struct SpaceSeq 
        View2D v2d; /* depricated, copied to region */
        
        float xof, yof; /* offset for drawing the image preview */
-       short mainb, pad;
+       short mainb;
+       short render_size;
        short chanshown;
        short zebra;
        int flag;
@@@ -244,11 -246,10 +246,11 @@@ typedef struct SpaceNla 
  
        short blockhandler[8];
  
 -      short menunr, lock;
        short autosnap;                 /* this uses the same settings as autosnap for Action Editor */
        short flag;
 +      int pad;
        
 +      struct bDopeSheet *ads;
        View2D v2d;      /* depricated, copied to region */
  } SpaceNla;
  
@@@ -344,7 -345,8 +346,8 @@@ typedef struct SpaceNode 
        float mx, my;   /* mousepos for drawing socketless link */
        
        struct bNodeTree *nodetree, *edittree;
-       int treetype, pad;                      /* treetype: as same nodetree->type */
+       int treetype;                   /* treetype: as same nodetree->type */
+       short texfrom, pad;             /* texfrom object, world or brush */
        
        struct bGPdata *gpd;            /* grease-pencil data */
  } SpaceNode;
  #define SNODE_BACKDRAW                2
  #define SNODE_DISPGP          4
  
+ /* snode->texfrom */
+ #define SNODE_TEX_OBJECT      0
+ #define SNODE_TEX_WORLD               1
+ #define SNODE_TEX_BRUSH               2
  typedef struct SpaceImaSel {
        SpaceLink *next, *prev;
        ListBase regionbase;            /* storage of regions for inactive spaces */
  #define TAB_SCENE_SEQUENCER   4
  
  
- /* warning: the values of these defines are used in sbuts->tabs[8] */
  /* buts->mainb new */
  #define BCONTEXT_SCENE                0
  #define BCONTEXT_WORLD                1
  #define BCONTEXT_GAME         8
  #define BCONTEXT_BONE         9
  #define BCONTEXT_MODIFIER     10
+ #define BCONTEXT_CONSTRAINT 12
+ #define BCONTEXT_TOT          13
  
  /* sbuts->flag */
  #define SB_PRV_OSA                    1
+ #define SB_PIN_CONTEXT                2
+ #define SB_WORLD_TEX          4
  
  /* sbuts->align */
  #define BUT_FREE              0
index ad9869f853e1708aeabfdaa442052789ded0e492,d827d10ec27c1342de51665a05248d8d96d88e13..1a8bf88d1cc04e5efc4d97f3650f3da48ea836d7
@@@ -43,6 -43,7 +43,7 @@@ struct Main
  extern BlenderRNA BLENDER_RNA;
  
  extern StructRNA RNA_Action;
+ extern StructRNA RNA_ActionConstraint;
  extern StructRNA RNA_ActionGroup;
  extern StructRNA RNA_Actuator;
  extern StructRNA RNA_ActuatorSensor;
@@@ -58,8 -59,8 +59,8 @@@ extern StructRNA RNA_ArrayModifier
  extern StructRNA RNA_BackgroundImage;
  extern StructRNA RNA_BevelModifier;
  extern StructRNA RNA_BezierCurvePoint;
- extern StructRNA RNA_BlenderRNA;
  extern StructRNA RNA_BlendTexture;
+ extern StructRNA RNA_BlenderRNA;
  extern StructRNA RNA_Bone;
  extern StructRNA RNA_BooleanModifier;
  extern StructRNA RNA_BooleanProperty;
@@@ -67,6 -68,9 +68,9 @@@ extern StructRNA RNA_Brush
  extern StructRNA RNA_BuildModifier;
  extern StructRNA RNA_Camera;
  extern StructRNA RNA_CastModifier;
+ extern StructRNA RNA_ChildOfConstraint;
+ extern StructRNA RNA_ChildParticle;
+ extern StructRNA RNA_ClampToConstraint;
  extern StructRNA RNA_ClothCollisionSettings;
  extern StructRNA RNA_ClothModifier;
  extern StructRNA RNA_ClothSettings;
@@@ -78,10 -82,73 +82,73 @@@ extern StructRNA RNA_CollisionSettings
  extern StructRNA RNA_ColorRamp;
  extern StructRNA RNA_ColorRampElement;
  extern StructRNA RNA_ColorSequence;
+ extern StructRNA RNA_CompositorNode;
+ extern StructRNA RNA_CompositorNodeAlphaOver;
+ extern StructRNA RNA_CompositorNodeBilateralblur;
+ extern StructRNA RNA_CompositorNodeBlur;
+ extern StructRNA RNA_CompositorNodeBrightContrast;
+ extern StructRNA RNA_CompositorNodeChannelMatte;
+ extern StructRNA RNA_CompositorNodeChroma;
+ extern StructRNA RNA_CompositorNodeColorSpill;
+ extern StructRNA RNA_CompositorNodeCombHSVA;
+ extern StructRNA RNA_CompositorNodeCombRGBA;
+ extern StructRNA RNA_CompositorNodeCombYCCA;
+ extern StructRNA RNA_CompositorNodeCombYUVA;
+ extern StructRNA RNA_CompositorNodeComposite;
+ extern StructRNA RNA_CompositorNodeCrop;
+ extern StructRNA RNA_CompositorNodeCurveRGB;
+ extern StructRNA RNA_CompositorNodeCurveVec;
+ extern StructRNA RNA_CompositorNodeDBlur;
+ extern StructRNA RNA_CompositorNodeDefocus;
+ extern StructRNA RNA_CompositorNodeDiffMatte;
+ extern StructRNA RNA_CompositorNodeDilateErode;
+ extern StructRNA RNA_CompositorNodeDisplace;
+ extern StructRNA RNA_CompositorNodeFilter;
+ extern StructRNA RNA_CompositorNodeFlip;
+ extern StructRNA RNA_CompositorNodeGamma;
+ extern StructRNA RNA_CompositorNodeGlare;
+ extern StructRNA RNA_CompositorNodeHueSat;
+ extern StructRNA RNA_CompositorNodeIDMask;
+ extern StructRNA RNA_CompositorNodeImage;
+ extern StructRNA RNA_CompositorNodeInvert;
+ extern StructRNA RNA_CompositorNodeLensdist;
+ extern StructRNA RNA_CompositorNodeLumaMatte;
+ extern StructRNA RNA_CompositorNodeMapUV;
+ extern StructRNA RNA_CompositorNodeMapValue;
+ extern StructRNA RNA_CompositorNodeMath;
+ extern StructRNA RNA_CompositorNodeMixRGB;
+ extern StructRNA RNA_CompositorNodeNormal;
+ extern StructRNA RNA_CompositorNodeNormalize;
+ extern StructRNA RNA_CompositorNodeOutputFile;
+ extern StructRNA RNA_CompositorNodePremulKey;
+ extern StructRNA RNA_CompositorNodeRGB;
+ extern StructRNA RNA_CompositorNodeRGBToBW;
+ extern StructRNA RNA_CompositorNodeRLayers;
+ extern StructRNA RNA_CompositorNodeRotate;
+ extern StructRNA RNA_CompositorNodeScale;
+ extern StructRNA RNA_CompositorNodeSepHSVA;
+ extern StructRNA RNA_CompositorNodeSepRGBA;
+ extern StructRNA RNA_CompositorNodeSepYCCA;
+ extern StructRNA RNA_CompositorNodeSepYUVA;
+ extern StructRNA RNA_CompositorNodeSetAlpha;
+ extern StructRNA RNA_CompositorNodeSplitViewer;
+ extern StructRNA RNA_CompositorNodeTexture;
+ extern StructRNA RNA_CompositorNodeTime;
+ extern StructRNA RNA_CompositorNodeTonemap;
+ extern StructRNA RNA_CompositorNodeTranslate;
+ extern StructRNA RNA_CompositorNodeValToRGB;
+ extern StructRNA RNA_CompositorNodeValue;
+ extern StructRNA RNA_CompositorNodeVecBlur;
+ extern StructRNA RNA_CompositorNodeViewer;
+ extern StructRNA RNA_CompositorNodeZcombine;
  extern StructRNA RNA_Constraint;
+ extern StructRNA RNA_ConstraintTarget;
  extern StructRNA RNA_Context;
  extern StructRNA RNA_ControlFluidSettings;
  extern StructRNA RNA_Controller;
+ extern StructRNA RNA_CopyLocationConstraint;
+ extern StructRNA RNA_CopyRotationConstraint;
+ extern StructRNA RNA_CopyScaleConstraint;
  extern StructRNA RNA_Curve;
  extern StructRNA RNA_CurveMap;
  extern StructRNA RNA_CurveMapPoint;
@@@ -89,9 -156,6 +156,6 @@@ extern StructRNA RNA_CurveMapping
  extern StructRNA RNA_CurveModifier;
  extern StructRNA RNA_CurvePoint;
  extern StructRNA RNA_DecimateModifier;
- extern StructRNA RNA_DefCollision;
- extern StructRNA RNA_DefField;
- extern StructRNA RNA_DefPointcache;
  extern StructRNA RNA_DelaySensor;
  extern StructRNA RNA_DisplaceModifier;
  extern StructRNA RNA_DistortedNoiseTexture;
@@@ -108,11 -172,21 +172,21 @@@ extern StructRNA RNA_ExplodeModifier
  extern StructRNA RNA_ExpressionController;
  extern StructRNA RNA_FCurve;
  extern StructRNA RNA_FModifier;
+ extern StructRNA RNA_FModifierCycles;
+ extern StructRNA RNA_FModifierEnvelope;
+ extern StructRNA RNA_FModifierGenerator;
+ extern StructRNA RNA_FModifierGenerator_Function;
+ extern StructRNA RNA_FModifierGenerator_PolyExpanded;
+ extern StructRNA RNA_FModifierLimits;
+ extern StructRNA RNA_FModifierNoise;
+ extern StructRNA RNA_FModifierPython;
  extern StructRNA RNA_FieldSettings;
  extern StructRNA RNA_FloatProperty;
+ extern StructRNA RNA_FloorConstraint;
  extern StructRNA RNA_FluidFluidSettings;
  extern StructRNA RNA_FluidSettings;
  extern StructRNA RNA_FluidSimulationModifier;
+ extern StructRNA RNA_FollowPathConstraint;
  extern StructRNA RNA_Function;
  extern StructRNA RNA_GameBooleanProperty;
  extern StructRNA RNA_GameFloatProperty;
@@@ -124,6 -198,7 +198,7 @@@ extern StructRNA RNA_GameStringProperty
  extern StructRNA RNA_GameTimerProperty;
  extern StructRNA RNA_GlowSequence;
  extern StructRNA RNA_Group;
+ extern StructRNA RNA_Header;
  extern StructRNA RNA_HemiLamp;
  extern StructRNA RNA_HookModifier;
  extern StructRNA RNA_ID;
@@@ -140,6 -215,7 +215,7 @@@ extern StructRNA RNA_Key
  extern StructRNA RNA_KeyboardSensor;
  extern StructRNA RNA_KeyingSet;
  extern StructRNA RNA_KeyingSetPath;
+ extern StructRNA RNA_KinematicConstraint;
  extern StructRNA RNA_Lamp;
  extern StructRNA RNA_LampSkySettings;
  extern StructRNA RNA_LampTextureSlot;
@@@ -147,7 -223,12 +223,12 @@@ extern StructRNA RNA_Lattice
  extern StructRNA RNA_LatticeModifier;
  extern StructRNA RNA_LatticePoint;
  extern StructRNA RNA_Library;
+ extern StructRNA RNA_LimitDistanceConstraint;
+ extern StructRNA RNA_LimitLocationConstraint;
+ extern StructRNA RNA_LimitRotationConstraint;
+ extern StructRNA RNA_LimitScaleConstraint;
  extern StructRNA RNA_LocalLamp;
+ extern StructRNA RNA_LockedTrackConstraint;
  extern StructRNA RNA_MagicTexture;
  extern StructRNA RNA_Main;
  extern StructRNA RNA_MarbleTexture;
@@@ -160,6 -241,7 +241,7 @@@ extern StructRNA RNA_MaterialSlot
  extern StructRNA RNA_MaterialStrand;
  extern StructRNA RNA_MaterialSubsurfaceScattering;
  extern StructRNA RNA_MaterialTextureSlot;
+ extern StructRNA RNA_Menu;
  extern StructRNA RNA_Mesh;
  extern StructRNA RNA_MeshColor;
  extern StructRNA RNA_MeshColorLayer;
@@@ -170,7 -252,6 +252,6 @@@ extern StructRNA RNA_MeshFloatProperty
  extern StructRNA RNA_MeshFloatPropertyLayer;
  extern StructRNA RNA_MeshIntProperty;
  extern StructRNA RNA_MeshIntPropertyLayer;
- extern StructRNA RNA_MeshMultires;
  extern StructRNA RNA_MeshSticky;
  extern StructRNA RNA_MeshStringProperty;
  extern StructRNA RNA_MeshStringPropertyLayer;
@@@ -189,12 -270,11 +270,13 @@@ extern StructRNA RNA_MultiresModifier
  extern StructRNA RNA_MusgraveTexture;
  extern StructRNA RNA_NandController;
  extern StructRNA RNA_NearSensor;
 +extern StructRNA RNA_NlaTrack;
 +extern StructRNA RNA_NlaStrip;
  extern StructRNA RNA_Node;
  extern StructRNA RNA_NodeTree;
  extern StructRNA RNA_NoiseTexture;
  extern StructRNA RNA_NorController;
+ extern StructRNA RNA_Nurb;
  extern StructRNA RNA_Object;
  extern StructRNA RNA_ObstacleFluidSettings;
  extern StructRNA RNA_Operator;
@@@ -206,8 -286,11 +288,11 @@@ extern StructRNA RNA_OrController
  extern StructRNA RNA_OutflowFluidSettings;
  extern StructRNA RNA_PackedFile;
  extern StructRNA RNA_Panel;
+ extern StructRNA RNA_Particle;
  extern StructRNA RNA_ParticleFluidSettings;
+ extern StructRNA RNA_ParticleHairKey;
  extern StructRNA RNA_ParticleInstanceModifier;
+ extern StructRNA RNA_ParticleKey;
  extern StructRNA RNA_ParticleSettings;
  extern StructRNA RNA_ParticleSystem;
  extern StructRNA RNA_ParticleSystemModifier;
@@@ -219,12 -302,14 +304,14 @@@ extern StructRNA RNA_Pose
  extern StructRNA RNA_PoseChannel;
  extern StructRNA RNA_Property;
  extern StructRNA RNA_PropertySensor;
+ extern StructRNA RNA_PythonConstraint;
  extern StructRNA RNA_PythonController;
  extern StructRNA RNA_RadarSensor;
  extern StructRNA RNA_Radiosity;
  extern StructRNA RNA_RandomSensor;
  extern StructRNA RNA_RaySensor;
  extern StructRNA RNA_Region;
+ extern StructRNA RNA_RigidBodyJointConstraint;
  extern StructRNA RNA_Scene;
  extern StructRNA RNA_SceneRenderData;
  extern StructRNA RNA_SceneSequence;
@@@ -239,10 -324,34 +326,34 @@@ extern StructRNA RNA_SequenceEditor
  extern StructRNA RNA_SequenceElement;
  extern StructRNA RNA_SequenceProxy;
  extern StructRNA RNA_SequenceTransform;
+ extern StructRNA RNA_ShaderNode;
+ extern StructRNA RNA_ShaderNodeCameraData;
+ extern StructRNA RNA_ShaderNodeCombineRGB;
+ extern StructRNA RNA_ShaderNodeExtendedMaterial;
+ extern StructRNA RNA_ShaderNodeGeometry;
+ extern StructRNA RNA_ShaderNodeHueSaturation;
+ extern StructRNA RNA_ShaderNodeInvert;
+ extern StructRNA RNA_ShaderNodeMapping;
+ extern StructRNA RNA_ShaderNodeMaterial;
+ extern StructRNA RNA_ShaderNodeMath;
+ extern StructRNA RNA_ShaderNodeMixRGB;
+ extern StructRNA RNA_ShaderNodeNormal;
+ extern StructRNA RNA_ShaderNodeOutput;
+ extern StructRNA RNA_ShaderNodeRGB;
+ extern StructRNA RNA_ShaderNodeRGBCurve;
+ extern StructRNA RNA_ShaderNodeRGBToBW;
+ extern StructRNA RNA_ShaderNodeSeparateRGB;
+ extern StructRNA RNA_ShaderNodeSqueeze;
+ extern StructRNA RNA_ShaderNodeTexture;
+ extern StructRNA RNA_ShaderNodeValToRGB;
+ extern StructRNA RNA_ShaderNodeValue;
+ extern StructRNA RNA_ShaderNodeVectorCurve;
+ extern StructRNA RNA_ShaderNodeVectorMath;
  extern StructRNA RNA_ShapeKey;
  extern StructRNA RNA_ShapeKeyBezierPoint;
  extern StructRNA RNA_ShapeKeyCurvePoint;
  extern StructRNA RNA_ShapeKeyPoint;
+ extern StructRNA RNA_ShrinkwrapConstraint;
  extern StructRNA RNA_ShrinkwrapModifier;
  extern StructRNA RNA_SimpleDeformModifier;
  extern StructRNA RNA_SmoothModifier;
@@@ -254,53 -363,93 +365,93 @@@ extern StructRNA RNA_Space
  extern StructRNA RNA_Space3DView;
  extern StructRNA RNA_SpaceButtonsWindow;
  extern StructRNA RNA_SpaceImageEditor;
- extern StructRNA RNA_SpaceUVEditor;
- extern StructRNA RNA_SpaceTextEditor;
  extern StructRNA RNA_SpaceOutliner;
+ extern StructRNA RNA_SpaceSequenceEditor;
+ extern StructRNA RNA_SpaceTextEditor;
+ extern StructRNA RNA_SpaceUVEditor;
  extern StructRNA RNA_SpeedControlSequence;
  extern StructRNA RNA_SpotLamp;
+ extern StructRNA RNA_StretchToConstraint;
  extern StructRNA RNA_StringProperty;
  extern StructRNA RNA_Struct;
  extern StructRNA RNA_StucciTexture;
  extern StructRNA RNA_SubsurfModifier;
  extern StructRNA RNA_SunLamp;
+ extern StructRNA RNA_SurfaceCurve;
+ extern StructRNA RNA_TexMapping;
  extern StructRNA RNA_Text;
  extern StructRNA RNA_TextBox;
  extern StructRNA RNA_TextCharacterFormat;
+ extern StructRNA RNA_TextCurve;
  extern StructRNA RNA_TextLine;
  extern StructRNA RNA_TextMarker;
  extern StructRNA RNA_Texture;
+ extern StructRNA RNA_TextureNode;
+ extern StructRNA RNA_TextureNodeBricks;
+ extern StructRNA RNA_TextureNodeChecker;
+ extern StructRNA RNA_TextureNodeCompose;
+ extern StructRNA RNA_TextureNodeCoordinates;
+ extern StructRNA RNA_TextureNodeCurveRGB;
+ extern StructRNA RNA_TextureNodeCurveTime;
+ extern StructRNA RNA_TextureNodeDecompose;
+ extern StructRNA RNA_TextureNodeDistance;
+ extern StructRNA RNA_TextureNodeHueSaturation;
+ extern StructRNA RNA_TextureNodeImage;
+ extern StructRNA RNA_TextureNodeInvert;
+ extern StructRNA RNA_TextureNodeMath;
+ extern StructRNA RNA_TextureNodeMixRGB;
+ extern StructRNA RNA_TextureNodeOutput;
+ extern StructRNA RNA_TextureNodeRGBToBW;
+ extern StructRNA RNA_TextureNodeRotate;
+ extern StructRNA RNA_TextureNodeScale;
+ extern StructRNA RNA_TextureNodeTexture;
+ extern StructRNA RNA_TextureNodeTranslate;
+ extern StructRNA RNA_TextureNodeValToNor;
+ extern StructRNA RNA_TextureNodeValToRGB;
+ extern StructRNA RNA_TextureNodeViewer;
  extern StructRNA RNA_TextureSlot;
  extern StructRNA RNA_Theme;
- extern StructRNA RNA_ThemeDopeSheetEditor;
  extern StructRNA RNA_ThemeAudioWindow;
  extern StructRNA RNA_ThemeBoneColorSet;
  extern StructRNA RNA_ThemeButtonsWindow;
+ extern StructRNA RNA_ThemeDopeSheet;
  extern StructRNA RNA_ThemeFileBrowser;
- extern StructRNA RNA_ThemeImageEditor;
+ extern StructRNA RNA_ThemeFontStyle;
  extern StructRNA RNA_ThemeGraphEditor;
+ extern StructRNA RNA_ThemeImageEditor;
  extern StructRNA RNA_ThemeNLAEditor;
  extern StructRNA RNA_ThemeNodeEditor;
  extern StructRNA RNA_ThemeOutliner;
  extern StructRNA RNA_ThemeSequenceEditor;
+ extern StructRNA RNA_ThemeStyle;
  extern StructRNA RNA_ThemeTextEditor;
  extern StructRNA RNA_ThemeTimeline;
  extern StructRNA RNA_ThemeUserInterface;
  extern StructRNA RNA_ThemeUserPreferences;
  extern StructRNA RNA_ThemeView3D;
+ extern StructRNA RNA_ThemeWidgetColors;
  extern StructRNA RNA_TimelineMarker;
  extern StructRNA RNA_ToolSettings;
  extern StructRNA RNA_TouchSensor;
+ extern StructRNA RNA_TrackToConstraint;
+ extern StructRNA RNA_TransformConstraint;
  extern StructRNA RNA_TransformSequence;
+ extern StructRNA RNA_UILayout;
  extern StructRNA RNA_UVProjectModifier;
  extern StructRNA RNA_UnknownType;
  extern StructRNA RNA_UserPreferences;
+ extern StructRNA RNA_UserPreferencesAutosave;
+ extern StructRNA RNA_UserPreferencesEdit;
+ extern StructRNA RNA_UserPreferencesFilePaths;
+ extern StructRNA RNA_UserPreferencesLanguage;
+ extern StructRNA RNA_UserPreferencesSystem;
+ extern StructRNA RNA_UserPreferencesView;
  extern StructRNA RNA_UserSolidLight;
+ extern StructRNA RNA_VPaint;
  extern StructRNA RNA_VectorFont;
  extern StructRNA RNA_VertexGroup;
- extern StructRNA RNA_VoronoiTexture;
- extern StructRNA RNA_VPaint;
  extern StructRNA RNA_VertexGroupElement;
+ extern StructRNA RNA_VoronoiTexture;
  extern StructRNA RNA_WaveModifier;
  extern StructRNA RNA_WindowManager;
  extern StructRNA RNA_WipeSequence;
@@@ -374,7 -523,6 +525,6 @@@ int RNA_property_flag(PropertyRNA *prop
  
  int RNA_property_array_length(PropertyRNA *prop);
  
- StructRNA *RNA_property_pointer_type(PropertyRNA *prop);
  int RNA_property_string_maxlength(PropertyRNA *prop);
  
  const char *RNA_property_ui_name(PropertyRNA *prop);
@@@ -392,6 -540,8 +542,8 @@@ void RNA_property_enum_items(PointerRN
  int RNA_property_enum_value(PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *value);
  int RNA_property_enum_identifier(PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier);
  
+ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop);
  int RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop);
  int RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop);
  int RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop);
@@@ -507,8 -657,8 +659,8 @@@ void RNA_enum_set(PointerRNA *ptr, cons
  int RNA_enum_is_equal(PointerRNA *ptr, const char *name, const char *enumname);
  
  /* lower level functions that donr use a PointerRNA */
- int   RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value);
- int   RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **identifier);
+ int   RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *value);
+ int   RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **identifier);
  
  void RNA_string_get(PointerRNA *ptr, const char *name, char *value);
  char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen);
@@@ -574,6 -724,11 +726,11 @@@ int RNA_function_call_direct_lookup(Poi
  int RNA_function_call_direct_va(PointerRNA *ptr, FunctionRNA *func, const char *format, va_list args);
  int RNA_function_call_direct_va_lookup(PointerRNA *ptr, const char *identifier, const char *format, va_list args);
  
+ /* ID */
+ short RNA_type_to_ID_code(StructRNA *type);
+ StructRNA *ID_code_to_RNA_type(short idcode);
  #ifdef __cplusplus
  }
  #endif
index 15140e4f7445867b679d5f8be26051f25a280bb1,ea587174f54baed7889565d54d6c13333718d6f1..e820372a0777feb00ef2fed379c066340239cc1c
@@@ -1621,7 -1621,7 +1621,7 @@@ static void rna_generate_property(FILE 
                                                                                        }
                        case PROP_POINTER: {
                                PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
-                               fprintf(f, "\t%s, %s, ", rna_function_string(pprop->get), rna_function_string(pprop->set));
+                               fprintf(f, "\t%s, %s, %s, ", rna_function_string(pprop->get), rna_function_string(pprop->set), rna_function_string(pprop->typef));
                                if(pprop->type) fprintf(f, "&RNA_%s\n", (char*)pprop->type);
                                else fprintf(f, "NULL\n");
                                break;
@@@ -1794,7 -1794,6 +1794,7 @@@ RNAProcessItem PROCESS_ITEMS[]= 
        {"rna_mesh.c", RNA_def_mesh},
        {"rna_meta.c", RNA_def_meta},
        {"rna_modifier.c", RNA_def_modifier},
 +      {"rna_nla.c", RNA_def_nla},
        {"rna_nodetree.c", RNA_def_nodetree},
        {"rna_object.c", RNA_def_object},
        {"rna_object_force.c", RNA_def_object_force},