Commit: f3e5c728162e75690559fd94547784a4d4cf8e8f
Author: Julian Eisel
Date:   Thu Jun 1 18:17:22 2017 +0200
Branches: workspaces
https://developer.blender.org/rBf3e5c728162e75690559fd94547784a4d4cf8e8f

Move version patches from blender2.8 into version-checked blocks

Need to do that because of bumped subversion. Didn't do earlier to avoid
merge conflicts.

===================================================================

M       source/blender/blenloader/intern/versioning_280.c
M       source/blender/editors/interface/resources.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_280.c 
b/source/blender/blenloader/intern/versioning_280.c
index b168ecad832..2d14238eb6f 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -297,11 +297,9 @@ void do_versions_after_linking_280(Main *main)
                }
        }
 
-       {
-               /* New workspace design */
-               if (!MAIN_VERSION_ATLEAST(main, 280, 1)) {
-                       do_version_workspaces_after_lib_link(main);
-               }
+       /* New workspace design */
+       if (!MAIN_VERSION_ATLEAST(main, 280, 1)) {
+               do_version_workspaces_after_lib_link(main);
        }
 }
 
@@ -344,34 +342,35 @@ void blo_do_versions_280(FileData *fd, Library 
*UNUSED(lib), Main *main)
                                }
                        }
                }
-
        }
 
-       if (!DNA_struct_elem_find(fd->filesdna, "GPUDOFSettings", "float", 
"ratio"))    {
-               for (Camera *ca = main->camera.first; ca; ca = ca->id.next) {
-                       ca->gpu_dof.ratio = 1.0f;
+       if (!MAIN_VERSION_ATLEAST(main, 280, 1)) {
+               if (!DNA_struct_elem_find(fd->filesdna, "GPUDOFSettings", 
"float", "ratio"))    {
+                       for (Camera *ca = main->camera.first; ca; ca = 
ca->id.next) {
+                               ca->gpu_dof.ratio = 1.0f;
+                       }
                }
-       }
 
-       if (!DNA_struct_elem_find(fd->filesdna, "SceneLayer", "IDProperty", 
"*properties")) {
-               for (Scene *scene = main->scene.first; scene; scene = 
scene->id.next) {
-                       for (SceneLayer *sl = scene->render_layers.first; sl; 
sl = sl->next) {
-                               IDPropertyTemplate val = {0};
-                               sl->properties = IDP_New(IDP_GROUP, &val, 
ROOT_PROP);
-                               
BKE_scene_layer_engine_settings_create(sl->properties);
+               if (!DNA_struct_elem_find(fd->filesdna, "SceneLayer", 
"IDProperty", "*properties")) {
+                       for (Scene *scene = main->scene.first; scene; scene = 
scene->id.next) {
+                               for (SceneLayer *sl = 
scene->render_layers.first; sl; sl = sl->next) {
+                                       IDPropertyTemplate val = {0};
+                                       sl->properties = IDP_New(IDP_GROUP, 
&val, ROOT_PROP);
+                                       
BKE_scene_layer_engine_settings_create(sl->properties);
+                               }
                        }
                }
-       }
 
-       /* MTexPoly now removed. */
-       if (DNA_struct_find(fd->filesdna, "MTexPoly")) {
-               const int cd_mtexpoly = 15;  /* CD_MTEXPOLY, deprecated */
-               for (Mesh *me = main->mesh.first; me; me = me->id.next) {
-                       /* If we have UV's, so this file will have MTexPoly 
layers too! */
-                       if (me->mloopuv != NULL) {
-                               CustomData_update_typemap(&me->pdata);
-                               CustomData_free_layers(&me->pdata, cd_mtexpoly, 
me->totpoly);
-                               BKE_mesh_update_customdata_pointers(me, false);
+               /* MTexPoly now removed. */
+               if (DNA_struct_find(fd->filesdna, "MTexPoly")) {
+                       const int cd_mtexpoly = 15;  /* CD_MTEXPOLY, deprecated 
*/
+                       for (Mesh *me = main->mesh.first; me; me = me->id.next) 
{
+                               /* If we have UV's, so this file will have 
MTexPoly layers too! */
+                               if (me->mloopuv != NULL) {
+                                       CustomData_update_typemap(&me->pdata);
+                                       CustomData_free_layers(&me->pdata, 
cd_mtexpoly, me->totpoly);
+                                       BKE_mesh_update_customdata_pointers(me, 
false);
+                               }
                        }
                }
        }
diff --git a/source/blender/editors/interface/resources.c 
b/source/blender/editors/interface/resources.c
index e8eda567a4a..09ec08fe265 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -2899,13 +2899,7 @@ void init_userdef_do_versions(void)
                        btheme->ttime.time_keyframe[3] = 
btheme->ttime.time_gp_keyframe[3] = 255;
                }
        }
-
-       /**
-        * Include next version bump.
-        *
-        * (keep this block even if it becomes empty).
-        */
-       {
+       if (!USER_VERSION_ATLEAST(280, 1)) {
                /* interface_widgets.c */
                struct uiWidgetColors wcol_tab = {
                        {255, 255, 255, 255},
@@ -2925,6 +2919,15 @@ void init_userdef_do_versions(void)
                }
        }
 
+       /**
+        * Include next version bump.
+        *
+        * (keep this block even if it becomes empty).
+        */
+       {
+               
+       }
+
        if (U.pixelsize == 0.0f)
                U.pixelsize = 1.0f;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to