279 struct GHash *library_weak_reference_mapping,
280 const char *library_filepath,
292 const char *library_filepath,
293 const char *library_id_name,
310 const char *library_filepath,
311 const char *library_id_name,
324 const char *library_filepath,
325 const char *library_id_name,
330 #define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id) \
332 ID *_id_next = (ID *)(_lb)->first; \
333 for ((_id) = _id_next; (_id) != NULL; (_id) = _id_next) { \
334 _id_next = (ID *)(_id)->next;
336 #define FOREACH_MAIN_LISTBASE_ID_END \
341 #define FOREACH_MAIN_LISTBASE_BEGIN(_bmain, _lb) \
343 ListBase *_lbarray[INDEX_ID_MAX]; \
344 int _i = set_listbasepointers((_bmain), _lbarray); \
346 (_lb) = _lbarray[_i];
348 #define FOREACH_MAIN_LISTBASE_END \
361 #define FOREACH_MAIN_ID_BEGIN(_bmain, _id) \
364 FOREACH_MAIN_LISTBASE_BEGIN ((_bmain), _lb) { \
365 FOREACH_MAIN_LISTBASE_ID_BEGIN (_lb, (_id))
367 #define FOREACH_MAIN_ID_END \
368 FOREACH_MAIN_LISTBASE_ID_END; \
370 FOREACH_MAIN_LISTBASE_END; \
427 #define MAIN_VERSION_ATLEAST(main, ver, subver) \
428 ((main)->versionfile > (ver) || \
429 ((main)->versionfile == (ver) && (main)->subversionfile >= (subver)))
431 #define MAIN_VERSION_OLDER(main, ver, subver) \
432 ((main)->versionfile < (ver) || \
433 ((main)->versionfile == (ver) && (main)->subversionfile < (subver)))
435 #define MAIN_VERSION_FILE_OLDER_OR_EQUAL(main, ver, subver) \
436 ((main)->versionfile < (ver) || \
437 ((main)->versionfile == (ver) && (main)->subversionfile <= (subver)))
446 #define BLEN_THUMB_SIZE 128
448 #define BLEN_THUMB_MEMSIZE(_x, _y) \
449 (sizeof(BlendThumbnail) + ((size_t)(_x) * (size_t)(_y)) * sizeof(int))
451 #define BLEN_THUMB_MEMSIZE_IS_VALID(_x, _y) \
452 (((_x) > 0 && (_y) > 0) && ((uint64_t)(_x) * (uint64_t)(_y) < (SIZE_MAX / (sizeof(int) * 4))))
void BKE_main_library_weak_reference_add_item(struct GHash *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, struct ID *new_id) ATTR_NONNULL()
struct Main * BKE_main_new(void)
struct ImBuf * BKE_main_thumbnail_to_imbuf(struct Main *bmain, struct BlendThumbnail *data)
struct MainIDRelationsEntryItem MainIDRelationsEntryItem
int set_listbasepointers(struct Main *main, struct ListBase *lb[])
struct ID * BKE_main_library_weak_reference_search_item(struct GHash *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name) ATTR_NONNULL()
struct BlendThumbnail BlendThumbnail
struct GHash * BKE_main_library_weak_reference_create(struct Main *bmain) ATTR_NONNULL()
void BKE_main_relations_tag_set(struct Main *bmain, eMainIDRelationsEntryTags tag, bool value)
void BKE_main_library_weak_reference_destroy(struct GHash *library_weak_reference_mapping) ATTR_NONNULL()
void BKE_main_thumbnail_create(struct Main *bmain)
void BKE_main_unlock(struct Main *bmain)
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
@ MAINIDRELATIONS_INCLUDE_UI
eMainIDRelationsEntryTags
@ MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS_FROM
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_TO
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED
@ MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS
@ MAINIDRELATIONS_ENTRY_TAGS_DOIT
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_FROM
@ MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS_TO
void BKE_main_relations_create(struct Main *bmain, short flag)
void BKE_main_library_weak_reference_remove_item(struct GHash *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, struct ID *old_id) ATTR_NONNULL()
void BKE_main_lock(struct Main *bmain)
void BKE_main_relations_free(struct Main *bmain)
struct MainIDRelations MainIDRelations
struct BlendThumbnail * BKE_main_thumbnail_from_imbuf(struct Main *bmain, struct ImBuf *img)
struct ListBase * which_libbase(struct Main *bmain, short type)
bool BKE_main_is_empty(struct Main *bmain)
void BKE_main_library_weak_reference_update_item(struct GHash *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, struct ID *old_id, struct ID *new_id) ATTR_NONNULL()
void BKE_main_free(struct Main *mainvar)
struct GSet * BKE_main_gset_create(struct Main *bmain, struct GSet *gset)
struct MainIDRelationsEntry MainIDRelationsEntry
const char * BKE_main_blendfile_path_from_global(void)
#define ATTR_NONNULL(...)
These structs are the foundation for all linked lists in the library system.
_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
int main(int argc, char *argv[])
unsigned __int64 uint64_t
struct MainIDRelationsEntryItem * next
union MainIDRelationsEntryItem::@39 id_pointer
struct MainIDRelationsEntryItem * to_ids
struct MainIDRelationsEntryItem * from_ids
struct BLI_mempool * entry_items_pool
struct GHash * relations_from_pointers
char is_locked_for_linking
bool has_forward_compatibility_issues
char is_memfile_undo_flush_needed
char is_memfile_undo_written
BlendThumbnail * blen_thumb
uint64_t build_commit_timestamp
struct IDNameLib_Map * id_map
struct MainIDRelations * relations
char use_memfile_full_barrier
struct UniqueName_Map * name_map