svn merge ^/trunk/blender -r46979:47003
authorCampbell Barton <ideasman42@gmail.com>
Fri, 25 May 2012 09:42:58 +0000 (09:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 25 May 2012 09:42:58 +0000 (09:42 +0000)
1  2 
source/blender/blenloader/intern/readfile.c
source/blender/editors/transform/transform_conversions.c
source/blender/makesrna/intern/rna_space.c

index 4ea7da44f11e4d577dccf408e2ae81fbbfc13b38,352e9d57489f474886e2f50213b1beeadb86e422..207223126bd3ef8c18276dcccf71fefe18d12a21
@@@ -7584,65 -7499,25 +7584,84 @@@ static void do_versions(FileData *fd, L
                        do_versions_nodetree_frame_2_64_6(ntree);
        }
  
 -      
+       if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 7))
+       {
+               Object *ob;
+               for (ob = main->object.first; ob; ob = ob->id.next) {
+                       ModifierData *md;
+                       for (md = ob->modifiers.first; md; md = md->next) {
+                               if (md->type == eModifierType_Smoke) {
+                                       SmokeModifierData *smd = (SmokeModifierData *)md;
+                                       if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain) {
+                                               int maxres = MAX3(smd->domain->res[0], smd->domain->res[1], smd->domain->res[2]);
+                                               smd->domain->scale = smd->domain->dx * maxres;
+                                               smd->domain->dx = 1.0f / smd->domain->scale;
+                                       }
+                               }
+                       }
+               }
+       }
++
 +      {
 +              MovieClip *clip;
 +              bScreen *sc;
 +
 +              for (clip = main->movieclip.first; clip; clip = clip->id.next) {
 +                      MovieTrackingTrack *track;
 +
 +                      track = clip->tracking.tracks.first;
 +                      while (track) {
 +                              int i;
 +
 +                              for (i = 0; i < track->markersnr; i++) {
 +                                      MovieTrackingMarker *marker = &track->markers[i];
 +
 +                                      if (is_zero_v2(marker->pattern_corners[0]) && is_zero_v2(marker->pattern_corners[1]) &&
 +                                          is_zero_v2(marker->pattern_corners[3]) && is_zero_v2(marker->pattern_corners[3]))
 +                                      {
 +                                              marker->pattern_corners[0][0] = track->pat_min[0];
 +                                              marker->pattern_corners[0][1] = track->pat_min[1];
 +
 +                                              marker->pattern_corners[1][0] = track->pat_max[0];
 +                                              marker->pattern_corners[1][1] = track->pat_min[1];
 +
 +                                              marker->pattern_corners[2][0] = track->pat_max[0];
 +                                              marker->pattern_corners[2][1] = track->pat_max[1];
 +
 +                                              marker->pattern_corners[3][0] = track->pat_min[0];
 +                                              marker->pattern_corners[3][1] = track->pat_max[1];
 +                                      }
 +
 +                                      if (is_zero_v2(marker->search_min) && is_zero_v2(marker->search_max)) {
 +                                              copy_v2_v2(marker->search_min, track->search_min);
 +                                              copy_v2_v2(marker->search_max, track->search_max);
 +                                      }
 +                              }
 +
 +                              track = track->next;
 +                      }
 +              }
 +
 +              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_CLIP) {
 +                                              SpaceClip *sclip = (SpaceClip *)sl;
 +
 +                                              if (sclip->around == 0) {
 +                                                      sclip->around = V3D_CENTROID;
 +                                              }
 +                                      }
 +                              }
 +                      }
 +              }
 +      }
 +
        /* 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! */
        {