Blender
V3.3
|
#include <stdlib.h>
#include <string.h>
#include "BLI_ghash.h"
#include "BLI_mempool.h"
#include "BLI_utildefines.h"
#include "DNA_outliner_types.h"
#include "BKE_outliner_treehash.h"
#include "MEM_guardedalloc.h"
Go to the source code of this file.
Classes | |
struct | TseGroup |
Macros | |
#define | TSEGROUP_LASTUSED_RESET_VALUE 10000 |
Typedefs | |
typedef struct TseGroup | TseGroup |
Tree hash for the outliner space.
Definition in file outliner_treehash.c.
#define TSEGROUP_LASTUSED_RESET_VALUE 10000 |
Definition at line 36 of file outliner_treehash.c.
void BKE_outliner_treehash_add_element | ( | void * | treehash, |
TreeStoreElem * | elem | ||
) |
Definition at line 162 of file outliner_treehash.c.
References BLI_ghash_ensure_p(), tse_group_add_element(), and tse_group_create().
Referenced by check_persistent(), and fill_treehash().
Definition at line 142 of file outliner_treehash.c.
References BLI_ghashIterator_getValue(), GHASH_ITER, TseGroup::lastused, and TseGroup::lastused_reset_count.
Referenced by outliner_storage_cleanup().
void* BKE_outliner_treehash_create_from_treestore | ( | BLI_mempool * | treestore | ) |
Definition at line 130 of file outliner_treehash.c.
References BLI_ghash_new_ex(), BLI_mempool_len(), fill_treehash(), tse_cmp(), and tse_hash().
Referenced by check_persistent().
Definition at line 251 of file outliner_treehash.c.
References BLI_assert, BLI_ghash_free(), free_treehash_group(), and NULL.
Referenced by outliner_storage_cleanup(), and SpaceOutliner_Runtime::~SpaceOutliner_Runtime().
TreeStoreElem* BKE_outliner_treehash_lookup_any | ( | void * | treehash, |
short | type, | ||
short | nr, | ||
struct ID * | id | ||
) |
Definition at line 238 of file outliner_treehash.c.
References BKE_outliner_treehash_lookup_group(), BLI_assert, TseGroup::elems, NULL, and type.
Referenced by outliner_find_tse().
|
static |
Definition at line 188 of file outliner_treehash.c.
References BLI_assert, BLI_ghash_lookup(), id, TreeStoreElem::id, TreeStoreElem::nr, TSE_SOME_ID, type, and TreeStoreElem::type.
Referenced by BKE_outliner_treehash_lookup_any(), and BKE_outliner_treehash_lookup_unused().
TreeStoreElem* BKE_outliner_treehash_lookup_unused | ( | void * | treehash, |
short | type, | ||
short | nr, | ||
struct ID * | id | ||
) |
Definition at line 200 of file outliner_treehash.c.
References BKE_outliner_treehash_lookup_group(), BLI_assert, TseGroup::elems, TseGroup::lastused, TseGroup::lastused_reset_count, LIKELY, NULL, offset, size(), TseGroup::size, TSEGROUP_LASTUSED_RESET_VALUE, type, and TreeStoreElem::used.
Referenced by check_persistent().
void* BKE_outliner_treehash_rebuild_from_treestore | ( | void * | treehash, |
BLI_mempool * | treestore | ||
) |
Definition at line 153 of file outliner_treehash.c.
References BLI_assert, BLI_ghash_clear_ex(), BLI_mempool_len(), fill_treehash(), free_treehash_group(), and NULL.
Referenced by outliner_build_tree(), and outliner_storage_cleanup().
void BKE_outliner_treehash_remove_element | ( | void * | treehash, |
TreeStoreElem * | elem | ||
) |
Definition at line 174 of file outliner_treehash.c.
References BLI_assert, BLI_ghash_lookup(), BLI_ghash_remove(), free_treehash_group(), NULL, TseGroup::size, and tse_group_remove_element().
|
static |
Definition at line 117 of file outliner_treehash.c.
References BKE_outliner_treehash_add_element(), BLI_assert, BLI_mempool_iternew(), and BLI_mempool_iterstep().
Referenced by BKE_outliner_treehash_create_from_treestore(), and BKE_outliner_treehash_rebuild_from_treestore().
Definition at line 137 of file outliner_treehash.c.
References tse_group_free().
Referenced by BKE_outliner_treehash_free(), BKE_outliner_treehash_rebuild_from_treestore(), and BKE_outliner_treehash_remove_element().
Definition at line 110 of file outliner_treehash.c.
References Freestyle::a, usdtokens::b(), TreeStoreElem::id, TreeStoreElem::nr, and TreeStoreElem::type.
Referenced by BKE_outliner_treehash_create_from_treestore().
|
static |
Definition at line 51 of file outliner_treehash.c.
References TseGroup::allocated, TseGroup::elems, TseGroup::lastused, MEM_reallocN, TseGroup::size, and UNLIKELY.
Referenced by BKE_outliner_treehash_add_element().
Definition at line 41 of file outliner_treehash.c.
References TseGroup::allocated, TseGroup::elems, TseGroup::lastused, MEM_mallocN, and TseGroup::size.
Referenced by BKE_outliner_treehash_add_element().
Definition at line 86 of file outliner_treehash.c.
References TseGroup::elems, and MEM_freeN.
Referenced by free_treehash_group().
|
static |
Definition at line 63 of file outliner_treehash.c.
References TseGroup::allocated, BLI_assert, TseGroup::elems, MAX2, MEM_reallocN, TseGroup::size, and UNLIKELY.
Referenced by BKE_outliner_treehash_remove_element().
|
static |
Definition at line 92 of file outliner_treehash.c.
References BLI_assert, BLI_ghashutil_ptrhash(), hash, TreeStoreElem::id, TreeStoreElem::nr, ptr, TSE_SOME_ID, and TreeStoreElem::type.
Referenced by BKE_outliner_treehash_create_from_treestore().