Merged changes in the trunk up to revision 41638.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Tue, 8 Nov 2011 06:30:02 +0000 (06:30 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Tue, 8 Nov 2011 06:30:02 +0000 (06:30 +0000)
Conflicts resolved:
doc/python_api/sphinx_doc_gen.py
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/intern/library.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/resources.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c

62 files changed:
1  2 
build_files/scons/tools/Blender.py
doc/python_api/sphinx_doc_gen.py
release/scripts/startup/bl_operators/__init__.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/CMakeLists.txt
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/idcode.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/bpath.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/resources.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/render/render_shading.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_orientations.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_mesh_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/python/intern/bpy.c
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/creator.c

Simple merge
index c0e7029278451a8a2273335059f9ac2b19c57413,36e092f85b7e11effd9e5167edd09d74d8a892fd..0572fcf1b4216b897f7775c6436f70ebc4a148fb
@@@ -121,7 -131,7 +132,8 @@@ import rna_inf
  ClassMethodDescriptorType = type(dict.__dict__['fromkeys'])
  MethodDescriptorType = type(dict.get)
  GetSetDescriptorType = type(int.real)
 +StaticMethodType = type(staticmethod(lambda: None))
+ from types import MemberDescriptorType
  
  EXAMPLE_SET = set()
  EXAMPLE_SET_USED = set()
index c1af1e8ab5e6a6126f4dfcb82145c1198036adbb,06b4429d25ca2143c4f7fd3a1106e179f1b711a5..8fb264eb411003988f33241e913a6e6f1e3f64de
@@@ -25,8 -25,8 +25,9 @@@ if "bpy" in locals()
  _modules = (
      "add_mesh_torus",
      "anim",
+     "clip",
      "console",
 +    "freestyle",
      "image",
      "mesh",
      "object_align",
Simple merge
index e31d4edbc7456eaa8b25cfe08739252b63136201,28eb59ebdb623e0591c2e2f48da2e17e0bff9e9d..ada0761f7d221ac45cae76c8528ef0f0ebbb208d
@@@ -85,7 -85,7 +85,8 @@@ typedef struct Main 
        ListBase particle;
        ListBase wm;
        ListBase gpencil;
+       ListBase movieclip;
 +      ListBase linestyle;
  
        char id_tag_update[256];
  } Main;
index 4c19440f3d1a868a63efb8f3b894d3440eb2635c,c21806b4bc10528d9e5359feb3479b4aa65835a7..ffa3555e40bdf98140d471754382faef18c3bc58
@@@ -104,9 -104,9 +105,10 @@@ set(SR
        intern/implicit.c
        intern/ipo.c
        intern/key.c
+       intern/lamp.c
        intern/lattice.c
        intern/library.c
 +      intern/linestyle.c
        intern/material.c
        intern/mball.c
        intern/mesh.c
        BKE_image.h
        BKE_ipo.h
        BKE_key.h
+       BKE_lamp.h
        BKE_lattice.h
        BKE_library.h
 +      BKE_linestyle.h
        BKE_main.h
        BKE_material.h
        BKE_mball.h
Simple merge
index 632e5126574c5ebef9b3ab850a322ec12258019c,63ab74fc105241a5da24d993984eb42b5470fd78..f8186c25a68ab3bd3a991785bc53b8cb6a278427
@@@ -2327,12 -2332,9 +2339,12 @@@ void BKE_animsys_evaluate_all_animatio
        /* particles */
        EVAL_ANIM_IDS(main->particle.first, ADT_RECALC_ANIM);
        
-       /* lamps */
+       /* speakers */
        EVAL_ANIM_IDS(main->speaker.first, ADT_RECALC_ANIM);
  
 +      /* linestyles */
 +      EVAL_ANIM_IDS(main->linestyle.first, ADT_RECALC_ANIM);
 +      
        /* objects */
                /* ADT_RECALC_ANIM doesn't need to be supplied here, since object AnimData gets 
                 * this tagged by Depsgraph on framechange. This optimisation means that objects
index 6cefa1b2a42cf3ee44e1620c641254f6adc58843,650f85da5b3ef64aa39c61a63134d6a913564022..fe9678ee1fcec2afa81ffeeda01e39dbf31ee4ad
  #include "BKE_fcurve.h"
  #include "BKE_speaker.h"
  #include "BKE_utildefines.h"
+ #include "BKE_movieclip.h"
 +#include "BKE_linestyle.h"
  
  #include "RNA_access.h"
  
@@@ -472,8 -486,8 +491,10 @@@ ListBase *which_libbase(Main *mainlib, 
                        return &(mainlib->wm);
                case ID_GD:
                        return &(mainlib->gpencil);
+               case ID_MC:
+                       return &(mainlib->movieclip);
 +              case ID_LS:
 +                      return &(mainlib->linestyle);
        }
        return NULL;
  }
@@@ -555,7 -569,7 +576,8 @@@ int set_listbasepointers(Main *main, Li
        lb[a++]= &(main->scene);
        lb[a++]= &(main->library);
        lb[a++]= &(main->wm);
+       lb[a++]= &(main->movieclip);
 +      lb[a++]= &(main->linestyle);
        
        lb[a]= NULL;
  
@@@ -664,9 -678,9 +686,12 @@@ static ID *alloc_libblock_notest(short 
                case ID_GD:
                        id = MEM_callocN(sizeof(bGPdata), "Grease Pencil");
                        break;
+               case ID_MC:
+                       id = MEM_callocN(sizeof(MovieClip), "Movie Clip");
+                       break;
 +              case ID_LS:
 +                      id = MEM_callocN(sizeof(FreestyleLineStyle), "Freestyle Line Style");
 +                      break;
        }
        return id;
  }
@@@ -874,9 -886,9 +897,12 @@@ void free_libblock(ListBase *lb, void *
                case ID_GD:
                        free_gpencil_data((bGPdata *)id);
                        break;
+               case ID_MC:
+                       free_movieclip((MovieClip *)id);
+                       break;
 +              case ID_LS:
 +                      FRS_free_linestyle((FreestyleLineStyle *)id);
 +                      break;
        }
  
        if (id->properties) {
Simple merge
Simple merge
index 02b1f85256d79035b6ac17eccb9d89cc77fd7365,96fbe3929221926a4a2c3c717d6201633fe7be53..304d302328acf112fe824c8c6cc3ba672bf75261
@@@ -5750,177 -5840,55 +5854,226 @@@ static void lib_link_group(FileData *fd
        }
  }
  
+ /* ***************** READ MOVIECLIP *************** */
+ static void direct_link_movieclip(FileData *fd, MovieClip *clip)
+ {
+       MovieTracking *tracking= &clip->tracking;
+       MovieTrackingTrack *track;
+       if(fd->movieclipmap) clip->cache= newmclipadr(fd, clip->cache);
+       else clip->cache= NULL;
+       if(fd->movieclipmap) clip->tracking.camera.intrinsics= newmclipadr(fd, clip->tracking.camera.intrinsics);
+       else clip->tracking.camera.intrinsics= NULL;
+       tracking->reconstruction.cameras= newdataadr(fd, tracking->reconstruction.cameras);
+       link_list(fd, &tracking->tracks);
+       track= tracking->tracks.first;
+       while(track) {
+               track->markers= newdataadr(fd, track->markers);
+               track= track->next;
+       }
+       clip->tracking.act_track= newdataadr(fd, clip->tracking.act_track);
+       clip->anim= NULL;
+       clip->tracking_context= NULL;
+       clip->tracking.stabilization.ok= 0;
+       clip->tracking.stabilization.scaleibuf= NULL;
+       clip->tracking.stabilization.rot_track= newdataadr(fd, clip->tracking.stabilization.rot_track);
+ }
+ static void lib_link_movieclip(FileData *fd, Main *main)
+ {
+       MovieClip *clip;
+       clip= main->movieclip.first;
+       while(clip) {
+               if(clip->id.flag & LIB_NEEDLINK) {
+                       clip->gpd= newlibadr_us(fd, clip->id.lib, clip->gpd);
+                       clip->id.flag -= LIB_NEEDLINK;
+               }
+               clip= clip->id.next;
+       }
+ }
 +/* ************ READ LINE STYLE ***************** */
 +
 +static void lib_link_linestyle(FileData *fd, Main *main)
 +{
 +      FreestyleLineStyle *linestyle;
 +      LineStyleModifier *m;
 +
 +      linestyle = main->linestyle.first;
 +      while (linestyle) {
 +              if (linestyle->id.flag & LIB_NEEDLINK) {
 +                      linestyle->id.flag -= LIB_NEEDLINK;
 +
 +                      if (linestyle->id.properties) IDP_LibLinkProperty(linestyle->id.properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
 +                      if (linestyle->adt) lib_link_animdata(fd, &linestyle->id, linestyle->adt);
 +                      for (m = linestyle->color_modifiers.first; m; m = m->next) {
 +                              switch (m->type) {
 +                              case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +                                      {
 +                                              LineStyleColorModifier_DistanceFromObject *cm = (LineStyleColorModifier_DistanceFromObject *)m;
 +                                              cm->target = newlibadr(fd, linestyle->id.lib, cm->target);
 +                                      }
 +                                      break;
 +                              }
 +                      }
 +                      for (m = linestyle->alpha_modifiers.first; m; m = m->next){
 +                              switch (m->type) {
 +                              case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +                                      {
 +                                              LineStyleAlphaModifier_DistanceFromObject *am = (LineStyleAlphaModifier_DistanceFromObject *)m;
 +                                              am->target = newlibadr(fd, linestyle->id.lib, am->target);
 +                                      }
 +                                      break;
 +                              }
 +                      }
 +                      for (m = linestyle->thickness_modifiers.first; m; m = m->next){
 +                              switch (m->type) {
 +                              case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +                                      {
 +                                              LineStyleThicknessModifier_DistanceFromObject *tm = (LineStyleThicknessModifier_DistanceFromObject *)m;
 +                                              tm->target = newlibadr(fd, linestyle->id.lib, tm->target);
 +                                      }
 +                                      break;
 +                              }
 +                      }
 +              }
 +              linestyle = linestyle->id.next;
 +      }
 +}
 +
 +static void direct_link_linestyle_color_modifier(FileData *fd, LineStyleModifier *modifier)
 +{
 +      switch (modifier->type) {
 +      case LS_MODIFIER_ALONG_STROKE:
 +              {
 +                      LineStyleColorModifier_AlongStroke *m = (LineStyleColorModifier_AlongStroke *)modifier;
 +                      m->color_ramp = newdataadr(fd, m->color_ramp);
 +              }
 +              break;
 +      case LS_MODIFIER_DISTANCE_FROM_CAMERA:
 +              {
 +                      LineStyleColorModifier_DistanceFromCamera *m = (LineStyleColorModifier_DistanceFromCamera *)modifier;
 +                      m->color_ramp = newdataadr(fd, m->color_ramp);
 +              }
 +              break;
 +      case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +              {
 +                      LineStyleColorModifier_DistanceFromObject *m = (LineStyleColorModifier_DistanceFromObject *)modifier;
 +                      m->color_ramp = newdataadr(fd, m->color_ramp);
 +              }
 +              break;
 +      case LS_MODIFIER_MATERIAL:
 +              {
 +                      LineStyleColorModifier_Material *m = (LineStyleColorModifier_Material *)modifier;
 +                      m->color_ramp = newdataadr(fd, m->color_ramp);
 +              }
 +              break;
 +      }
 +}
 +
 +static void direct_link_linestyle_alpha_modifier(FileData *fd, LineStyleModifier *modifier)
 +{
 +      switch (modifier->type) {
 +      case LS_MODIFIER_ALONG_STROKE:
 +              {
 +                      LineStyleAlphaModifier_AlongStroke *m = (LineStyleAlphaModifier_AlongStroke *)modifier;
 +                      m->curve = newdataadr(fd, m->curve);
 +                      direct_link_curvemapping(fd, m->curve);
 +              }
 +              break;
 +      case LS_MODIFIER_DISTANCE_FROM_CAMERA:
 +              {
 +                      LineStyleAlphaModifier_DistanceFromCamera *m = (LineStyleAlphaModifier_DistanceFromCamera *)modifier;
 +                      m->curve = newdataadr(fd, m->curve);
 +                      direct_link_curvemapping(fd, m->curve);
 +              }
 +              break;
 +      case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +              {
 +                      LineStyleAlphaModifier_DistanceFromObject *m = (LineStyleAlphaModifier_DistanceFromObject *)modifier;
 +                      m->curve = newdataadr(fd, m->curve);
 +                      direct_link_curvemapping(fd, m->curve);
 +              }
 +              break;
 +      case LS_MODIFIER_MATERIAL:
 +              {
 +                      LineStyleAlphaModifier_Material *m = (LineStyleAlphaModifier_Material *)modifier;
 +                      m->curve = newdataadr(fd, m->curve);
 +                      direct_link_curvemapping(fd, m->curve);
 +              }
 +              break;
 +      }
 +}
 +
 +static void direct_link_linestyle_thickness_modifier(FileData *fd, LineStyleModifier *modifier)
 +{
 +      switch (modifier->type) {
 +      case LS_MODIFIER_ALONG_STROKE:
 +              {
 +                      LineStyleThicknessModifier_AlongStroke *m = (LineStyleThicknessModifier_AlongStroke *)modifier;
 +                      m->curve = newdataadr(fd, m->curve);
 +                      direct_link_curvemapping(fd, m->curve);
 +              }
 +              break;
 +      case LS_MODIFIER_DISTANCE_FROM_CAMERA:
 +              {
 +                      LineStyleThicknessModifier_DistanceFromCamera *m = (LineStyleThicknessModifier_DistanceFromCamera *)modifier;
 +                      m->curve = newdataadr(fd, m->curve);
 +                      direct_link_curvemapping(fd, m->curve);
 +              }
 +              break;
 +      case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +              {
 +                      LineStyleThicknessModifier_DistanceFromObject *m = (LineStyleThicknessModifier_DistanceFromObject *)modifier;
 +                      m->curve = newdataadr(fd, m->curve);
 +                      direct_link_curvemapping(fd, m->curve);
 +              }
 +              break;
 +      case LS_MODIFIER_MATERIAL:
 +              {
 +                      LineStyleThicknessModifier_Material *m = (LineStyleThicknessModifier_Material *)modifier;
 +                      m->curve = newdataadr(fd, m->curve);
 +                      direct_link_curvemapping(fd, m->curve);
 +              }
 +              break;
 +      }
 +}
 +
 +static void direct_link_linestyle_geometry_modifier(FileData *fd, LineStyleModifier *modifier)
 +{
 +}
 +
 +static void direct_link_linestyle(FileData *fd, FreestyleLineStyle *linestyle)
 +{
 +      LineStyleModifier *modifier;
 +
 +      linestyle->adt= newdataadr(fd, linestyle->adt);
 +      direct_link_animdata(fd, linestyle->adt);
 +      link_list(fd, &linestyle->color_modifiers);
 +      for(modifier=linestyle->color_modifiers.first; modifier; modifier= modifier->next)
 +              direct_link_linestyle_color_modifier(fd, modifier);
 +      link_list(fd, &linestyle->alpha_modifiers);
 +      for(modifier=linestyle->alpha_modifiers.first; modifier; modifier= modifier->next)
 +              direct_link_linestyle_alpha_modifier(fd, modifier);
 +      link_list(fd, &linestyle->thickness_modifiers);
 +      for(modifier=linestyle->thickness_modifiers.first; modifier; modifier= modifier->next)
 +              direct_link_linestyle_thickness_modifier(fd, modifier);
 +      link_list(fd, &linestyle->geometry_modifiers);
 +      for(modifier=linestyle->geometry_modifiers.first; modifier; modifier= modifier->next)
 +              direct_link_linestyle_geometry_modifier(fd, modifier);
 +}
 +
  /* ************** GENERAL & MAIN ******************** */
  
  
@@@ -5955,7 -5923,7 +6108,8 @@@ static const char *dataname(short id_co
                case ID_BR: return "Data from BR";
                case ID_PA: return "Data from PA";
                case ID_GD: return "Data from GD";
+               case ID_MC: return "Data from MC";
 +              case ID_LS: return "Data from LS";
        }
        return "Data from Lib Block";
        
@@@ -6125,9 -6093,9 +6279,12 @@@ static BHead *read_libblock(FileData *f
                case ID_GD:
                        direct_link_gpencil(fd, (bGPdata *)id);
                        break;
+               case ID_MC:
+                       direct_link_movieclip(fd, (MovieClip *)id);
+                       break;
 +              case ID_LS:
 +                      direct_link_linestyle(fd, (FreestyleLineStyle *)id);
 +                      break;
        }
        
        /*link direct data of ID properties*/
@@@ -12382,28 -12317,95 +12506,117 @@@ static void do_versions(FileData *fd, L
                }
        }
  
+       if (main->versionfile < 260 || (main->versionfile == 260 && main->subversionfile < 1)){
+               Object *ob;
+               for (ob= main->object.first; ob; ob= ob->id.next) {
+                       ob->collision_boundtype= ob->boundtype;
+               }
+               {
+                       Camera *cam;
+                       for(cam= main->camera.first; cam; cam= cam->id.next) {
+                               if (cam->sensor_x < 0.01)
+                                       cam->sensor_x = DEFAULT_SENSOR_WIDTH;
+                               if (cam->sensor_y < 0.01)
+                                       cam->sensor_y = DEFAULT_SENSOR_HEIGHT;
+                       }
+               }
+       }
+       if (main->versionfile < 260 || (main->versionfile == 260 && main->subversionfile < 2)) {
+               bNodeTreeType *ntreetype= ntreeGetType(NTREE_SHADER);
+               if(ntreetype && ntreetype->foreach_nodetree)
+                       ntreetype->foreach_nodetree(main, NULL, do_version_ntree_tex_mapping_260);
+       }
+       /* put compatibility code here until next subversion bump */
+       {
+               {
+                       bScreen *sc;
+                       MovieClip *clip;
+                       for (sc= main->screen.first; sc; sc= sc->id.next) {
+                               ScrArea *sa;
+                               for (sa= sc->areabase.first; sa; sa= sa->next) {
+                                       SpaceLink *sl;
+                                       for (sl= sa->spacedata.first; sl; sl= sl->next) {
+                                               if(sl->spacetype==SPACE_VIEW3D) {
+                                                       View3D *v3d= (View3D *)sl;
+                                                       if(v3d->bundle_size==0.0f) {
+                                                               v3d->bundle_size= 0.2f;
+                                                               v3d->flag2 |= V3D_SHOW_RECONSTRUCTION;
+                                                       }
+                                                       else if(sl->spacetype==SPACE_CLIP) {
+                                                               SpaceClip *sc= (SpaceClip *)sl;
+                                                               if(sc->scopes.track_preview_height==0)
+                                                                       sc->scopes.track_preview_height= 120;
+                                                       }
+                                                       if(v3d->bundle_drawtype==0)
+                                                               v3d->bundle_drawtype= OB_PLAINAXES;
+                                               }
+                                       }
+                               }
+                       }
+                       for (clip= main->movieclip.first; clip; clip= clip->id.next) {
+                               MovieTrackingTrack *track;
+                               if(clip->aspx<1.0f) {
+                                       clip->aspx= 1.0f;
+                                       clip->aspy= 1.0f;
+                               }
+                               /* XXX: a bit hacky, probably include imbuf and use real constants are nicer */
+                               clip->proxy.build_tc_flag= 7;
+                               if(clip->proxy.build_size_flag==0)
+                                       clip->proxy.build_size_flag= 1;
+                               if(clip->proxy.quality==0)
+                                       clip->proxy.quality= 90;
+                               if(clip->tracking.camera.pixel_aspect<0.01f)
+                                       clip->tracking.camera.pixel_aspect= 1.f;
+                               track= clip->tracking.tracks.first;
+                               while(track) {
+                                       if(track->pyramid_levels==0)
+                                               track->pyramid_levels= 2;
+                                       if(track->minimum_correlation==0.0f)
+                                               track->minimum_correlation= 0.75f;
+                                       track= track->next;
+                               }
+                       }
+               }
+       }
 +      /* default values in Freestyle settings */
 +      {
 +              Scene *sce;
 +              SceneRenderLayer *srl;
 +              FreestyleLineStyle *linestyle;
 +
 +              for(sce = main->scene.first; sce; sce = sce->id.next) {
 +                      for(srl= sce->r.layers.first; srl; srl= srl->next) {
 +                              if (srl->freestyleConfig.mode == 0)
 +                                      srl->freestyleConfig.mode= FREESTYLE_CONTROL_EDITOR_MODE;
 +                              if (srl->freestyleConfig.raycasting_algorithm == 0)
 +                                      srl->freestyleConfig.raycasting_algorithm= FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE;
 +                      }
 +              }
 +              for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
 +                      if (linestyle->chaining == 0)
 +                              linestyle->chaining= LS_CHAINING_PLAIN;
 +                      if (linestyle->rounds == 0)
 +                              linestyle->rounds= 3;
 +              }
 +      }
 +      
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */
        /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
  
@@@ -12448,7 -12450,7 +12661,8 @@@ static void lib_link_all(FileData *fd, 
        lib_link_nodetree(fd, main);    /* has to be done after scene/materials, this will verify group nodes */
        lib_link_brush(fd, main);
        lib_link_particlesettings(fd, main);
+       lib_link_movieclip(fd, main);
 +      lib_link_linestyle(fd, main);
  
        lib_link_mesh(fd, main);                /* as last: tpage images with users at zero */
  
index 158fad766b4e334ea6627336c3bca9650cb005b2,021aa6a8a921d4c6f5f00fff61afb6554f8acb5f..b37364e830b6e93fa433056ecf6e4cd5c08ef4d1
@@@ -2514,196 -2512,38 +2525,228 @@@ static void write_scripts(WriteData *wd
        }
  }
  
+ static void write_movieclips(WriteData *wd, ListBase *idbase)
+ {
+       MovieClip *clip;
+       clip= idbase->first;
+       while(clip) {
+               if(clip->id.us>0 || wd->current) {
+                       MovieTracking *tracking= &clip->tracking;
+                       MovieTrackingTrack *track;
+                       writestruct(wd, ID_MC, "MovieClip", 1, clip);
+                       if(tracking->reconstruction.camnr)
+                               writestruct(wd, DATA, "MovieReconstructedCamera", tracking->reconstruction.camnr, tracking->reconstruction.cameras);
+                       track= tracking->tracks.first;
+                       while(track) {
+                               writestruct(wd, DATA, "MovieTrackingTrack", 1, track);
+                               if(track->markers)
+                                       writestruct(wd, DATA, "MovieTrackingMarker", track->markersnr, track->markers);
+                               track= track->next;
+                       }
+               }
+               clip= clip->id.next;
+       }
+       /* flush helps the compression for undo-save */
+       mywrite(wd, MYWRITE_FLUSH, 0);
+ }
 +static void write_linestyle_color_modifiers(WriteData *wd, ListBase *modifiers)
 +{
 +      LineStyleModifier *m;
 +      char *struct_name;
 +
 +      for (m = modifiers->first; m; m = m->next) {
 +              switch (m->type) {
 +              case LS_MODIFIER_ALONG_STROKE:
 +                      struct_name = "LineStyleColorModifier_AlongStroke";
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_CAMERA:
 +                      struct_name = "LineStyleColorModifier_DistanceFromCamera";
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +                      struct_name = "LineStyleColorModifier_DistanceFromObject";
 +                      break;
 +              case LS_MODIFIER_MATERIAL:
 +                      struct_name = "LineStyleColorModifier_Material";
 +                      break;
 +              default:
 +                      struct_name = "LineStyleColorModifier"; // this should not happen
 +              }
 +              writestruct(wd, DATA, struct_name, 1, m);
 +      }
 +      for (m = modifiers->first; m; m = m->next) {
 +              switch (m->type) {
 +              case LS_MODIFIER_ALONG_STROKE:
 +                      writestruct(wd, DATA, "ColorBand", 1, ((LineStyleColorModifier_AlongStroke *)m)->color_ramp);
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_CAMERA:
 +                      writestruct(wd, DATA, "ColorBand", 1, ((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp);
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +                      writestruct(wd, DATA, "ColorBand", 1, ((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp);
 +                      break;
 +              case LS_MODIFIER_MATERIAL:
 +                      writestruct(wd, DATA, "ColorBand", 1, ((LineStyleColorModifier_Material *)m)->color_ramp);
 +                      break;
 +              }
 +      }
 +}
 +
 +static void write_linestyle_alpha_modifiers(WriteData *wd, ListBase *modifiers)
 +{
 +      LineStyleModifier *m;
 +      char *struct_name;
 +
 +      for (m = modifiers->first; m; m = m->next) {
 +              switch (m->type) {
 +              case LS_MODIFIER_ALONG_STROKE:
 +                      struct_name = "LineStyleAlphaModifier_AlongStroke";
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_CAMERA:
 +                      struct_name = "LineStyleAlphaModifier_DistanceFromCamera";
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +                      struct_name = "LineStyleAlphaModifier_DistanceFromObject";
 +                      break;
 +              case LS_MODIFIER_MATERIAL:
 +                      struct_name = "LineStyleAlphaModifier_Material";
 +                      break;
 +              default:
 +                      struct_name = "LineStyleAlphaModifier"; // this should not happen
 +              }
 +              writestruct(wd, DATA, struct_name, 1, m);
 +      }
 +      for (m = modifiers->first; m; m = m->next) {
 +              switch (m->type) {
 +              case LS_MODIFIER_ALONG_STROKE:
 +                      write_curvemapping(wd, ((LineStyleAlphaModifier_AlongStroke *)m)->curve);
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_CAMERA:
 +                      write_curvemapping(wd, ((LineStyleAlphaModifier_DistanceFromCamera *)m)->curve);
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +                      write_curvemapping(wd, ((LineStyleAlphaModifier_DistanceFromObject *)m)->curve);
 +                      break;
 +              case LS_MODIFIER_MATERIAL:
 +                      write_curvemapping(wd, ((LineStyleAlphaModifier_Material *)m)->curve);
 +                      break;
 +              }
 +      }
 +}
 +
 +static void write_linestyle_thickness_modifiers(WriteData *wd, ListBase *modifiers)
 +{
 +      LineStyleModifier *m;
 +      char *struct_name;
 +
 +      for (m = modifiers->first; m; m = m->next) {
 +              switch (m->type) {
 +              case LS_MODIFIER_ALONG_STROKE:
 +                      struct_name = "LineStyleThicknessModifier_AlongStroke";
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_CAMERA:
 +                      struct_name = "LineStyleThicknessModifier_DistanceFromCamera";
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +                      struct_name = "LineStyleThicknessModifier_DistanceFromObject";
 +                      break;
 +              case LS_MODIFIER_MATERIAL:
 +                      struct_name = "LineStyleThicknessModifier_Material";
 +                      break;
 +              case LS_MODIFIER_CALLIGRAPHY:
 +                      struct_name = "LineStyleThicknessModifier_Calligraphy";
 +                      break;
 +              default:
 +                      struct_name = "LineStyleThicknessModifier"; // this should not happen
 +              }
 +              writestruct(wd, DATA, struct_name, 1, m);
 +      }
 +      for (m = modifiers->first; m; m = m->next) {
 +              switch (m->type) {
 +              case LS_MODIFIER_ALONG_STROKE:
 +                      write_curvemapping(wd, ((LineStyleThicknessModifier_AlongStroke *)m)->curve);
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_CAMERA:
 +                      write_curvemapping(wd, ((LineStyleThicknessModifier_DistanceFromCamera *)m)->curve);
 +                      break;
 +              case LS_MODIFIER_DISTANCE_FROM_OBJECT:
 +                      write_curvemapping(wd, ((LineStyleThicknessModifier_DistanceFromObject *)m)->curve);
 +                      break;
 +              case LS_MODIFIER_MATERIAL:
 +                      write_curvemapping(wd, ((LineStyleThicknessModifier_Material *)m)->curve);
 +                      break;
 +              }
 +      }
 +}
 +
 +static void write_linestyle_geometry_modifiers(WriteData *wd, ListBase *modifiers)
 +{
 +      LineStyleModifier *m;
 +      char *struct_name;
 +
 +      for (m = modifiers->first; m; m = m->next) {
 +              switch (m->type) {
 +              case LS_MODIFIER_SAMPLING:
 +                      struct_name = "LineStyleGeometryModifier_Sampling";
 +                      break;
 +              case LS_MODIFIER_BEZIER_CURVE:
 +                      struct_name = "LineStyleGeometryModifier_BezierCurve";
 +                      break;
 +              case LS_MODIFIER_SINUS_DISPLACEMENT:
 +                      struct_name = "LineStyleGeometryModifier_SinusDisplacement";
 +                      break;
 +              case LS_MODIFIER_SPATIAL_NOISE:
 +                      struct_name = "LineStyleGeometryModifier_SpatialNoise";
 +                      break;
 +              case LS_MODIFIER_PERLIN_NOISE_1D:
 +                      struct_name = "LineStyleGeometryModifier_PerlinNoise1D";
 +                      break;
 +              case LS_MODIFIER_PERLIN_NOISE_2D:
 +                      struct_name = "LineStyleGeometryModifier_PerlinNoise2D";
 +                      break;
 +              case LS_MODIFIER_BACKBONE_STRETCHER:
 +                      struct_name = "LineStyleGeometryModifier_BackboneStretcher";
 +                      break;
 +              case LS_MODIFIER_TIP_REMOVER:
 +                      struct_name = "LineStyleGeometryModifier_TipRemover";
 +                      break;
 +              case LS_MODIFIER_POLYGONIZATION:
 +                      struct_name = "LineStyleGeometryModifier_Polygonalization";
 +                      break;
 +              case LS_MODIFIER_GUIDING_LINES:
 +                      struct_name = "LineStyleGeometryModifier_GuidingLines";
 +                      break;
 +              default:
 +                      struct_name = "LineStyleGeometryModifier"; // this should not happen
 +              }
 +              writestruct(wd, DATA, struct_name, 1, m);
 +      }
 +}
 +
 +static void write_linestyles(WriteData *wd, ListBase *idbase)
 +{
 +      FreestyleLineStyle *linestyle;
 +
 +      for(linestyle=idbase->first; linestyle; linestyle= linestyle->id.next) {
 +              if(linestyle->id.us>0 || wd->current) {
 +                      writestruct(wd, ID_LS, "FreestyleLineStyle", 1, linestyle);
 +                      if (linestyle->id.properties) IDP_WriteProperty(linestyle->id.properties, wd);
 +                      if (linestyle->adt) write_animdata(wd, linestyle->adt);
 +                      write_linestyle_color_modifiers(wd, &linestyle->color_modifiers);
 +                      write_linestyle_alpha_modifiers(wd, &linestyle->alpha_modifiers);
 +                      write_linestyle_thickness_modifiers(wd, &linestyle->thickness_modifiers);
 +                      write_linestyle_geometry_modifiers(wd, &linestyle->geometry_modifiers);
 +              }
 +      }
 +}
 +
  /* context is usually defined by WM, two cases where no WM is available:
   * - for forward compatibility, curscreen has to be saved
   * - for undofile, curscene needs to be saved */
index a3c6d3a24565311dc2ad60410f2a109f27148062,4b1371c532c4ee5407d1fe2542ad1c415a914925..44eb136750b0f94568172f747a74436fe9104ce1
@@@ -249,8 -249,16 +249,18 @@@ enum 
  
        TH_NODE_CURVING,
  
 -      TH_LOCK_MARKER
+       TH_MARKER_OUTLINE,
+       TH_MARKER,
+       TH_ACT_MARKER,
+       TH_SEL_MARKER,
+       TH_BUNDLE_SOLID,
+       TH_DIS_MARKER,
+       TH_PATH_BEFORE,
+       TH_PATH_AFTER,
+       TH_CAMERA_PATH,
++      TH_LOCK_MARKER,
 +      TH_FREESTYLE_EDGE_MARK,
 +      TH_FREESTYLE_FACE_MARK
  };
  /* XXX WARNING: previous is saved in file, so do not change order! */
  
index 9bc9398095d66a34bcda214391daeb4217f75d58,5f392daeec67217ca55373d628ac59b8fc3352bc..90002611fbdc9848e1b48d4a105b5d4b9660f566
@@@ -1617,16 -1634,32 +1640,45 @@@ void init_userdef_do_versions(void
                }
        }
  
+       {
+               bTheme *btheme;
+               for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+                       if(btheme->tv3d.bundle_solid[3] == 0)
+                               SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
+                       if(btheme->tv3d.camera_path[3] == 0)
+                               SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
+                       if((btheme->tclip.back[3]) == 0) {
+                               btheme->tclip= btheme->tv3d;
+                               SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
+                               SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
+                               SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
+                               SETCOL(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
+                               SETCOL(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
+                               SETCOL(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
+                               SETCOL(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
+                               SETCOL(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
+                               SETCOL(btheme->tclip.grid, 0x5e, 0x5e, 0x5e, 255);
+                               SETCOL(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255);
+                               SETCOL(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff);
+                               SETCOL(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff);
+                               btheme->tclip.handle_vertex_size= 4;
+                       }
++              }
++      }
++
 +      /* Freestyle color settings */
 +      {
 +              bTheme *btheme;
 +
 +              for(btheme= U.themes.first; btheme; btheme= btheme->next) {
 +                      /* check for alpha==0 is safe, then color was never set */
 +                      if(btheme->tv3d.freestyle_edge_mark[3]==0) {
 +                              SETCOL(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
 +                              SETCOL(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
 +                      }
                }
        }
  
index 29d4583845b3c63f2be17a050823f0f1fb6c99f4,13d686508de269656360d7fe43fe53bb4a283621..1014c6f8b4095ccdcfddd61b7a916e7f97cd4a84
@@@ -564,7 -570,10 +570,7 @@@ int transformEvent(TransInfo *t, wmEven
  
        if (event->type == MOUSEMOVE)
        {
-               VECCOPY2D(t->mval, event->mval);
 -              if (t->modifiers & MOD_CONSTRAINT_SELECT)
 -                      t->con.mode |= CON_SELECT;
 -
+               copy_v2_v2_int(t->mval, event->mval);
  
                // t->redraw |= TREDRAW_SOFT; /* Use this for soft redraw. Might cause flicker in object mode */
                t->redraw |= TREDRAW_HARD;
index 9837421b08e469a1d889e5125c051f998e51a2da,7fa26478ae2c00a8e1d3feba48703d3068cbfb5f..b4aa2f6da25992011458f0db76d9e8affe787834
@@@ -194,7 -194,7 +194,8 @@@ typedef struct PreviewImage 
  #define ID_PA         MAKE_ID2('P', 'A') /* ParticleSettings */
  #define ID_GD         MAKE_ID2('G', 'D') /* GreasePencil */
  #define ID_WM         MAKE_ID2('W', 'M') /* WindowManager */
+ #define ID_MC         MAKE_ID2('M', 'C') /* MovieClip */
 +#define ID_LS         MAKE_ID2('L', 'S') /* FreestyleLineStyle */
  
        /* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */
  #define ID_SEQ                MAKE_ID2('S', 'Q')
index 2a4a17a964fb4cefbf2271f4b12d653b11a2791a,ec60fc7b2b80c8e7937f0094e0820433abc60cfe..0cfe9763267bc4dc8f2ffa7c3293b0ddc9596fab
@@@ -131,8 -131,8 +131,10 @@@ const char *includefiles[] = 
        "DNA_boid_types.h",
        "DNA_smoke_types.h",
        "DNA_speaker_types.h",
+       "DNA_movieclip_types.h",
+       "DNA_tracking_types.h",
 +      "DNA_freestyle_types.h",
 +      "DNA_linestyle_types.h",
  
        // empty string to indicate end of includefiles
        ""
@@@ -1198,6 -1198,6 +1200,8 @@@ int main(int argc, char ** argv
  #include "DNA_boid_types.h"
  #include "DNA_smoke_types.h"
  #include "DNA_speaker_types.h"
+ #include "DNA_movieclip_types.h"
+ #include "DNA_tracking_types.h"
 +#include "DNA_freestyle_types.h"
 +#include "DNA_linestyle_types.h"
  /* end of list */
Simple merge
index 00e7ab178dff7eaf48195b0d1d2058a1a3d81686,a137ddc6bc0b36c2c39cc33a42aba64d820d3d49..35513e1287233756e76d25fc1ea0bd0d82dd8ba5
@@@ -291,7 -292,7 +293,8 @@@ void RNA_def_main_armatures(BlenderRNA 
  void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop);
  void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop);
  void RNA_def_main_gpencil(BlenderRNA *brna, PropertyRNA *cprop);
+ void RNA_def_main_movieclips(BlenderRNA *brna, PropertyRNA *cprop);
 +void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop);
  
  /* ID Properties */
  
index 06b6816fcf1e7d13eba5c7b66881403486325627,be03da6839d0730ab2144a626db56663b6080a8f..2af4c04d1cee68ec82e6414cae40acda5986331c
@@@ -245,12 -245,12 +245,18 @@@ static void rna_Main_wm_begin(Collectio
        rna_iterator_listbase_begin(iter, &bmain->wm, NULL);
  }
  
+ static void rna_Main_movieclips_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+ {
+       Main *bmain= (Main*)ptr->data;
+       rna_iterator_listbase_begin(iter, &bmain->movieclip, NULL);
+ }
 +static void rna_Main_linestyle_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
 +{
 +      Main *bmain= (Main*)ptr->data;
 +      rna_iterator_listbase_begin(iter, &bmain->linestyle, NULL);
 +}
 +
  #ifdef UNIT_TEST
  
  static PointerRNA rna_Test_test_get(PointerRNA *ptr)
@@@ -313,7 -313,7 +319,8 @@@ void RNA_def_main(BlenderRNA *brna
                {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks", RNA_def_main_actions},
                {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks", RNA_def_main_particles},
                {"grease_pencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks", RNA_def_main_gpencil},
+               {"movieclips", "MovieClip", "rna_Main_movieclips_begin", "Movie Clips", "Movie Clip datablocks", RNA_def_main_movieclips},
 +              {"linestyles", "FreestyleLineStyle", "rna_Main_linestyle_begin", "Line Styles", "Line Style datablocks", RNA_def_main_linestyles},
                {NULL, NULL, NULL, NULL, NULL, NULL}};
  
        int i;
index dc106d4bcc9ec45303f1c1d7fc0bf46feb57ddbc,f568f6de855d007b032192085b43a08417f5bb99..e4d10137b14322c09d2c3e46e782c509505699c7
  #include "BKE_particle.h"
  #include "BKE_font.h"
  #include "BKE_node.h"
+ #include "BKE_depsgraph.h"
  #include "BKE_speaker.h"
+ #include "BKE_movieclip.h"
 +#include "BKE_linestyle.h"
  
  #include "DNA_armature_types.h"
  #include "DNA_camera_types.h"
@@@ -519,22 -523,26 +524,42 @@@ void rna_Main_particles_remove(Main *bm
        /* XXX python now has invalid pointer? */
  }
  
+ MovieClip *rna_Main_movieclip_load(Main *UNUSED(bmain), ReportList *reports, const char *filepath)
+ {
+       MovieClip *clip;
+       errno= 0;
+       clip= BKE_add_movieclip_file(filepath);
+       if(!clip)
+               BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s.", filepath, errno ? strerror(errno) : "Unable to load movie clip");
+       return clip;
+ }
+ void rna_Main_movieclips_remove(Main *bmain, MovieClip *clip)
+ {
+       unlink_movieclip(bmain, clip);
+       free_libblock(&bmain->movieclip, clip);
+       /* XXX python now has invalid pointer? */
+ }
 +FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char* name)
 +{
 +      FreestyleLineStyle *linestyle = FRS_new_linestyle(name, bmain);
 +      linestyle->id.us--;
 +      return linestyle;
 +}
 +void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, FreestyleLineStyle *linestyle)
 +{
 +      if(ID_REAL_USERS(linestyle) <= 0)
 +              free_libblock(&bmain->linestyle, linestyle);
 +      else
 +              BKE_reportf(reports, RPT_ERROR, "Line style \"%s\" must have zero users to be removed, found %d.", linestyle->id.name+2, ID_REAL_USERS(linestyle));
 +
 +      /* XXX python now has invalid pointer? */
 +}
 +
  /* tag functions, all the same */
  void rna_Main_cameras_tag(Main *bmain, int value) { tag_main_lb(&bmain->camera, value); }
  void rna_Main_scenes_tag(Main *bmain, int value) { tag_main_lb(&bmain->scene, value); }
@@@ -564,8 -572,35 +589,36 @@@ void rna_Main_armatures_tag(Main *bmain
  void rna_Main_actions_tag(Main *bmain, int value) { tag_main_lb(&bmain->action, value); }
  void rna_Main_particles_tag(Main *bmain, int value) { tag_main_lb(&bmain->particle, value); }
  void rna_Main_gpencil_tag(Main *bmain, int value) { tag_main_lb(&bmain->gpencil, value); }
+ void rna_Main_movieclips_tag(Main *bmain, int value) { tag_main_lb(&bmain->text, value); }
 +void rna_Main_linestyle_tag(Main *bmain, int value) { tag_main_lb(&bmain->linestyle, value); }
  
+ static int rna_Main_cameras_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_CA); }
+ static int rna_Main_scenes_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_SCE); }
+ static int rna_Main_objects_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_OB); }
+ static int rna_Main_materials_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_MA); }
+ static int rna_Main_node_groups_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_NT); }
+ static int rna_Main_meshes_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_ME); }
+ static int rna_Main_lamps_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_LA); }
+ static int rna_Main_libraries_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_LI); }
+ static int rna_Main_screens_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_SCR); }
+ static int rna_Main_window_managers_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_WM); }
+ static int rna_Main_images_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_IM); }
+ static int rna_Main_lattices_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_LT); }
+ static int rna_Main_curves_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_CU); }
+ static int rna_Main_metaballs_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_MB); }
+ static int rna_Main_fonts_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_VF); }
+ static int rna_Main_textures_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_TE); }
+ static int rna_Main_brushes_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_BR); }
+ static int rna_Main_worlds_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_WO); }
+ static int rna_Main_groups_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_GR); }
+ static int rna_Main_texts_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_TXT); }
+ static int rna_Main_speakers_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_SPK); }
+ static int rna_Main_sounds_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_SO); }
+ static int rna_Main_armatures_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_AR); }
+ static int rna_Main_actions_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_AC); }
+ static int rna_Main_particles_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_PA); }
+ static int rna_Main_gpencil_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_GD); }
  #else
  
  void RNA_api_main(StructRNA *srna)
