[Bf-blender-cvs] [fccf729f095] soc-2019-outliner: Outliner: ensure all outliners start drawn synced

Nathan Craddock noreply at git.blender.org
Tue Aug 6 05:01:14 CEST 2019


Commit: fccf729f09548ae66ff85ceac5adad313fb73e3a
Author: Nathan Craddock
Date:   Mon Aug 5 12:31:25 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rBfccf729f09548ae66ff85ceac5adad313fb73e3a

Outliner: ensure all outliners start drawn synced

Adds flag setting for versioning and space duplicate and new
to sync each outliner on first draw and set synced selection to
the state of the duplicated outliner, or toggled on if creating
a new outliner.

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

M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/editors/space_outliner/space_outliner.c

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

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 1b5244b026e..f9820a663a4 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3538,7 +3538,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
         for (SpaceLink *space = sa->spacedata.first; space; space = space->next) {
           if (space->spacetype == SPACE_OUTLINER) {
             SpaceOutliner *soutliner = (SpaceOutliner *)space;
-            soutliner->flag |= SO_IS_DIRTY | SO_SYNC_SELECT;
+            soutliner->sync_flag |= SO_SYNC_ALL;
+            soutliner->flag |= SO_SYNC_SELECT;
           }
         }
       }
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 43f2b22410c..34a3a3f9ad8 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -302,7 +302,8 @@ static SpaceLink *outliner_new(const ScrArea *UNUSED(area), const Scene *UNUSED(
   soutliner->filter_id_type = ID_GR;
   soutliner->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_HIDE;
   soutliner->outlinevis = SO_VIEW_LAYER;
-  soutliner->flag |= SO_IS_DIRTY | SO_SYNC_SELECT;
+  soutliner->sync_flag |= SO_SYNC_ALL;
+  soutliner->flag |= SO_SYNC_SELECT;
 
   /* header */
   ar = MEM_callocN(sizeof(ARegion), "header for outliner");
@@ -348,6 +349,9 @@ static SpaceLink *outliner_duplicate(SpaceLink *sl)
   soutlinern->treestore = NULL;
   soutlinern->treehash = NULL;
 
+  soutlinern->flag |= (soutliner->flag & SO_SYNC_SELECT);
+  soutlinern->sync_flag = SO_SYNC_ALL;
+
   return (SpaceLink *)soutlinern;
 }



More information about the Bf-blender-cvs mailing list