41 memset(tvc, 0,
sizeof(*tvc));
49 if (tvc->
obact !=
nullptr) {
67 if (view_co_y < (te_iter->ys +
UI_UNIT_Y)) {
68 if (view_co_y >= te_iter->ys) {
82 if (te_next && (view_co_y < (te_next->
ys +
UI_UNIT_Y))) {
100 bool *r_is_merged_icon)
105 const bool over_element = (view_co_x > child_te->
xs) && (view_co_x < child_te->xend);
110 if (r_is_merged_icon) {
111 *r_is_merged_icon =
true;
117 child_te, view_co_x, r_is_merged_icon);
118 if (te != child_te) {
122 child_te = child_te->
next;
132 bool *r_is_merged_icon,
133 bool *r_is_over_icon)
144 *r_is_over_icon =
true;
153 if (te->store_elem == store_elem) {
169 if (te == child_te) {
185 if (tse->
id ==
nullptr) {
204 if (tselem->
id ==
id) {
220 if (te->directdata == pchan) {
238 if (te->directdata == ebone) {
284 int filter_tselem_flag,
296 if (filter_te_flag && (te->flag & filter_te_flag) == 0) {
299 else if (filter_tselem_flag && (tselem->
flag & filter_tselem_flag) == 0) {
303 func_retval = func(te, customdata);
315 space_outliner, &subtree, filter_te_flag, filter_tselem_flag, func, customdata)) {
377 if ((
TREESTORE(te)->flag & flag) == flag) {
381 if (active_element) {
382 return active_element;
414 (view_co_x > te->
xs);
416 return outside_left && (view_co_x < te->
xend);
426 return (view_co_x > (te->
xs +
UI_UNIT_X * 2)) && (view_co_x < te->
xend);
431 return (view_co_x > te->
xs) && (view_co_x < te->
xs +
UI_UNIT_X);
436 int tree_width, tree_height;
475 Base *base =
nullptr;
struct Scene * CTX_data_scene(const bContext *C)
struct SpaceOutliner * CTX_wm_space_outliner(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Base * BKE_view_layer_base_find(struct ViewLayer *view_layer, struct Object *ob)
General operations, lookup, etc. for blender objects.
struct Object * BKE_object_pose_armature_get(struct Object *ob)
struct TreeStoreElem * BKE_outliner_treehash_lookup_any(void *treehash, short type, short nr, struct ID *id)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
@ TSE_VIEW_COLLECTION_BASE
#define OBEDIT_FROM_OBACT(ob)
#define OBACT(_view_layer)
eSpaceOutliner_LibOverrideViewMode
@ SO_LIB_OVERRIDE_VIEW_HIERARCHIES
@ SO_LIB_OVERRIDE_VIEW_PROPERTIES
@ SO_RESTRICT_INDIRECT_ONLY
void ED_region_tag_redraw_no_rebuild(struct ARegion *region)
void ED_region_tag_redraw(struct ARegion *region)
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void outliner_tree_dimensions(SpaceOutliner *space_outliner, int *r_width, int *r_height)
TreeTraversalAction(* TreeTraversalFunc)(struct TreeElement *te, void *customdata)
#define TSELEM_OPEN(telm, sv)
void outliner_scroll_view(SpaceOutliner *space_outliner, ARegion *region, int delta_y)
bool outliner_tree_traverse(const SpaceOutliner *space_outliner, ListBase *tree, int filter_te_flag, int filter_tselem_flag, TreeTraversalFunc func, void *customdata)
TreeElement * outliner_find_id(SpaceOutliner *space_outliner, ListBase *lb, const ID *id)
bool outliner_is_element_in_view(const TreeElement *te, const View2D *v2d)
ID * outliner_search_back(TreeElement *te, short idcode)
TreeElement * outliner_find_element_with_flag(const ListBase *lb, short flag)
bool outliner_item_is_co_within_close_toggle(const TreeElement *te, float view_co_x)
bool outliner_item_is_co_over_name(const TreeElement *te, float view_co_x)
TreeElement * outliner_find_tree_element(ListBase *lb, const TreeStoreElem *store_elem)
TreeElement * outliner_find_editbone(ListBase *lb, const EditBone *ebone)
bool outliner_item_is_co_over_name_icons(const TreeElement *te, float view_co_x)
TreeElement * outliner_search_back_te(TreeElement *te, short idcode)
TreeElement * outliner_find_item_at_y(const SpaceOutliner *space_outliner, const ListBase *tree, float view_co_y)
Base * ED_outliner_give_base_under_cursor(bContext *C, const int mval[2])
bool outliner_is_element_visible(const TreeElement *te)
float outliner_right_columns_width(const SpaceOutliner *space_outliner)
void outliner_viewcontext_init(const bContext *C, TreeViewContext *tvc)
bool outliner_item_is_co_over_icon(const TreeElement *te, float view_co_x)
void outliner_tag_redraw_avoid_rebuild_on_open_change(const SpaceOutliner *space_outliner, ARegion *region)
TreeElement * outliner_find_parent_element(ListBase *lb, TreeElement *parent_te, const TreeElement *child_te)
TreeElement * outliner_find_tse(SpaceOutliner *space_outliner, const TreeStoreElem *tse)
TreeElement * outliner_find_posechannel(ListBase *lb, const bPoseChannel *pchan)
static TreeElement * outliner_find_item_at_x_in_row_recursive(const TreeElement *parent_te, float view_co_x, bool *r_is_merged_icon)
TreeElement * outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner, TreeElement *parent_te, float view_co_x, bool *r_is_merged_icon, bool *r_is_over_icon)
std::unique_ptr< outliner::AbstractTreeDisplay > tree_display
short lib_override_view_mode
SpaceOutliner_Runtime * runtime
struct TreeElement * parent
struct TreeElement * next
struct ViewLayer * view_layer
Establish and manage Outliner trees for different display modes.