Merge branch 'master' into blender2.8
authorKévin Dietrich <kevin.dietrich@mailoo.org>
Sat, 24 Feb 2018 13:02:50 +0000 (14:02 +0100)
committerKévin Dietrich <kevin.dietrich@mailoo.org>
Sat, 24 Feb 2018 13:02:50 +0000 (14:02 +0100)
Conflicts:
source/blender/blenkernel/BKE_blender_version.h

1  2 
release/scripts/startup/bl_ui/properties_physics_smoke.py
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenloader/intern/versioning_270.c
source/blender/makesrna/intern/rna_smoke.c

@@@ -1733,29 -1733,26 +1733,47 @@@ void blo_do_versions_270(FileData *fd, 
                for (Mesh *me = main->mesh.first; me; me = me->id.next) {
                        CustomData_set_layer_name(&me->vdata, CD_MDEFORMVERT, 0, "");
                }
 +
 +              if (!DNA_struct_elem_find(fd->filesdna, "View3DDebug", "char", "background")) {
 +                      bScreen *screen;
 +
 +                      for (screen = main->screen.first; screen; screen = screen->id.next) {
 +                              ScrArea *sa;
 +                              for (sa = screen->areabase.first; sa; sa = sa->next) {
 +                                      SpaceLink *sl;
 +
 +                                      for (sl = sa->spacedata.first; sl; sl = sl->next) {
 +                                              switch (sl->spacetype) {
 +                                                      case SPACE_VIEW3D:
 +                                                      {
 +                                                              View3D *v3d = (View3D *)sl;
 +                                                              v3d->debug.background = V3D_DEBUG_BACKGROUND_NONE;
 +                                                      }
 +                                              }
 +                                      }
 +                              }
 +                      }
 +              }
        }
  
+       if (!MAIN_VERSION_ATLEAST(main, 279, 3)) {
+               if (!DNA_struct_elem_find(fd->filesdna, "SmokeDomainSettings", "float", "clipping")) {
+                       Object *ob;
+                       ModifierData *md;
+                       for (ob = main->object.first; ob; ob = ob->id.next) {
+                               for (md = ob->modifiers.first; md; md = md->next) {
+                                       if (md->type == eModifierType_Smoke) {
+                                               SmokeModifierData *smd = (SmokeModifierData *)md;
+                                               if (smd->domain) {
+                                                       smd->domain->clipping = 1e-3f;
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
        {
                /* Fix for invalid state of screen due to bug in older versions. */
                for (bScreen *sc = main->screen.first; sc; sc = sc->id.next) {