Blender V5.3
outliner_tree.cc File Reference
#include <algorithm>
#include <climits>
#include <cstring>
#include <optional>
#include <utility>
#include "MEM_guardedalloc.h"
#include "DNA_collection_types.h"
#include "BLI_fnmatch.hh"
#include "BLI_listbase.hh"
#include "BLI_map.hh"
#include "BLI_mempool.hh"
#include "BLI_rect.hh"
#include "BLI_set.hh"
#include "BLI_string.hh"
#include "BLI_utildefines.hh"
#include "BKE_collection.hh"
#include "BKE_layer.hh"
#include "BKE_main.hh"
#include "BKE_modifier.hh"
#include "BKE_outliner_treehash.hh"
#include "BKE_screen.hh"
#include "ED_outliner.hh"
#include "ED_screen.hh"
#include "UI_interface.hh"
#include "outliner_intern.hh"
#include "tree/tree_display.hh"
#include "tree/tree_element.hh"
#include "tree/tree_element_id.hh"

Go to the source code of this file.

Classes

struct  blender::ed::outliner::tTreeSort
struct  blender::ed::outliner::OutlinerSortMaps
struct  blender::ed::outliner::OutlinerTreeElementFocus

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::ed
namespace  blender::ed::outliner

Functions

Tree Filtering Helper
static eSpaceOutliner_Filter blender::ed::outliner::outliner_exclude_filter_get (const SpaceOutliner *space_outliner)
static void blender::ed::outliner::outliner_restore_scrolling_position (SpaceOutliner *space_outliner, ARegion *region, OutlinerTreeElementFocus *focus)
static bool blender::ed::outliner::test_collection_callback (TreeElement *te)
static bool blender::ed::outliner::test_object_callback (TreeElement *te)
static TreeElement * blender::ed::outliner::outliner_find_first_desired_element_at_y_recursive (const SpaceOutliner *space_outliner, TreeElement *te, const float limit, bool(*callback_test)(TreeElement *))
static TreeElement * blender::ed::outliner::outliner_find_first_desired_element_at_y (const SpaceOutliner *space_outliner, const float view_co, const float view_co_limit)
static void blender::ed::outliner::outliner_store_scrolling_position (SpaceOutliner *space_outliner, ARegion *region, OutlinerTreeElementFocus *focus)
static bool blender::ed::outliner::outliner_element_visible_get (const Main &bmain, const Scene *scene, ViewLayer *view_layer, TreeElement *te, const eSpaceOutliner_Filter exclude_filter)
static bool blender::ed::outliner::outliner_filter_has_name (TreeElement *te, const char *name, int flags)
static bool blender::ed::outliner::outliner_element_is_collection_or_object (TreeElement *te)
static TreeElement * blender::ed::outliner::outliner_extract_children_from_subtree (TreeElement *element, ListBaseT< TreeElement > *parent_subtree)
static int blender::ed::outliner::outliner_filter_subtree (SpaceOutliner *space_outliner, const Main &bmain, const Scene *scene, ViewLayer *view_layer, ListBaseT< TreeElement > *lb, const char *search_string, const eSpaceOutliner_Filter exclude_filter)
static void blender::ed::outliner::outliner_filter_tree (const Main &bmain, SpaceOutliner *space_outliner, const Scene *scene, ViewLayer *view_layer)
static void blender::ed::outliner::outliner_clear_newid_from_main (Main *bmain)
Persistent Data
static void blender::ed::outliner::outliner_storage_cleanup (SpaceOutliner *space_outliner)
static void blender::ed::outliner::check_persistent (SpaceOutliner *space_outliner, TreeElement *te, ID *id, short type, short nr)
Tree Management
void blender::ed::outliner::outliner_free_tree (ListBaseT< TreeElement > *tree)
void blender::ed::outliner::outliner_cleanup_tree (SpaceOutliner *space_outliner)
void blender::ed::outliner::outliner_free_tree_element (TreeElement *element, ListBaseT< TreeElement > *parent_subtree)
bool blender::ed::outliner::outliner_requires_rebuild_on_select_or_active_change (const SpaceOutliner *space_outliner)
BLI_INLINE void blender::ed::outliner::outliner_add_collection_init (TreeElement *te, Collection *collection)
BLI_INLINE void blender::ed::outliner::outliner_add_collection_objects (AbstractTreeDisplay &tree_display, ListBaseT< TreeElement > *tree, Collection *collection, TreeElement *parent)
TreeElement * blender::ed::outliner::outliner_add_collection_recursive (AbstractTreeDisplay &tree_display, SpaceOutliner *space_outliner, Collection *collection, TreeElement *ten)
Tree Sorting Helper

Generic tree building helpers, the order these are called is top to bottom.

static std::optional< bool > blender::ed::outliner::treesort_child_not_in_collection (const tTreeSort &x1, const tTreeSort &x2)
static bool blender::ed::outliner::treesort_alpha (const tTreeSort &x1, const tTreeSort &x2)
static bool blender::ed::outliner::treesort_alpha_ob (const tTreeSort &x1, const tTreeSort &x2)
static int blender::ed::outliner::get_sort_index (const tTreeSort &x, const OutlinerSortMaps &sort_maps, const Map< Collection *, CollectionChild * > &collection_map, Collection *collection, const bool is_parented_object)
static bool blender::ed::outliner::treesort_custom (const tTreeSort &x1, const tTreeSort &x2, const OutlinerSortMaps &sort_maps, const Map< Collection *, CollectionChild * > &collection_child_map, Collection *collection, const bool is_parented_object)
static void blender::ed::outliner::outliner_sort (ListBaseT< TreeElement > *lb)
static void blender::ed::outliner::outliner_sort_custom (Main *bmain, Scene *scene, ListBaseT< TreeElement > *lb, const OutlinerSortMaps &sort_maps)
static void blender::ed::outliner::map_all_objects_to_collection (Collection *collection, OutlinerSortMaps &sort_maps)
static void blender::ed::outliner::outliner_sort_custom (Main *bmain, Scene *scene, ListBaseT< TreeElement > *lb)
Main Tree Building API
void blender::ed::outliner::outliner_build_tree (Main *mainvar, WorkSpace *workspace, Scene *scene, ViewLayer *view_layer, SpaceOutliner *space_outliner, ARegion *region)