diff options
author | Julian Eisel <julian@blender.org> | 2022-08-24 20:45:48 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-08-24 21:10:15 +0300 |
commit | b19c51c7f42ea8940ff456a4b3945e905c4e3d5a (patch) | |
tree | 8f270b31041bebcb04308f16243ae268cc6b1ec0 /source/blender/editors | |
parent | ce1f401b42fa2f87e985d31042f867333ec0237b (diff) |
Cleanup: Move outliner types to namespace, avoid C-style type definition
With C++ we should transition towards namespaces to avoid naming
collisions. Having the namespace in place is the first step for that
transition.
Plus, the `typedef` isn't necessary for struct/class/enum definitions
in C++, so avoid the verbosity it adds.
Diffstat (limited to 'source/blender/editors')
21 files changed, 117 insertions, 68 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.cc b/source/blender/editors/space_outliner/outliner_collections.cc index 02d54e4f702..836ad3e3f93 100644 --- a/source/blender/editors/space_outliner/outliner_collections.cc +++ b/source/blender/editors/space_outliner/outliner_collections.cc @@ -38,6 +38,8 @@ #include "outliner_intern.hh" /* own include */ +namespace blender::ed::outliner { + /* -------------------------------------------------------------------- */ /** \name Utility API * \{ */ @@ -122,8 +124,12 @@ TreeTraversalAction outliner_find_selected_objects(TreeElement *te, void *custom return TRAVERSE_CONTINUE; } +} // namespace blender::ed::outliner + void ED_outliner_selected_objects_get(const bContext *C, ListBase *objects) { + using namespace blender::ed::outliner; + SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); struct IDsSelectedData data = {{nullptr}}; outliner_tree_traverse(space_outliner, @@ -140,12 +146,16 @@ void ED_outliner_selected_objects_get(const bContext *C, ListBase *objects) BLI_freelistN(&data.selected_array); } +namespace blender::ed::outliner { + /** \} */ /* -------------------------------------------------------------------- */ /** \name Poll Functions * \{ */ +} // namespace blender::ed::outliner + bool ED_outliner_collections_editor_poll(bContext *C) { SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); @@ -153,6 +163,8 @@ bool ED_outliner_collections_editor_poll(bContext *C) ELEM(space_outliner->outlinevis, SO_VIEW_LAYER, SO_SCENES, SO_LIBRARIES); } +namespace blender::ed::outliner { + static bool outliner_view_layer_collections_editor_poll(bContext *C) { SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); @@ -1636,3 +1648,5 @@ void OUTLINER_OT_collection_color_tag_set(wmOperatorType *ot) } /** \} */ + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_context.cc b/source/blender/editors/space_outliner/outliner_context.cc index 1a804cb58b8..001bda57fa2 100644 --- a/source/blender/editors/space_outliner/outliner_context.cc +++ b/source/blender/editors/space_outliner/outliner_context.cc @@ -14,7 +14,7 @@ #include "outliner_intern.hh" #include "tree/tree_iterator.hh" -using namespace blender::ed::outliner; +namespace blender::ed::outliner { static void outliner_context_selected_ids_recursive(const SpaceOutliner &space_outliner, bContextDataResult *result) @@ -55,3 +55,5 @@ int /*eContextResult*/ outliner_context(const bContext *C, return CTX_RESULT_MEMBER_NOT_FOUND; } + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.cc b/source/blender/editors/space_outliner/outliner_dragdrop.cc index 2fa512b4006..81224fb6a2b 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.cc +++ b/source/blender/editors/space_outliner/outliner_dragdrop.cc @@ -45,6 +45,8 @@ #include "outliner_intern.hh" +namespace blender::ed::outliner { + static Collection *collection_parent_from_ID(ID *id); /* -------------------------------------------------------------------- */ @@ -1592,3 +1594,5 @@ void outliner_dropboxes(void) } /** \} */ + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 3201d8bc3a3..7004f4cec61 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -74,8 +74,7 @@ #include "tree/tree_element_rna.hh" #include "tree/tree_iterator.hh" -using namespace blender; -using namespace blender::ed::outliner; +namespace blender::ed::outliner { /* -------------------------------------------------------------------- */ /** \name Tree Size Functions @@ -3994,3 +3993,5 @@ void draw_outliner(const bContext *C) } /** \} */ + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_edit.cc b/source/blender/editors/space_outliner/outliner_edit.cc index 37008889d06..712684624f7 100644 --- a/source/blender/editors/space_outliner/outliner_edit.cc +++ b/source/blender/editors/space_outliner/outliner_edit.cc @@ -65,6 +65,8 @@ using namespace blender::ed::outliner; +namespace blender::ed::outliner { + static void outliner_show_active(SpaceOutliner *space_outliner, ARegion *region, TreeElement *te, @@ -2230,3 +2232,5 @@ void OUTLINER_OT_orphans_purge(wmOperatorType *ot) } /** \} */ + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_intern.hh b/source/blender/editors/space_outliner/outliner_intern.hh index 684d665ff3d..47b3dbe6152 100644 --- a/source/blender/editors/space_outliner/outliner_intern.hh +++ b/source/blender/editors/space_outliner/outliner_intern.hh @@ -14,10 +14,6 @@ /* Needed for `tree_element_cast()`. */ #include "tree/tree_element.hh" -#ifdef __cplusplus -extern "C" { -#endif - /* internal exports only */ struct ARegion; @@ -27,7 +23,6 @@ struct ListBase; struct Main; struct Object; struct Scene; -struct TreeElement; struct TreeStoreElem; struct ViewLayer; struct bContext; @@ -37,22 +32,23 @@ struct View2D; struct wmKeyConfig; struct wmOperatorType; -namespace blender::ed::outliner { -class AbstractTreeDisplay; -class AbstractTreeElement; -} // namespace blender::ed::outliner - namespace blender::bke::outliner::treehash { class TreeHash; } -namespace outliner = blender::ed::outliner; +namespace blender::ed::outliner { + +class AbstractTreeDisplay; +class AbstractTreeElement; + namespace treehash = blender::bke::outliner::treehash; +struct TreeElement; + struct SpaceOutliner_Runtime { /** Object to create and manage the tree for a specific display type (View Layers, Scenes, * Blender File, etc.). */ - std::unique_ptr<outliner::AbstractTreeDisplay> tree_display; + std::unique_ptr<AbstractTreeDisplay> tree_display; /* Hash table for tree-store elements, using `(id, type, index)` as key. */ std::unique_ptr<treehash::TreeHash> tree_hash; @@ -63,25 +59,25 @@ struct SpaceOutliner_Runtime { ~SpaceOutliner_Runtime() = default; }; -typedef enum TreeElementInsertType { +enum TreeElementInsertType { TE_INSERT_BEFORE, TE_INSERT_AFTER, TE_INSERT_INTO, -} TreeElementInsertType; +}; -typedef enum TreeTraversalAction { +enum TreeTraversalAction { /** Continue traversal regularly, don't skip children. */ TRAVERSE_CONTINUE = 0, /** Stop traversal. */ TRAVERSE_BREAK, /** Continue traversal, but skip children of traversed element. */ TRAVERSE_SKIP_CHILDS, -} TreeTraversalAction; +}; -typedef TreeTraversalAction (*TreeTraversalFunc)(struct TreeElement *te, void *customdata); +typedef TreeTraversalAction (*TreeTraversalFunc)(TreeElement *te, void *customdata); -typedef struct TreeElement { - struct TreeElement *next, *prev, *parent; +struct TreeElement { + TreeElement *next, *prev, *parent; /** * The new inheritance based representation of the element (a derived type of base @@ -89,7 +85,7 @@ typedef struct TreeElement { * be moved to it and operations based on the type should become virtual methods of the class * hierarchy. */ - std::unique_ptr<outliner::AbstractTreeElement> abstract_element; + std::unique_ptr<AbstractTreeElement> abstract_element; ListBase subtree; int xs, ys; /* Do selection. */ @@ -100,12 +96,12 @@ typedef struct TreeElement { short xend; /* Width of item display, for select. */ const char *name; void *directdata; /* Armature Bones, Base, ... */ -} TreeElement; +}; -typedef struct TreeElementIcon { +struct TreeElementIcon { struct ID *drag_id, *drag_parent; int icon; -} TreeElementIcon; +}; #define TREESTORE_ID_TYPE(_id) \ (ELEM(GS((_id)->name), \ @@ -172,17 +168,17 @@ enum { /* button events */ #define OL_NAMEBUTTON 1 -typedef enum { +enum eOLDrawState { OL_DRAWSEL_NONE = 0, /* inactive (regular black text) */ OL_DRAWSEL_NORMAL = 1, /* active object (draws white text) */ OL_DRAWSEL_ACTIVE = 2, /* active obdata (draws a circle around the icon) */ -} eOLDrawState; +}; -typedef enum { +enum eOLSetState { OL_SETSEL_NONE = 0, /* don't change the selection state */ OL_SETSEL_NORMAL = 1, /* select the item */ OL_SETSEL_EXTEND = 2, /* select the item and extend (also toggles selection) */ -} eOLSetState; +}; /* get TreeStoreElem associated with a TreeElement * < a: (TreeElement) tree element to find stored element for @@ -232,7 +228,7 @@ typedef enum { * Container to avoid passing around these variables to many functions. * Also so we can have one place to assign these variables. */ -typedef struct TreeViewContext { +struct TreeViewContext { /* Scene level. */ struct Scene *scene; struct ViewLayer *view_layer; @@ -245,16 +241,16 @@ typedef struct TreeViewContext { * The pose object may not be the active object (when in weight paint mode). * Checking this in draw loops isn't efficient, so set only once. */ Object *ob_pose; -} TreeViewContext; +}; -typedef enum TreeItemSelectAction { +enum TreeItemSelectAction { OL_ITEM_DESELECT = 0, /* Deselect the item */ OL_ITEM_SELECT = (1 << 0), /* Select the item */ OL_ITEM_SELECT_DATA = (1 << 1), /* Select object data */ OL_ITEM_ACTIVATE = (1 << 2), /* Activate the item */ OL_ITEM_EXTEND = (1 << 3), /* Extend the current selection */ OL_ITEM_RECURSIVE = (1 << 4), /* Select recursively */ -} TreeItemSelectAction; +}; /* outliner_tree.c ----------------------------------------------- */ @@ -277,9 +273,9 @@ void outliner_build_tree(struct Main *mainvar, struct SpaceOutliner *space_outliner, struct ARegion *region); -struct TreeElement *outliner_add_collection_recursive(SpaceOutliner *space_outliner, - struct Collection *collection, - TreeElement *ten); +TreeElement *outliner_add_collection_recursive(SpaceOutliner *space_outliner, + struct Collection *collection, + TreeElement *ten); bool outliner_requires_rebuild_on_select_or_active_change( const struct SpaceOutliner *space_outliner); @@ -288,8 +284,8 @@ typedef struct IDsSelectedData { struct ListBase selected_array; } IDsSelectedData; -TreeTraversalAction outliner_find_selected_collections(struct TreeElement *te, void *customdata); -TreeTraversalAction outliner_find_selected_objects(struct TreeElement *te, void *customdata); +TreeTraversalAction outliner_find_selected_collections(TreeElement *te, void *customdata); +TreeTraversalAction outliner_find_selected_objects(TreeElement *te, void *customdata); /* outliner_draw.c ---------------------------------------------- */ @@ -351,7 +347,7 @@ struct bPoseChannel *outliner_find_parent_bone(TreeElement *te, TreeElement **r_ */ void outliner_item_select(struct bContext *C, struct SpaceOutliner *space_outliner, - struct TreeElement *te, + TreeElement *te, short select_flag); /** @@ -381,7 +377,7 @@ void outliner_item_mode_toggle(struct bContext *C, typedef void (*outliner_operation_fn)(struct bContext *C, struct ReportList *, struct Scene *scene, - struct TreeElement *, + TreeElement *, struct TreeStoreElem *, TreeStoreElem *, void *); @@ -410,12 +406,10 @@ int outliner_flag_is_any_test(ListBase *lb, short flag, int curlevel); * Set or unset \a flag for all outliner elements in \a lb and sub-trees. * \return if any flag was modified. */ -extern "C++" { bool outliner_flag_set(const SpaceOutliner &space_outliner, short flag, short set); bool outliner_flag_set(const ListBase &lb, short flag, short set); bool outliner_flag_flip(const SpaceOutliner &space_outliner, short flag); bool outliner_flag_flip(const ListBase &lb, short flag); -} void item_rename_fn(struct bContext *C, struct ReportList *reports, @@ -427,14 +421,14 @@ void item_rename_fn(struct bContext *C, void lib_relocate_fn(struct bContext *C, struct ReportList *reports, struct Scene *scene, - struct TreeElement *te, + TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); void lib_reload_fn(struct bContext *C, struct ReportList *reports, struct Scene *scene, - struct TreeElement *te, + TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); @@ -442,14 +436,14 @@ void lib_reload_fn(struct bContext *C, void id_delete_tag_fn(struct bContext *C, struct ReportList *reports, struct Scene *scene, - struct TreeElement *te, + TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); void id_remap_fn(struct bContext *C, struct ReportList *reports, struct Scene *scene, - struct TreeElement *te, + TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); @@ -686,12 +680,6 @@ int outliner_context(const struct bContext *C, const char *member, struct bContextDataResult *result); -#ifdef __cplusplus -} -#endif - -namespace blender::ed::outliner { - /** * Helper to safely "cast" a #TreeElement to its new C++ #AbstractTreeElement, if possible. * \return nullptr if the tree-element doesn't match the requested type \a TreeElementT or the diff --git a/source/blender/editors/space_outliner/outliner_ops.cc b/source/blender/editors/space_outliner/outliner_ops.cc index b384c41aa69..cf9c4834667 100644 --- a/source/blender/editors/space_outliner/outliner_ops.cc +++ b/source/blender/editors/space_outliner/outliner_ops.cc @@ -11,6 +11,7 @@ #include "outliner_intern.hh" +namespace blender::ed::outliner { /* -------------------------------------------------------------------- */ /** \name Registration * \{ */ @@ -103,3 +104,5 @@ void outliner_keymap(wmKeyConfig *keyconf) } /** \} */ + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_query.cc b/source/blender/editors/space_outliner/outliner_query.cc index d6483c44fce..11929cbe2f0 100644 --- a/source/blender/editors/space_outliner/outliner_query.cc +++ b/source/blender/editors/space_outliner/outliner_query.cc @@ -13,7 +13,7 @@ #include "outliner_intern.hh" #include "tree/tree_display.hh" -using namespace blender::ed::outliner; +namespace blender::ed::outliner { bool outliner_shows_mode_column(const SpaceOutliner &space_outliner) { @@ -46,3 +46,5 @@ bool outliner_has_element_warnings(const SpaceOutliner &space_outliner) return recursive_fn(space_outliner.tree); } + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc index 088758c7583..7929f448daa 100644 --- a/source/blender/editors/space_outliner/outliner_select.cc +++ b/source/blender/editors/space_outliner/outliner_select.cc @@ -70,7 +70,7 @@ #include "tree/tree_element_seq.hh" #include "tree/tree_iterator.hh" -using namespace blender::ed::outliner; +namespace blender::ed::outliner { /* -------------------------------------------------------------------- */ /** \name Internal Utilities @@ -2040,3 +2040,5 @@ void OUTLINER_OT_select_walk(wmOperatorType *ot) } /** \} */ + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_sync.cc b/source/blender/editors/space_outliner/outliner_sync.cc index 772a5826f9f..5899d04c353 100644 --- a/source/blender/editors/space_outliner/outliner_sync.cc +++ b/source/blender/editors/space_outliner/outliner_sync.cc @@ -94,6 +94,8 @@ void ED_outliner_select_sync_flag_outliners(const bContext *C) wm->outliner_sync_select_dirty = 0; } +namespace blender::ed::outliner { + /** * Outliner sync select dirty flags are not enough to determine which types to sync, * outliner display mode also needs to be considered. This stores the types of data @@ -335,8 +337,12 @@ static void outliner_sync_selection_from_outliner(Scene *scene, } } +} // namespace blender::ed::outliner + void ED_outliner_select_sync_from_outliner(bContext *C, SpaceOutliner *space_outliner) { + using namespace blender::ed::outliner; + /* Don't sync if not checked or in certain outliner display modes */ if (!(space_outliner->flag & SO_SYNC_SELECT) || ELEM(space_outliner->outlinevis, SO_LIBRARIES, @@ -380,6 +386,8 @@ void ED_outliner_select_sync_from_outliner(bContext *C, SpaceOutliner *space_out } } +namespace blender::ed::outliner { + static void outliner_select_sync_from_object(ViewLayer *view_layer, Object *obact, TreeElement *te, @@ -561,3 +569,5 @@ void outliner_sync_selection(const bContext *C, SpaceOutliner *space_outliner) } } } + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 63c7666fd7b..ae6b2ee6d58 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -89,6 +89,8 @@ #include "tree/tree_element_seq.hh" #include "tree/tree_iterator.hh" +namespace blender::ed::outliner { + static CLG_LogRef LOG = {"ed.outliner.tools"}; using namespace blender::ed::outliner; @@ -3459,3 +3461,5 @@ void OUTLINER_OT_operation(wmOperatorType *ot) } /** \} */ + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc index 86195d30dc3..b8cdf18f599 100644 --- a/source/blender/editors/space_outliner/outliner_tree.cc +++ b/source/blender/editors/space_outliner/outliner_tree.cc @@ -70,7 +70,7 @@ # include "BLI_math_base.h" /* M_PI */ #endif -using namespace blender::ed::outliner; +namespace blender::ed::outliner { /* prototypes */ static int outliner_exclude_filter_get(const SpaceOutliner *space_outliner); @@ -786,8 +786,6 @@ static void outliner_add_id_contents(SpaceOutliner *space_outliner, } } -namespace blender::ed::outliner { - TreeElement *outliner_add_element(SpaceOutliner *space_outliner, ListBase *lb, void *idv, @@ -924,8 +922,6 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner, return te; } -} // namespace blender::ed::outliner - /* ======================================================= */ BLI_INLINE void outliner_add_collection_init(TreeElement *te, Collection *collection) @@ -1727,3 +1723,5 @@ void outliner_build_tree(Main *mainvar, } /** \} */ + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc index a077fd66f8c..3ff4a058de3 100644 --- a/source/blender/editors/space_outliner/outliner_utils.cc +++ b/source/blender/editors/space_outliner/outliner_utils.cc @@ -30,7 +30,7 @@ #include "tree/tree_display.hh" #include "tree/tree_iterator.hh" -using namespace blender::ed::outliner; +namespace blender::ed::outliner { /* -------------------------------------------------------------------- */ /** \name Tree View Context @@ -445,6 +445,10 @@ void outliner_tag_redraw_avoid_rebuild_on_open_change(const SpaceOutliner *space } } +} // namespace blender::ed::outliner + +using namespace blender::ed::outliner; + Base *ED_outliner_give_base_under_cursor(bContext *C, const int mval[2]) { ARegion *region = CTX_wm_region(C); diff --git a/source/blender/editors/space_outliner/space_outliner.cc b/source/blender/editors/space_outliner/space_outliner.cc index 66ee0f4f3af..04f326d62f9 100644 --- a/source/blender/editors/space_outliner/space_outliner.cc +++ b/source/blender/editors/space_outliner/space_outliner.cc @@ -37,6 +37,8 @@ #include "outliner_intern.hh" #include "tree/tree_display.hh" +namespace blender::ed::outliner { + SpaceOutliner_Runtime::SpaceOutliner_Runtime(const SpaceOutliner_Runtime & /*other*/) : tree_display(nullptr), tree_hash(nullptr) { @@ -433,8 +435,12 @@ static void outliner_deactivate(struct ScrArea *area) ED_region_tag_redraw_no_rebuild(BKE_area_find_region_type(area, RGN_TYPE_WINDOW)); } +} // namespace blender::ed::outliner + void ED_spacetype_outliner(void) { + using namespace blender::ed::outliner; + SpaceType *st = MEM_cnew<SpaceType>("spacetype time"); ARegionType *art; diff --git a/source/blender/editors/space_outliner/tree/common.cc b/source/blender/editors/space_outliner/tree/common.cc index e590b0c97d1..199c80f021a 100644 --- a/source/blender/editors/space_outliner/tree/common.cc +++ b/source/blender/editors/space_outliner/tree/common.cc @@ -21,6 +21,8 @@ #include "common.hh" #include "tree_display.hh" +namespace blender::ed::outliner { + /* -------------------------------------------------------------------- */ /** \name ID Helpers. * \{ */ @@ -63,3 +65,5 @@ bool outliner_animdata_test(const AnimData *adt) } return false; } + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/tree/common.hh b/source/blender/editors/space_outliner/tree/common.hh index 96c1eb34354..ba2d1c3fab6 100644 --- a/source/blender/editors/space_outliner/tree/common.hh +++ b/source/blender/editors/space_outliner/tree/common.hh @@ -8,7 +8,11 @@ struct ListBase; +namespace blender::ed::outliner { + const char *outliner_idcode_to_plural(short idcode); void outliner_make_object_parent_hierarchy(ListBase *lb); bool outliner_animdata_test(const struct AnimData *adt); + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/tree/tree_display.hh b/source/blender/editors/space_outliner/tree/tree_display.hh index 363b5dc61ec..295eeb59eaa 100644 --- a/source/blender/editors/space_outliner/tree/tree_display.hh +++ b/source/blender/editors/space_outliner/tree/tree_display.hh @@ -30,11 +30,11 @@ struct Main; struct Scene; struct Sequence; struct SpaceOutliner; -struct TreeElement; struct ViewLayer; namespace blender::ed::outliner { +struct TreeElement; class TreeElementID; /** diff --git a/source/blender/editors/space_outliner/tree/tree_element.hh b/source/blender/editors/space_outliner/tree/tree_element.hh index fc6211f20ea..1b145a48daa 100644 --- a/source/blender/editors/space_outliner/tree/tree_element.hh +++ b/source/blender/editors/space_outliner/tree/tree_element.hh @@ -14,10 +14,11 @@ struct ListBase; struct SpaceOutliner; -struct TreeElement; namespace blender::ed::outliner { +struct TreeElement; + /* -------------------------------------------------------------------- */ /* Tree-Display Interface */ diff --git a/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh b/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh index 956cf3dec48..f3372329dd1 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh +++ b/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh @@ -8,8 +8,6 @@ #include "tree_element.hh" -struct TreeElement; - namespace blender::ed::outliner { class TreeElementAnimData final : public AbstractTreeElement { diff --git a/source/blender/editors/space_outliner/tree/tree_element_driver.hh b/source/blender/editors/space_outliner/tree/tree_element_driver.hh index 053217e18ec..f0213dd39f2 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_driver.hh +++ b/source/blender/editors/space_outliner/tree/tree_element_driver.hh @@ -8,8 +8,6 @@ #include "tree_element.hh" -struct TreeElement; - namespace blender::ed::outliner { class TreeElementDriverBase final : public AbstractTreeElement { diff --git a/source/blender/editors/space_outliner/tree/tree_iterator.hh b/source/blender/editors/space_outliner/tree/tree_iterator.hh index de5bcd2c462..0c94c2f95cf 100644 --- a/source/blender/editors/space_outliner/tree/tree_iterator.hh +++ b/source/blender/editors/space_outliner/tree/tree_iterator.hh @@ -10,9 +10,11 @@ struct ListBase; struct SpaceOutliner; -struct TreeElement; namespace blender::ed::outliner { + +struct TreeElement; + namespace tree_iterator { using VisitorFn = FunctionRef<void(TreeElement *)>; |