[Bf-blender-cvs] [e3d90abac7e] master: Fix: Outliner gsoc versioning

Nathan Craddock noreply at git.blender.org
Sun Aug 18 03:25:32 CEST 2019


Commit: e3d90abac7ecad6285b31282524bcde4b0dd12dc
Author: Nathan Craddock
Date:   Sat Aug 17 17:42:00 2019 -0600
Branches: master
https://developer.blender.org/rBe3d90abac7ecad6285b31282524bcde4b0dd12dc

Fix: Outliner gsoc versioning

Move outliner versioning for syncing and themes to the block
for the next subversion bump. It was not moved from the first
location it was placed in the soc-2019-outliner branch.

Old files will now load with synced selection enabled reliably.

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

M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/blenloader/intern/versioning_userdef.c

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

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 1d993185ac7..149b02e7761 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3644,19 +3644,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
     LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) {
       arm->flag &= ~(ARM_FLAG_UNUSED_6);
     }
-
-    /* Marks each outliner as dirty so a sync will occur as an outliner draws. */
-    for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
-      for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
-        for (SpaceLink *space = sa->spacedata.first; space; space = space->next) {
-          if (space->spacetype == SPACE_OUTLINER) {
-            SpaceOutliner *soutliner = (SpaceOutliner *)space;
-            soutliner->sync_select_dirty |= WM_OUTLINER_SYNC_SELECT_FROM_ALL;
-            soutliner->flag |= SO_SYNC_SELECT;
-          }
-        }
-      }
-    }
   }
 
   if (!MAIN_VERSION_ATLEAST(bmain, 281, 1)) {
@@ -3691,6 +3678,12 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
               ar->alignment = RGN_ALIGN_RIGHT;
             }
           }
+          /* Mark outliners as dirty for syncing and enable synced selection */
+          if (sl->spacetype == SPACE_OUTLINER) {
+            SpaceOutliner *soutliner = (SpaceOutliner *)sl;
+            soutliner->sync_select_dirty |= WM_OUTLINER_SYNC_SELECT_FROM_ALL;
+            soutliner->flag |= SO_SYNC_SELECT;
+          }
         }
       }
     }
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index b01d2765963..1284f2dcddc 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -141,13 +141,12 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
     FROM_DEFAULT_V4_UCHAR(space_outliner.row_alternate);
   }
 
-  FROM_DEFAULT_V4_UCHAR(space_outliner.selected_highlight);
-  FROM_DEFAULT_V4_UCHAR(space_outliner.active);
-
   /**
    * Include next version bump.
    */
   {
+    FROM_DEFAULT_V4_UCHAR(space_outliner.selected_highlight);
+    FROM_DEFAULT_V4_UCHAR(space_outliner.active);
   }
 
 #undef FROM_DEFAULT_V4_UCHAR



More information about the Bf-blender-cvs mailing list