@@@ -1324,33 -1485,42 +1503,68 @@@ void RNA_def_main_gpencil(BlenderRNA *b
        func= RNA_def_function(srna, "tag", "rna_Main_gpencil_tag");
        parm= RNA_def_boolean(func, "value", 0, "Value", "");
        RNA_def_property_flag(parm, PROP_REQUIRED);
+       prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+       RNA_def_property_boolean_funcs(prop, "rna_Main_gpencil_is_updated_get", NULL);
+ }
+ void RNA_def_main_movieclips(BlenderRNA *brna, PropertyRNA *cprop)
+ {
+       StructRNA *srna;
+       FunctionRNA *func;
+       PropertyRNA *parm;
+       RNA_def_property_srna(cprop, "BlendDataMovieClips");
+       srna= RNA_def_struct(brna, "BlendDataMovieClips", NULL);
+       RNA_def_struct_sdna(srna, "Main");
+       RNA_def_struct_ui_text(srna, "Main Movie Clips", "Collection of movie clips");
+       func= RNA_def_function(srna, "tag", "rna_Main_movieclips_tag");
+       parm= RNA_def_boolean(func, "value", 0, "Value", "");
+       RNA_def_property_flag(parm, PROP_REQUIRED);
+       func= RNA_def_function(srna, "remove", "rna_Main_movieclips_remove");
+       RNA_def_function_ui_description(func, "Remove a movie clip from the current blendfile.");
+       parm= RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to remove");
+       RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+       /* load func */
+       func= RNA_def_function(srna, "load", "rna_Main_movieclip_load");
+       RNA_def_function_flag(func, FUNC_USE_REPORTS);
+       RNA_def_function_ui_description(func, "Add a new movie clip to the main database from a file");
+       parm= RNA_def_string_file_path(func, "filepath", "Path", FILE_MAXDIR + FILE_MAXFILE, "", "path for the datablock");
+       RNA_def_property_flag(parm, PROP_REQUIRED);
+       /* return type */
+       parm= RNA_def_pointer(func, "clip", "MovieClip", "", "New movie clip datablock");
+       RNA_def_function_return(func, parm);
  }
  
 +void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop)
 +{
 +      StructRNA *srna;
 +      FunctionRNA *func;
 +      PropertyRNA *parm;
 +
 +      RNA_def_property_srna(cprop, "BlendDataLineStyles");
 +      srna= RNA_def_struct(brna, "BlendDataLineStyles", NULL);
 +      RNA_def_struct_sdna(srna, "Main");
 +      RNA_def_struct_ui_text(srna, "Main Line Styles", "Collection of line styles");
 +
 +      func= RNA_def_function(srna, "new", "rna_Main_linestyles_new");
 +      RNA_def_function_ui_description(func, "Add a new line style instance to the main database");
 +      parm= RNA_def_string(func, "name", "FreestyleLineStyle", 0, "", "New name for the datablock");
 +      RNA_def_property_flag(parm, PROP_REQUIRED);
 +      /* return type */
 +      parm= RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "New line style datablock");
 +      RNA_def_function_return(func, parm);
 +
 +      func= RNA_def_function(srna, "remove", "rna_Main_linestyles_remove");
 +      RNA_def_function_flag(func, FUNC_USE_REPORTS);
 +      RNA_def_function_ui_description(func, "Remove a line style instance from the current blendfile");
 +      parm= RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "Line style to remove");
 +      RNA_def_property_flag(parm, PROP_REQUIRED);
 +}
 +
  #endif
  
