Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2022-09-07 13:05:56 +0300
committerJulian Eisel <julian@blender.org>2022-09-07 13:05:56 +0300
commitee3d36f78a59ebde397962d97fde4a4137f3aada (patch)
treebea7dd512699511ef0aeba78f042e282080187b8 /source/blender/editors/space_outliner/tree/tree_display_orphaned.cc
parent788952705c623d3748c6e46fa244b63bd9209717 (diff)
Outliner: Initial (half working) port to new element storagetemp-outliner-new-element-storage
Basicaly the idea is to have a C++ class to better manage the runtime tree element storage and access. This branch doesn't even compile yet, it's just an early experiment so far that I don't only want to keep locally.
Diffstat (limited to 'source/blender/editors/space_outliner/tree/tree_display_orphaned.cc')
-rw-r--r--source/blender/editors/space_outliner/tree/tree_display_orphaned.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_display_orphaned.cc b/source/blender/editors/space_outliner/tree/tree_display_orphaned.cc
index d5ecfd4edf3..d7885bb1aa6 100644
--- a/source/blender/editors/space_outliner/tree/tree_display_orphaned.cc
+++ b/source/blender/editors/space_outliner/tree/tree_display_orphaned.cc
@@ -27,9 +27,9 @@ TreeDisplayIDOrphans::TreeDisplayIDOrphans(SpaceOutliner &space_outliner)
{
}
-ListBase TreeDisplayIDOrphans::buildTree(const TreeSourceData &source_data)
+SubTree TreeDisplayIDOrphans::buildTree(const TreeSourceData &source_data)
{
- ListBase tree = {nullptr};
+ SubTree tree;
ListBase *lbarray[INDEX_ID_MAX];
short filter_id_type = (space_outliner_.filter & SO_FILTER_ID_TYPE) ?
space_outliner_.filter_id_type :
@@ -56,7 +56,7 @@ ListBase TreeDisplayIDOrphans::buildTree(const TreeSourceData &source_data)
TreeElement *te = nullptr;
if (!filter_id_type) {
ID *id = (ID *)lbarray[a]->first;
- te = outliner_add_element(&space_outliner_, &tree, lbarray[a], nullptr, TSE_ID_BASE, 0);
+ te = outliner_add_element(&space_outliner_, lbarray[a], tree, TSE_ID_BASE, 0);
te->directdata = lbarray[a];
te->name = outliner_idcode_to_plural(GS(id->name));
}
@@ -64,8 +64,7 @@ ListBase TreeDisplayIDOrphans::buildTree(const TreeSourceData &source_data)
/* Add the orphaned data-blocks - these will not be added with any subtrees attached. */
for (ID *id : List<ID>(lbarray[a])) {
if (ID_REAL_USERS(id) <= 0) {
- outliner_add_element(
- &space_outliner_, (te) ? &te->subtree : &tree, id, te, TSE_SOME_ID, 0);
+ outliner_add_element(&space_outliner_, id, te ? te->child_elements : tree, TSE_SOME_ID, 0);
}
}
}