104 if (tselem->
id ==
nullptr) {
148 if (space_outliner->
treestore ==
nullptr) {
171 tselem->
nr =
type ? nr : 0;
208 element->abstract_element =
nullptr;
243 #ifdef WITH_FREESTYLE
244 static void outliner_add_line_styles(
SpaceOutliner *space_outliner,
298 int const_index = 1000;
303 ten->
name = pchan->name;
305 pchan->temp = (
void *)ten;
318 target = get_constraint_target(con, &
str);
323 ten1->
name = target->id.name + 2;
326 ten1->
name = con->name;
329 ten1->
name = con->name;
364 ten->
name = agrp->name;
384 target = get_constraint_target(con, &
str);
389 ten->
name = target->id.name + 2;
392 ten->
name = con->name;
395 ten->
name = con->name;
410 ten->
name = md->name;
466 ten->
name = md->name;
506 ten->
name = fx->name;
532 ten->
name = defgroup->name;
553 id->newid = (
ID *)te;
560 BLI_assert_msg(0,
"ID type expected to be expanded through new tree-element design");
688 ten->
name = ebone->name;
803 ID *
id =
reinterpret_cast<ID *
>(idv);
823 else if (
id ==
nullptr) {
875 BLI_assert_msg(0,
"Expected this ID type to be ported to new Outliner tree-element design");
884 "Expected override types to be ported to new Outliner tree-element design");
894 te->
name =
id->name + 2;
925 BLI_assert_msg(
false,
"Element type should already use new AbstractTreeElement design");
1057 static int treesort_obtype_alpha(
const void *
v1,
const void *
v2)
1087 else if (comp < 0) {
1100 if (last_te ==
nullptr) {
1129 tp->
id = tselem->
id;
1139 for (tp = tear, skip = 0; skip < totelem; skip++, tp++) {
1145 if (skip < totelem) {
1168 if (last_te ==
nullptr) {
1187 tp->
id = tselem->
id;
1229 if (focus->
tselem !=
nullptr) {
1234 if (te_new !=
nullptr) {
1235 int ys_new = te_new->
ys;
1236 int ys_old = focus->
ys;
1238 float y_move =
MIN2(ys_new - ys_old, -v2d->
cur.
ymax);
1267 if (callback_test(te)) {
1274 space_outliner, te_iter, limit, callback_test);
1275 if (te_sub !=
nullptr) {
1295 const float view_co,
1296 const float view_co_limit)
1309 while (te !=
nullptr) {
1311 space_outliner, te, view_co_limit, callback_test);
1312 if (te_sub !=
nullptr) {
1325 if (te->
parent ==
nullptr) {
1357 space_outliner, region->
v2d.
cur.
ymax, limit);
1359 if (te !=
nullptr) {
1403 return exclude_filter;
1408 const int exclude_filter)
1422 BLI_assert((base ==
nullptr) || (base->object == ob));
1460 if (base ==
nullptr) {
1463 if (base ==
nullptr) {
1468 bool is_visible =
true;
1486 if (base !=
BASACT(view_layer)) {
1492 is_visible = !is_visible;
1520 fn_flag |= FNM_CASEFOLD;
1523 return fnmatch(name, te->
name, fn_flag) == 0;
1571 const char *search_string,
1572 const int exclude_filter)
1583 space_outliner, view_layer, &te->
subtree, search_string, exclude_filter);
1590 space_outliner, view_layer, &te->
subtree, search_string, exclude_filter);
1608 space_outliner, view_layer, &te->
subtree, search_string, exclude_filter) == 0) {
1620 space_outliner, view_layer, &te->
subtree, search_string, exclude_filter);
1630 char search_buff[
sizeof(((
struct SpaceOutliner *)
nullptr)->search_string) + 2];
1635 if (exclude_filter == 0) {
1649 space_outliner, view_layer, &space_outliner->
tree,
search_string, exclude_filter);
1656 id_iter->
newid =
nullptr;
1692 "Skipping rebuild before tree was built properly, a full redraw should be "
1693 "triggered instead");
1704 space_outliner->
outlinevis, *space_outliner);
const char * BKE_collection_ui_name_get(struct Collection *collection)
struct Base * BKE_view_layer_base_find(struct ViewLayer *view_layer, struct Object *ob)
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
void BKE_outliner_treehash_clear_used(void *treehash)
struct TreeStoreElem * BKE_outliner_treehash_lookup_unused(void *treehash, short type, short nr, struct ID *id)
void * BKE_outliner_treehash_create_from_treestore(struct BLI_mempool *treestore)
void * BKE_outliner_treehash_rebuild_from_treestore(void *treehash, struct BLI_mempool *treestore)
void BKE_outliner_treehash_free(void *treehash)
void BKE_outliner_treehash_add_element(void *treehash, struct TreeStoreElem *elem)
#define BLI_assert_msg(a, msg)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_mempool_iternew(BLI_mempool *pool, BLI_mempool_iter *iter) ATTR_NONNULL()
void * BLI_mempool_iterstep(BLI_mempool_iter *iter) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_mempool_len(const BLI_mempool *pool) ATTR_NONNULL(1)
BLI_mempool * BLI_mempool_create(unsigned int esize, unsigned int elem_num, unsigned int pchunk, unsigned int flag) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
void * BLI_mempool_alloc(BLI_mempool *pool) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1)
void BLI_mempool_destroy(BLI_mempool *pool) ATTR_NONNULL(1)
void BLI_rctf_translate(struct rctf *rect, float x, float y)
int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_strncpy_ensure_pad(char *__restrict dst, const char *__restrict src, char pad, size_t maxncpy) ATTR_NONNULL()
Object groups, one object can be in many groups at once.
@ eGpencilModifierType_Lattice
@ eGpencilModifierType_Hook
@ eGpencilModifierType_Armature
@ eModifierType_ParticleSystem
Object is a sort of wrapper for general info.
#define TSE_IS_REAL_ID(_tse)
@ TSE_LIBRARY_OVERRIDE_OPERATION
@ TSE_VIEW_COLLECTION_BASE
@ TSE_LIBRARY_OVERRIDE_BASE
@ TSE_SCENE_COLLECTION_BASE
@ TSE_GPENCIL_EFFECT_BASE
#define BASACT(_view_layer)
#define SO_FILTER_OB_STATE
@ SO_FILTER_OB_STATE_ACTIVE
@ SO_FILTER_NO_OB_CONTENT
@ SO_FILTER_OB_STATE_SELECTABLE
@ SO_FILTER_OB_STATE_INVERSE
@ SO_FILTER_OB_STATE_SELECTED
@ SO_FILTER_OB_STATE_VISIBLE
@ SO_FILTER_NO_COLLECTION
@ SO_FILTER_NO_OB_ARMATURE
#define SO_FILTER_OB_TYPE
@ SO_FILTER_OB_SELECTABLE
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble x2
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
ATTR_WARN_UNUSED_RESULT const void * element
ATTR_WARN_UNUSED_RESULT const BMVert * v2
static std::unique_ptr< AbstractTreeDisplay > createFromDisplayMode(int mode, SpaceOutliner &space_outliner)
static std::unique_ptr< AbstractTreeElement > createFromType(int type, TreeElement &legacy_te, void *idv)
bool outliner_animdata_test(const AnimData *adt)
FreestyleLineStyle linestyle
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
TreeElement * outliner_add_element(SpaceOutliner *space_outliner, ListBase *lb, void *idv, TreeElement *parent, short type, short index, const bool expand)
void tree_element_expand(const AbstractTreeElement &tree_element, SpaceOutliner &space_outliner)
bool outliner_is_collection_tree_element(const TreeElement *te)
void outliner_set_coordinates(const ARegion *region, const SpaceOutliner *space_outliner)
#define TREESTORE_ID_TYPE(_id)
#define SEARCHING_OUTLINER(sov)
#define SUPPORT_FILTER_OUTLINER(space_outliner_)
@ TE_CHILD_NOT_IN_COLLECTION
TreeElement * outliner_find_tree_element(ListBase *lb, const TreeStoreElem *store_elem)
TreeElement * outliner_find_item_at_y(const SpaceOutliner *space_outliner, const ListBase *tree, float view_co_y)
#define TSELEM_OPEN(telm, sv)
TreeElement * outliner_add_collection_recursive(SpaceOutliner *space_outliner, Collection *collection, TreeElement *ten)
static bool outliner_element_visible_get(ViewLayer *view_layer, TreeElement *te, const int exclude_filter)
static void outliner_store_scrolling_position(SpaceOutliner *space_outliner, ARegion *region, OutlinerTreeElementFocus *focus)
static int outliner_exclude_filter_get(const SpaceOutliner *space_outliner)
static bool outliner_filter_has_name(TreeElement *te, const char *name, int flags)
static void outliner_filter_tree(SpaceOutliner *space_outliner, ViewLayer *view_layer)
static TreeElement * outliner_find_first_desired_element_at_y(const SpaceOutliner *space_outliner, const float view_co, const float view_co_limit)
static bool outliner_element_is_collection_or_object(TreeElement *te)
bool outliner_requires_rebuild_on_select_or_active_change(const SpaceOutliner *space_outliner)
void outliner_build_tree(Main *mainvar, Scene *scene, ViewLayer *view_layer, SpaceOutliner *space_outliner, ARegion *region)
static int outliner_filter_subtree(SpaceOutliner *space_outliner, ViewLayer *view_layer, ListBase *lb, const char *search_string, const int exclude_filter)
static int treesort_alpha(const void *v1, const void *v2)
BLI_INLINE void outliner_add_collection_objects(SpaceOutliner *space_outliner, ListBase *tree, Collection *collection, TreeElement *parent)
static void outliner_storage_cleanup(SpaceOutliner *space_outliner)
void outliner_free_tree(ListBase *tree)
static bool test_collection_callback(TreeElement *te)
static void outliner_add_id_contents(SpaceOutliner *space_outliner, TreeElement *te, TreeStoreElem *tselem, ID *id)
static int treesort_child_not_in_collection(const void *v1, const void *v2)
BLI_INLINE void outliner_add_collection_init(TreeElement *te, Collection *collection)
static void outliner_sort(ListBase *lb)
static void check_persistent(SpaceOutliner *space_outliner, TreeElement *te, ID *id, short type, short nr)
static void outliner_clear_newid_from_main(Main *bmain)
static void outliner_add_object_contents(SpaceOutliner *space_outliner, TreeElement *te, TreeStoreElem *tselem, Object *ob)
void outliner_free_tree_element(TreeElement *element, ListBase *parent_subtree)
static void outliner_restore_scrolling_position(SpaceOutliner *space_outliner, ARegion *region, OutlinerTreeElementFocus *focus)
static bool test_object_callback(TreeElement *te)
void outliner_cleanup_tree(SpaceOutliner *space_outliner)
static void outliner_add_bone(SpaceOutliner *space_outliner, ListBase *lb, ID *id, Bone *curBone, TreeElement *parent, int *a)
static TreeElement * outliner_find_first_desired_element_at_y_recursive(const SpaceOutliner *space_outliner, TreeElement *te, const float limit, bool(*callback_test)(TreeElement *))
static void outliner_collections_children_sort(ListBase *lb)
static TreeElement * outliner_extract_children_from_subtree(TreeElement *element, ListBase *parent_subtree)
static int treesort_alpha_ob(const void *v1, const void *v2)
struct FreestyleLineStyle * linestyle
struct FreestyleLineSet * next
struct Collection * instance_collection
ListBase greasepencil_modifiers
std::unique_ptr< outliner::AbstractTreeDisplay > tree_display
SpaceOutliner_Runtime * runtime
struct BLI_mempool * treestore
struct TreeElement * parent
std::unique_ptr< outliner::AbstractTreeElement > abstract_element
TreeStoreElem * store_elem
struct TreeElement * prev
struct TreeElement * next
struct FreestyleConfig freestyle_config
struct bPoseChannel * parent
The data to build the tree from.
Establish and manage Outliner trees for different display modes.