[Bf-blender-cvs] [915cc956baf] master: Cleanup: Rename soops to space_outliner

Nathan Craddock noreply at git.blender.org
Fri Aug 7 19:58:37 CEST 2020


Commit: 915cc956baff85d47387736ab367ab3774ee3353
Author: Nathan Craddock
Date:   Fri Aug 7 11:47:23 2020 -0600
Branches: master
https://developer.blender.org/rB915cc956baff85d47387736ab367ab3774ee3353

Cleanup: Rename soops to space_outliner

No functional changes. Rename soops, soutliner, and so to
space_outliner.

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

M	source/blender/blenkernel/intern/screen.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/versioning_250.c
M	source/blender/blenloader/intern/versioning_260.c
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/editors/include/ED_outliner.h
M	source/blender/editors/space_outliner/outliner_collections.c
M	source/blender/editors/space_outliner/outliner_dragdrop.c
M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/editors/space_outliner/outliner_edit.c
M	source/blender/editors/space_outliner/outliner_intern.h
M	source/blender/editors/space_outliner/outliner_select.c
M	source/blender/editors/space_outliner/outliner_sync.c
M	source/blender/editors/space_outliner/outliner_tools.c
M	source/blender/editors/space_outliner/outliner_tree.c
M	source/blender/editors/space_outliner/outliner_utils.c
M	source/blender/editors/space_outliner/space_outliner.c

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

diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index c510b3a2dfb..3a49c180172 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -159,15 +159,15 @@ void BKE_screen_foreach_id_screen_area(LibraryForeachIDData *data, ScrArea *area
         break;
       }
       case SPACE_OUTLINER: {
-        SpaceOutliner *so = (SpaceOutliner *)sl;
+        SpaceOutliner *space_outliner = (SpaceOutliner *)sl;
 
-        BKE_LIB_FOREACHID_PROCESS_ID(data, so->search_tse.id, IDWALK_CB_NOP);
+        BKE_LIB_FOREACHID_PROCESS_ID(data, space_outliner->search_tse.id, IDWALK_CB_NOP);
 
-        if (so->treestore != NULL) {
+        if (space_outliner->treestore != NULL) {
           TreeStoreElem *tselem;
           BLI_mempool_iter iter;
 
-          BLI_mempool_iternew(so->treestore, &iter);
+          BLI_mempool_iternew(space_outliner->treestore, &iter);
           while ((tselem = BLI_mempool_iterstep(&iter))) {
             BKE_LIB_FOREACHID_PROCESS_ID(data, tselem->id, IDWALK_CB_NOP);
           }
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index dc2eda7686b..f85e8d51778 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6964,31 +6964,31 @@ static void direct_link_area(BlendDataReader *reader, ScrArea *area)
       BLO_read_data_address(reader, &snla->ads);
     }
     else if (sl->spacetype == SPACE_OUTLINER) {
-      SpaceOutliner *soops = (SpaceOutliner *)sl;
+      SpaceOutliner *space_outliner = (SpaceOutliner *)sl;
 
       /* use newdataadr_no_us and do not free old memory avoiding double
        * frees and use of freed memory. this could happen because of a
        * bug fixed in revision 58959 where the treestore memory address
        * was not unique */
-      TreeStore *ts = newdataadr_no_us(reader->fd, soops->treestore);
-      soops->treestore = NULL;
+      TreeStore *ts = newdataadr_no_us(reader->fd, space_outliner->treestore);
+      space_outliner->treestore = NULL;
       if (ts) {
         TreeStoreElem *elems = newdataadr_no_us(reader->fd, ts->data);
 
-        soops->treestore = BLI_mempool_create(
+        space_outliner->treestore = BLI_mempool_create(
             sizeof(TreeStoreElem), ts->usedelem, 512, BLI_MEMPOOL_ALLOW_ITER);
         if (ts->usedelem && elems) {
           int i;
           for (i = 0; i < ts->usedelem; i++) {
-            TreeStoreElem *new_elem = BLI_mempool_alloc(soops->treestore);
+            TreeStoreElem *new_elem = BLI_mempool_alloc(space_outliner->treestore);
             *new_elem = elems[i];
           }
         }
         /* we only saved what was used */
-        soops->storeflag |= SO_TREESTORE_CLEANUP;  // at first draw
+        space_outliner->storeflag |= SO_TREESTORE_CLEANUP;  // at first draw
       }
-      soops->treehash = NULL;
-      soops->tree.first = soops->tree.last = NULL;
+      space_outliner->treehash = NULL;
+      space_outliner->tree.first = space_outliner->tree.last = NULL;
     }
     else if (sl->spacetype == SPACE_IMAGE) {
       SpaceImage *sima = (SpaceImage *)sl;
@@ -7215,20 +7215,20 @@ static void lib_link_area(BlendLibReader *reader, ID *parent_id, ScrArea *area)
         break;
       }
       case SPACE_OUTLINER: {
-        SpaceOutliner *so = (SpaceOutliner *)sl;
-        BLO_read_id_address(reader, NULL, &so->search_tse.id);
+        SpaceOutliner *space_outliner = (SpaceOutliner *)sl;
+        BLO_read_id_address(reader, NULL, &space_outliner->search_tse.id);
 
-        if (so->treestore) {
+        if (space_outliner->treestore) {
           TreeStoreElem *tselem;
           BLI_mempool_iter iter;
 
-          BLI_mempool_iternew(so->treestore, &iter);
+          BLI_mempool_iternew(space_outliner->treestore, &iter);
           while ((tselem = BLI_mempool_iterstep(&iter))) {
             BLO_read_id_address(reader, NULL, &tselem->id);
           }
-          if (so->treehash) {
+          if (space_outliner->treehash) {
             /* rebuild hash table, because it depends on ids too */
-            so->storeflag |= SO_TREESTORE_REBUILD;
+            space_outliner->storeflag |= SO_TREESTORE_REBUILD;
           }
         }
         break;
@@ -7787,15 +7787,16 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map,
           }
         }
         else if (sl->spacetype == SPACE_OUTLINER) {
-          SpaceOutliner *so = (SpaceOutliner *)sl;
+          SpaceOutliner *space_outliner = (SpaceOutliner *)sl;
 
-          so->search_tse.id = restore_pointer_by_name(id_map, so->search_tse.id, USER_IGNORE);
+          space_outliner->search_tse.id = restore_pointer_by_name(
+              id_map, space_outliner->search_tse.id, USER_IGNORE);
 
-          if (so->treestore) {
+          if (space_outliner->treestore) {
             TreeStoreElem *tselem;
             BLI_mempool_iter iter;
 
-            BLI_mempool_iternew(so->treestore, &iter);
+            BLI_mempool_iternew(space_outliner->treestore, &iter);
             while ((tselem = BLI_mempool_iterstep(&iter))) {
               /* Do not try to restore pointers to drivers/sequence/etc.,
                * can crash in undo case! */
@@ -7806,9 +7807,9 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map,
                 tselem->id = NULL;
               }
             }
-            if (so->treehash) {
+            if (space_outliner->treehash) {
               /* rebuild hash table, because it depends on ids too */
-              so->storeflag |= SO_TREESTORE_REBUILD;
+              space_outliner->storeflag |= SO_TREESTORE_REBUILD;
             }
           }
         }
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index bef37bdd960..0e753c84476 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -270,9 +270,9 @@ static void area_add_window_regions(ScrArea *area, SpaceLink *sl, ListBase *lb)
         break;
 
       case SPACE_OUTLINER: {
-        SpaceOutliner *soops = (SpaceOutliner *)sl;
+        SpaceOutliner *space_outliner = (SpaceOutliner *)sl;
 
-        memcpy(&region->v2d, &soops->v2d, sizeof(View2D));
+        memcpy(&region->v2d, &space_outliner->v2d, sizeof(View2D));
 
         region->v2d.scroll &= ~V2D_SCROLL_LEFT;
         region->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM);
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index 3f24a7f14ca..1ac90398c0a 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -2349,10 +2349,14 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
       for (area = screen->areabase.first; area; area = area->next) {
         for (sl = area->spacedata.first; sl; sl = sl->next) {
           if (sl->spacetype == SPACE_OUTLINER) {
-            SpaceOutliner *so = (SpaceOutliner *)sl;
-
-            if (!ELEM(so->outlinevis, SO_SCENES, SO_LIBRARIES, SO_SEQUENCE, SO_DATA_API)) {
-              so->outlinevis = SO_SCENES;
+            SpaceOutliner *space_outliner = (SpaceOutliner *)sl;
+
+            if (!ELEM(space_outliner->outlinevis,
+                      SO_SCENES,
+                      SO_LIBRARIES,
+                      SO_SEQUENCE,
+                      SO_DATA_API)) {
+              space_outliner->outlinevis = SO_SCENES;
             }
           }
         }
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 8bb04f8debf..4222df27cb7 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1282,20 +1282,20 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
       LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
         LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) {
           if (space->spacetype == SPACE_OUTLINER) {
-            SpaceOutliner *soutliner = (SpaceOutliner *)space;
+            SpaceOutliner *space_outliner = (SpaceOutliner *)space;
 
-            soutliner->outlinevis = SO_VIEW_LAYER;
+            space_outliner->outlinevis = SO_VIEW_LAYER;
 
             if (BLI_listbase_count_at_most(&layer->layer_collections, 2) == 1) {
-              if (soutliner->treestore == NULL) {
-                soutliner->treestore = BLI_mempool_create(
+              if (space_outliner->treestore == NULL) {
+                space_outliner->treestore = BLI_mempool_create(
                     sizeof(TreeStoreElem), 1, 512, BLI_MEMPOOL_ALLOW_ITER);
               }
 
               /* Create a tree store element for the collection. This is normally
                * done in check_persistent (outliner_tree.c), but we need to access
                * it here :/ (expand element if it's the only one) */
-              TreeStoreElem *tselem = BLI_mempool_calloc(soutliner->treestore);
+              TreeStoreElem *tselem = BLI_mempool_calloc(space_outliner->treestore);
               tselem->type = TSE_LAYER_COLLECTION;
               tselem->id = layer->layer_collections.first;
               tselem->nr = tselem->used = 0;
@@ -2025,15 +2025,15 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
         for (area = screen->areabase.first; area; area = area->next) {
           for (sl = area->spacedata.first; sl; sl = sl->next) {
             if (sl->spacetype == SPACE_OUTLINER) {
-              SpaceOutliner *so = (SpaceOutliner *)sl;
+              SpaceOutliner *space_outliner = (SpaceOutliner *)sl;
 
-              if (!ELEM(so->outlinevis,
+              if (!ELEM(space_outliner->outlinevis,
                         SO_SCENES,
                         SO_LIBRARIES,
                         SO_SEQUENCE,
                         SO_DATA_API,
                         SO_ID_ORPHANS)) {
-                so->outlinevis = SO_VIEW_LAYER;
+                space_outliner->outlinevis = SO_VIEW_LAYER;


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list