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:
Diffstat (limited to 'source/blender/editors/space_outliner/tree/tree_display_view_layer.cc')
-rw-r--r--source/blender/editors/space_outliner/tree/tree_display_view_layer.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
index a0ebac5f451..89c9960a24f 100644
--- a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
+++ b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
@@ -80,7 +80,7 @@ ListBase TreeDisplayViewLayer::buildTree(const TreeSourceData &source_data)
/* Show objects in the view layer. */
for (Base *base : List<Base>(view_layer_->object_bases)) {
TreeElement *te_object = outliner_add_element(
- &space_outliner_, &tree, base->object, nullptr, 0, 0);
+ &space_outliner_, &tree, base->object, nullptr, TSE_SOME_ID, 0);
te_object->directdata = base;
}
@@ -158,7 +158,7 @@ void TreeDisplayViewLayer::add_layer_collection_objects(ListBase &tree,
for (CollectionObject *cob : List<CollectionObject>(lc.collection->gobject)) {
Base *base = BKE_view_layer_base_find(view_layer_, cob->ob);
TreeElement *te_object = outliner_add_element(
- &space_outliner_, &tree, base->object, &ten, 0, 0);
+ &space_outliner_, &tree, base->object, &ten, TSE_SOME_ID, 0);
te_object->directdata = base;
}
}
@@ -203,7 +203,7 @@ void ObjectsChildrenBuilder::object_tree_elements_lookup_create_recursive(TreeEl
continue;
}
- if (tselem->type == 0 && te->idcode == ID_OB) {
+ if ((tselem->type == TSE_SOME_ID) && (te->idcode == ID_OB)) {
Object *ob = (Object *)tselem->id;
/* Lookup children or add new, empty children vector. */
Vector<TreeElement *> &tree_elements = object_tree_elements_map_.lookup_or_add(ob, {});
@@ -261,8 +261,12 @@ void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections()
if (!found) {
/* We add the child in the tree even if it is not in the collection.
* We deliberately clear its sub-tree though, to make it less prominent. */
- TreeElement *child_ob_tree_element = outliner_add_element(
- &outliner_, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0);
+ TreeElement *child_ob_tree_element = outliner_add_element(&outliner_,
+ &parent_ob_tree_element->subtree,
+ child,
+ parent_ob_tree_element,
+ TSE_SOME_ID,
+ 0);
outliner_free_tree(&child_ob_tree_element->subtree);
child_ob_tree_element->flag |= TE_CHILD_NOT_IN_COLLECTION;
child_ob_tree_elements.append(child_ob_tree_element);