diff options
author | Julian Eisel <julian@blender.org> | 2022-09-07 13:05:56 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-09-07 13:05:56 +0300 |
commit | ee3d36f78a59ebde397962d97fde4a4137f3aada (patch) | |
tree | bea7dd512699511ef0aeba78f042e282080187b8 /source/blender/editors/space_outliner/tree/tree_element.hh | |
parent | 788952705c623d3748c6e46fa244b63bd9209717 (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_element.hh')
-rw-r--r-- | source/blender/editors/space_outliner/tree/tree_element.hh | 26 |
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); |