Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 23 Feb 2017 09:56:28 +0000 (10:56 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 23 Feb 2017 09:56:28 +0000 (10:56 +0100)
1  2 
source/blender/blenkernel/intern/mesh.c
source/blender/blenloader/intern/versioning_270.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/curve/editcurve.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/modifiers/intern/MOD_displace.c
source/creator/creator_args.c

index 3bd84c5f5cfa1a8a693f06b878945b0309b7dd36,7106cf607212a10f9e8dbf45a6c1daa43b9258a5..12045dfdb83f194950473e244ec74043752ec5fd
@@@ -1575,30 -1575,30 +1575,53 @@@ void blo_do_versions_270(FileData *fd, 
                        }
                }
  
+               /* Fix for T50736, Glare comp node using same var for two different things. */
+               if (!DNA_struct_elem_find(fd->filesdna, "NodeGlare", "char", "star_45")) {
+                       FOREACH_NODETREE(main, ntree, id) {
+                               if (ntree->type == NTREE_COMPOSIT) {
+                                       ntreeSetTypes(NULL, ntree);
+                                       for (bNode *node = ntree->nodes.first; node; node = node->next) {
+                                               if (node->type == CMP_NODE_GLARE) {
+                                                       NodeGlare *ndg = node->storage;
+                                                       switch (ndg->type) {
+                                                               case 2:  /* Grrrr! magic numbers :( */
+                                                                       ndg->streaks = ndg->angle;
+                                                                       break;
+                                                               case 0:
+                                                                       ndg->star_45 = ndg->angle != 0;
+                                                                       break;
+                                                               default:
+                                                                       break;
+                                                       }
+                                               }
+                                       }
+                               }
+                       } FOREACH_NODETREE_END
+               }
        }
 +
 +      {
 +              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;
 +                                                      }
 +                                              }
 +                                      }
 +                              }
 +                      }
 +              }
 +      }
  }
  
  void do_versions_after_linking_270(Main *main)
Simple merge