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_element.hh')
-rw-r--r--source/blender/editors/space_outliner/tree/tree_element.hh26
1 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_element.hh b/source/blender/editors/space_outliner/tree/tree_element.hh
index 1b145a48daa..71f64cfe610 100644
--- a/source/blender/editors/space_outliner/tree/tree_element.hh
+++ b/source/blender/editors/space_outliner/tree/tree_element.hh
@@ -18,6 +18,7 @@ struct SpaceOutliner;
namespace blender::ed::outliner {
struct TreeElement;
+class SubTree;
/* -------------------------------------------------------------------- */
/* Tree-Display Interface */
@@ -114,21 +115,28 @@ class AbstractTreeElement {
* TODO: this function needs to be split up! It's getting a bit too large...
*
* \note "ID" is not always a real ID.
- * \note If child items are only added to the tree if the item is open,
- * the `TSE_` type _must_ be added to #outliner_element_needs_rebuild_on_open_change().
+ * \note If child items are only added to the tree if the item is open, the `TSE_` type _must_ be
+ * added to #outliner_element_needs_rebuild_on_open_change().
*
+ * \param parent: The parent element to add the new element to. If this is null, the new element
+ * will be added to the root level of the tree.
* \param expand: If true, the element may add its own sub-tree. E.g. objects will list their
* animation data, object data, constraints, modifiers, ... This often adds visual
* noise, and can be expensive to add in big scenes. So prefer setting this to
* false.
*/
-struct TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
- ListBase *lb,
- void *idv,
- struct TreeElement *parent,
- short type,
- short index,
- const bool expand = true);
+TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
+ void *idv,
+ TreeElement *parent,
+ short type,
+ short index,
+ const bool expand = true);
+TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
+ void *idv,
+ SubTree &subtree,
+ short type,
+ short index,
+ const bool expand = true);
void tree_element_expand(const AbstractTreeElement &tree_element, SpaceOutliner &space_outliner);