213 #define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id) \
215 ID *_id_next = (_lb)->first; \
216 for ((_id) = _id_next; (_id) != NULL; (_id) = _id_next) { \
217 _id_next = (_id)->next;
219 #define FOREACH_MAIN_LISTBASE_ID_END \
224 #define FOREACH_MAIN_LISTBASE_BEGIN(_bmain, _lb) \
226 ListBase *_lbarray[INDEX_ID_MAX]; \
227 int _i = set_listbasepointers((_bmain), _lbarray); \
229 (_lb) = _lbarray[_i];
231 #define FOREACH_MAIN_LISTBASE_END \
244 #define FOREACH_MAIN_ID_BEGIN(_bmain, _id) \
247 FOREACH_MAIN_LISTBASE_BEGIN ((_bmain), _lb) { \
248 FOREACH_MAIN_LISTBASE_ID_BEGIN (_lb, (_id))
250 #define FOREACH_MAIN_ID_END \
251 FOREACH_MAIN_LISTBASE_ID_END; \
253 FOREACH_MAIN_LISTBASE_END; \
269 #define MAIN_VERSION_ATLEAST(main, ver, subver) \
270 ((main)->versionfile > (ver) || \
271 ((main)->versionfile == (ver) && (main)->subversionfile >= (subver)))
273 #define MAIN_VERSION_OLDER(main, ver, subver) \
274 ((main)->versionfile < (ver) || \
275 ((main)->versionfile == (ver) && (main)->subversionfile < (subver)))
277 #define BLEN_THUMB_SIZE 128
279 #define BLEN_THUMB_MEMSIZE(_x, _y) \
280 (sizeof(BlendThumbnail) + ((size_t)(_x) * (size_t)(_y)) * sizeof(int))
282 #define BLEN_THUMB_MEMSIZE_IS_VALID(_x, _y) \
283 (((_x) > 0 && (_y) > 0) && ((uint64_t)(_x) * (uint64_t)(_y) < (SIZE_MAX / (sizeof(int) * 4))))
struct Main * BKE_main_new(void)
@ MAINIDRELATIONS_INCLUDE_UI
struct ImBuf * BKE_main_thumbnail_to_imbuf(struct Main *bmain, struct BlendThumbnail *data)
struct MainIDRelationsEntryItem MainIDRelationsEntryItem
void BKE_main_relations_create(struct Main *bmain, const short flag)
int set_listbasepointers(struct Main *main, struct ListBase *lb[])
struct BlendThumbnail BlendThumbnail
void BKE_main_relations_tag_set(struct Main *bmain, const MainIDRelationsEntryTags tag, const bool value)
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED
@ MAINIDRELATIONS_ENTRY_TAGS_DOIT
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()
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)
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::@40 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
char is_memfile_undo_flush_needed
char is_memfile_undo_written
BlendThumbnail * blen_thumb
uint64_t build_commit_timestamp
struct MainIDRelations * relations
char use_memfile_full_barrier