diff options
author | Julian Eisel <julian@blender.org> | 2020-12-04 21:43:33 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-12-04 22:00:45 +0300 |
commit | 3daf28388b7372208cbec870f51b37be3aeac1e9 (patch) | |
tree | c4641fa492499eb355c4c37c8418f4d0791c3c66 /source/blender/blenkernel/intern/screen.c | |
parent | f5eaf67e34df088a2f0a19c744be7f8a51e7d9be (diff) |
Cleanup: Move Outliner runtime hash into internal runtime struct, out of DNA
This way Outliner internal data stays internal, non-Outliner code will not be
able to access and mess with this. Further it allows us to use the real type
(rather than `void *`), change the type to a C++ container if needed and
slightly reduces the size for every Outliner stored in files.
Slightly changed how we set the `SO_TREESTORE_REBUILD` for this, but it should
effectively behave the same way as before.
Diffstat (limited to 'source/blender/blenkernel/intern/screen.c')
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 97bef99944a..355db8f0d60 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -1561,7 +1561,6 @@ static void direct_link_area(BlendDataReader *reader, ScrArea *area) /* we only saved what was used */ space_outliner->storeflag |= SO_TREESTORE_CLEANUP; /* at first draw */ } - space_outliner->treehash = NULL; space_outliner->tree.first = space_outliner->tree.last = NULL; space_outliner->runtime = NULL; } @@ -1825,10 +1824,8 @@ void BKE_screen_area_blend_read_lib(BlendLibReader *reader, ID *parent_id, ScrAr while ((tselem = BLI_mempool_iterstep(&iter))) { BLO_read_id_address(reader, NULL, &tselem->id); } - if (space_outliner->treehash) { - /* rebuild hash table, because it depends on ids too */ - space_outliner->storeflag |= SO_TREESTORE_REBUILD; - } + /* rebuild hash table, because it depends on ids too */ + space_outliner->storeflag |= SO_TREESTORE_REBUILD; } break; } |