65 for (
id = lb->
first;
id !=
NULL;
id = id_next) {
229 const int cb_flag = cb_data->
cb_flag;
238 *entry_p =
MEM_callocN(
sizeof(**entry_p), __func__);
245 to_id_entry->
next = (*entry_p)->to_ids;
247 to_id_entry->
session_uuid = (*id_pointer !=
NULL) ? (*id_pointer)->session_uuid :
250 (*entry_p)->to_ids = to_id_entry;
254 if (*id_pointer !=
NULL) {
257 *entry_p =
MEM_callocN(
sizeof(**entry_p), __func__);
258 (*entry_p)->session_uuid = (*id_pointer)->session_uuid;
261 BLI_assert((*entry_p)->session_uuid == (*id_pointer)->session_uuid);
265 from_id_entry->
next = (*entry_p)->from_ids;
269 (*entry_p)->from_ids = from_id_entry;
298 *entry_p =
MEM_callocN(
sizeof(**entry_p), __func__);
299 (*entry_p)->session_uuid =
id->session_uuid;
367 const char *lib_path,
402 if (id_iter ==
NULL) {
423 return library_weak_reference_mapping;
432 const char *library_filepath,
433 const char *library_id_name)
441 const char *library_filepath,
442 const char *library_id_name,
455 library_weak_reference_mapping, key, &id_p);
469 const char *library_filepath,
470 const char *library_id_name,
492 const char *library_filepath,
493 const char *library_id_name,
521 data->width = img->
x;
522 data->height = img->
y;
523 memcpy(
data->rect, img->
rect, data_size -
sizeof(*
data));
536 if (!
data && bmain) {
595 return &(bmain->
ipo);
603 return &(bmain->
fonts);
605 return &(bmain->
texts);
631 return &(bmain->
masks);
bool BKE_idtype_idcode_is_linkable(short idcode)
bool BKE_idtype_idcode_append_is_reusable(short idcode)
@ LIB_ID_FREE_NO_USER_REFCOUNT
void BKE_id_free_ex(struct Main *bmain, void *idv, int flag, bool use_flag_from_idtag)
#define MAIN_ID_SESSION_UUID_UNSET
void BKE_library_foreach_ID_link(struct Main *bmain, struct ID *id, LibraryIDLinkCallback callback, void *user_data, int flag)
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_LISTBASE_ID_END
#define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id)
#define FOREACH_MAIN_LISTBASE_END
@ MAINIDRELATIONS_INCLUDE_UI
eMainIDRelationsEntryTags
#define FOREACH_MAIN_LISTBASE_BEGIN(_bmain, _lb)
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
#define BLEN_THUMB_MEMSIZE(_x, _y)
void BKE_main_idmap_destroy(struct IDNameLib_Map *id_map) ATTR_NONNULL()
void BKE_main_namemap_destroy(struct UniqueName_Map **r_name_map) ATTR_NONNULL()
#define BLI_assert_unreachable()
void BLI_ghashIterator_step(GHashIterator *ghi)
unsigned int BLI_ghashutil_ptrhash(const void *key)
void BLI_ghashIterator_free(GHashIterator *ghi)
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GSet * BLI_gset_new(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
bool BLI_ghashutil_ptrcmp(const void *a, const void *b)
unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr)
GHashIterator * BLI_ghashIterator_new(GHash *gh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void ** BLI_ghash_lookup_p(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
bool BLI_gset_add(GSet *gs, void *key)
BLI_INLINE bool BLI_ghashIterator_done(const GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
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)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
pthread_spinlock_t SpinLock
void BLI_spin_init(SpinLock *spin)
void BLI_spin_unlock(SpinLock *spin)
void BLI_spin_lock(SpinLock *spin)
void BLI_spin_end(SpinLock *spin)
#define UNUSED_VARS_NDEBUG(...)
ID and Library types, which are fundamental for sdna.
_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
void IMB_rect_from_float(struct ImBuf *ibuf)
struct ImBuf * IMB_allocFromBuffer(const unsigned int *rect, const float *rectf, unsigned int w, unsigned int h, unsigned int channels)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
std::string id_name(void *id)
ID * BKE_main_library_weak_reference_search_item(GHash *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name)
void BKE_main_library_weak_reference_update_item(GHash *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, ID *old_id, ID *new_id)
static bool lib_weak_key_cmp(const void *a, const void *b)
void BKE_main_library_weak_reference_add_item(GHash *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, ID *new_id)
BlendThumbnail * BKE_main_thumbnail_from_imbuf(Main *bmain, ImBuf *img)
void BKE_main_library_weak_reference_remove_item(GHash *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, ID *old_id)
void BKE_main_thumbnail_create(struct Main *bmain)
void BKE_main_unlock(struct Main *bmain)
const char * BKE_main_blendfile_path(const Main *bmain)
void BKE_main_library_weak_reference_destroy(GHash *library_weak_reference_mapping)
int set_listbasepointers(Main *bmain, ListBase *lb[])
void BKE_main_relations_tag_set(struct Main *bmain, const eMainIDRelationsEntryTags tag, const bool value)
ImBuf * BKE_main_thumbnail_to_imbuf(Main *bmain, BlendThumbnail *data)
void BKE_main_lock(struct Main *bmain)
void BKE_main_relations_create(Main *bmain, const short flag)
struct LibWeakRefKey LibWeakRefKey
GSet * BKE_main_gset_create(Main *bmain, GSet *gset)
GHash * BKE_main_library_weak_reference_create(Main *bmain)
bool BKE_main_is_empty(struct Main *bmain)
ListBase * which_libbase(Main *bmain, short type)
static int main_relations_create_idlink_cb(LibraryIDLinkCallbackData *cb_data)
Main * BKE_main_new(void)
void BKE_main_free(Main *mainvar)
static LibWeakRefKey * lib_weak_key_create(LibWeakRefKey *key, const char *lib_path, const char *id_name)
void BKE_main_relations_free(Main *bmain)
static uint lib_weak_key_hash(const void *ptr)
const char * BKE_main_blendfile_path_from_global(void)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
unsigned int session_uuid
struct LibraryWeakReference * library_weak_reference
char id_name[MAX_ID_NAME]
char library_filepath[1024]
struct MainIDRelationsEntryItem * next
union MainIDRelationsEntryItem::@39 id_pointer
struct BLI_mempool * entry_items_pool
struct GHash * relations_from_pointers
BlendThumbnail * blen_thumb
struct IDNameLib_Map * id_map
struct MainIDRelations * relations
struct UniqueName_Map * name_map