index 1456365ace224c25d35586acc0f512062950d9f2,ca325747d8ecbd3f461db8d52a79800ecf441547..24b704464682bbf5fbf81a69f29bf856cbb5dceb
@@@ -1063,49 -1074,15 +1077,58 @@@ static void rna_Scene_update_active_obj
        }
  }
  
+ static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+ {
+       Scene *scene= (Scene*)ptr->id.data;
+       Object *camera= scene->camera;
+       if(camera)
+               DAG_id_tag_update(&camera->id, 0);
+ }
 +static PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr)
 +{
 +      FreestyleLineSet *lineset= (FreestyleLineSet *)ptr->data;
 +
 +      return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineStyle, lineset->linestyle);
 +}
 +
 +static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value)
 +{
 +      FreestyleLineSet *lineset= (FreestyleLineSet*)ptr->data;
 +
 +      lineset->linestyle->id.us--;
 +      lineset->linestyle = (FreestyleLineStyle *)value.data;
 +      lineset->linestyle->id.us++;
 +}
 +
 +static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr)
 +{
 +      FreestyleConfig *config= (FreestyleConfig *)ptr->data;
 +      FreestyleLineSet *lineset= FRS_get_active_lineset(config);
 +      return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset);
 +}
 +
 +static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, int *min, int *max)
 +{
 +      FreestyleConfig *config= (FreestyleConfig *)ptr->data;
 +      *min= 0;
 +      *max= BLI_countlist(&config->linesets)-1;
 +      *max= MAX2(0, *max);
 +}
 +
 +static int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr)
 +{
 +      FreestyleConfig *config= (FreestyleConfig *)ptr->data;
 +      return FRS_get_active_lineset_index(config);
 +}
 +
 +static void rna_FreestyleSettings_active_lineset_index_set(PointerRNA *ptr, int value)
 +{
 +      FreestyleConfig *config= (FreestyleConfig *)ptr->data;
 +      FRS_set_active_lineset_index(config, value);
 +}
 +
  #else
  
  static void rna_def_transform_orientation(BlenderRNA *brna)
Simple merge
index 296e27dde6f000619762166812008350749f97e9,d4bd8f8a693acdca26f3c46ab4b70d537b3e841e..dacbb6c7a8921e9575f3f7f34216410033ec1992
  #include "MEM_guardedalloc.h"
  
  #include "BKE_animsys.h"      /* <------ should this be here?, needed for sequencer update */
+ #include "BKE_camera.h"
  #include "BKE_global.h"
  #include "BKE_image.h"
 +#include "BKE_library.h"
  #include "BKE_main.h"
  #include "BKE_node.h"
  #include "BKE_object.h"
index e983da476008915617334c7c49a17dca635ad720,4bc7aa4d689aa22f13f4a697b9645d0664ae9a3a..5ac36f5eacace8eb24845e3026e9813c6c60f620
@@@ -74,9 -73,9 +75,10 @@@ struct Object
  struct PBVHNode;
  struct Render;
  struct RenderEngine;
+ struct RenderEngineType;
  struct RenderLayer;
  struct RenderResult;
 +struct SceneRenderLayer;
  struct ScrArea;
  struct SculptSession;
  struct ShadeInput;
Simple merge
Simple merge