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>2020-11-07 22:13:37 +0300
committerJulian Eisel <julian@blender.org>2020-11-11 21:08:56 +0300
commit44d8fafd7f0d4f17f1e4c79ec5f9b6154d9bd57c (patch)
tree5ee271cf60843dc3112142ac9f07825c0b6e06e1 /source/blender/editors/space_outliner/tree/tree_view.hh
parentad0c387fdf6ed8bfdaedb7f40717ce1811c5680a (diff)
UI Code Quality: Convert Outliner Blender File mode to new tree buiding design
See https://developer.blender.org/D9499. Also: * Add `space_outliner/tree/common.cc` for functions shared between display modes. * I had to add a cast to `ListBaseWrapper` to make it work with ID lists. * Cleanup: Remove internal `Tree` alias for `ListBase`. That was more confusing than helpful.
Diffstat (limited to 'source/blender/editors/space_outliner/tree/tree_view.hh')
-rw-r--r--source/blender/editors/space_outliner/tree/tree_view.hh23
1 files changed, 19 insertions, 4 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh
index a4ce0ce6e78..cb3bb4681c8 100644
--- a/source/blender/editors/space_outliner/tree/tree_view.hh
+++ b/source/blender/editors/space_outliner/tree/tree_view.hh
@@ -36,8 +36,6 @@ namespace blender {
namespace ed {
namespace outliner {
-using Tree = ListBase;
-
/* -------------------------------------------------------------------- */
/* Tree-View Interface */
@@ -60,7 +58,7 @@ class AbstractTreeView {
* Build a tree for this view with the Blender context data given in \a source_data and the view
* settings in \a space_outliner.
*/
- virtual Tree buildTree(const TreeSourceData &source_data) = 0;
+ virtual ListBase buildTree(const TreeSourceData &source_data) = 0;
protected:
/** All derived classes will need a handle to this, so storing it in the base for convenience. */
@@ -80,7 +78,7 @@ class TreeViewViewLayer final : public AbstractTreeView {
public:
TreeViewViewLayer(SpaceOutliner &space_outliner);
- Tree buildTree(const TreeSourceData &source_data) override;
+ ListBase buildTree(const TreeSourceData &source_data) override;
private:
void add_view_layer(ListBase &, TreeElement &);
@@ -89,6 +87,21 @@ class TreeViewViewLayer final : public AbstractTreeView {
void add_layer_collection_objects_children(TreeElement &);
};
+/* -------------------------------------------------------------------- */
+/* Library Tree-View */
+
+/**
+ * \brief Tree-View for the Libraries display mode.
+ */
+class TreeViewLibraries final : public AbstractTreeView {
+ public:
+ TreeViewLibraries(SpaceOutliner &space_outliner);
+
+ ListBase buildTree(const TreeSourceData &source_data) override;
+
+ private:
+};
+
} // namespace outliner
} // namespace ed
} // namespace blender
@@ -126,6 +139,8 @@ struct TreeElement *outliner_add_element(struct SpaceOutliner *space_outliner,
short index);
void outliner_make_object_parent_hierarchy(ListBase *lb);
+const char *outliner_idcode_to_plural(short idcode);
+
#ifdef __cplusplus
}
#endif