diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/blend_validate.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 22 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 |
4 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenloader/intern/blend_validate.c b/source/blender/blenloader/intern/blend_validate.c index 7261db5d3a6..f3fc1453461 100644 --- a/source/blender/blenloader/intern/blend_validate.c +++ b/source/blender/blenloader/intern/blend_validate.c @@ -60,7 +60,7 @@ bool BLO_main_validate_libraries(Main *bmain, ReportList *reports) blo_split_main(&mainlist, bmain); - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; int i = set_listbasepointers(bmain, lbarray); while (i--) { for (ID *id = lbarray[i]->first; id != NULL; id = id->next) { diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index c0293c1f8f2..2200f7c291b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -449,7 +449,7 @@ static void oldnewmap_free(OldNewMap *onm) static void add_main_to_main(Main *mainvar, Main *from) { - ListBase *lbarray[MAX_LIBARRAY], *fromarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX], *fromarray[INDEX_ID_MAX]; int a; set_listbasepointers(mainvar, lbarray); @@ -517,7 +517,7 @@ void blo_split_main(ListBase *mainlist, Main *main) lib_main_array[i] = libmain; } - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; i = set_listbasepointers(main, lbarray); while (i--) { ID *id = lbarray[i]->first; @@ -1965,7 +1965,7 @@ void blo_end_packed_pointer_map(FileData *fd, Main *oldmain) /* undo file support: add all library pointers in lookup */ void blo_add_library_pointer_map(ListBase *old_mainlist, FileData *fd) { - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; LISTBASE_FOREACH (Main *, ptr, old_mainlist) { int i = set_listbasepointers(ptr, lbarray); @@ -4543,7 +4543,7 @@ void BLO_main_expander(BLOExpandDoitCallback expand_doit_func) */ void BLO_expand_main(void *fdhandle, Main *mainvar) { - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; FileData *fd = fdhandle; ID *id; int a; @@ -4713,7 +4713,7 @@ static void add_loose_object_data_to_scene(Main *mainvar, } /* Loop over all ID types, instancing object-data for ID types that have support for it. */ - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; int i = set_listbasepointers(mainvar, lbarray); while (i--) { const short idcode = BKE_idtype_idcode_from_index(i); @@ -4979,7 +4979,7 @@ static bool library_link_idcode_needs_tag_check(const short idcode, const int fl */ static void library_link_clear_tag(Main *mainvar, const int flag) { - for (int i = 0; i < MAX_LIBARRAY; i++) { + for (int i = 0; i < INDEX_ID_MAX; i++) { const short idcode = BKE_idtype_idcode_from_index(i); BLI_assert(idcode != -1); if (library_link_idcode_needs_tag_check(idcode, flag)) { @@ -5068,8 +5068,8 @@ static void split_main_newid(Main *mainptr, Main *main_newid) BLI_strncpy(main_newid->name, mainptr->name, sizeof(main_newid->name)); main_newid->curlib = mainptr->curlib; - ListBase *lbarray[MAX_LIBARRAY]; - ListBase *lbarray_newid[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; + ListBase *lbarray_newid[INDEX_ID_MAX]; int i = set_listbasepointers(mainptr, lbarray); set_listbasepointers(main_newid, lbarray_newid); while (i--) { @@ -5227,7 +5227,7 @@ void *BLO_library_read_struct(FileData *fd, BHead *bh, const char *blockname) static int has_linked_ids_to_read(Main *mainvar) { - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; int a = set_listbasepointers(mainvar, lbarray); while (a--) { @@ -5295,7 +5295,7 @@ static void read_library_linked_ids(FileData *basefd, { GHash *loaded_ids = BLI_ghash_str_new(__func__); - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; int a = set_listbasepointers(mainvar, lbarray); while (a--) { @@ -5344,7 +5344,7 @@ static void read_library_clear_weak_links(FileData *basefd, ListBase *mainlist, { /* Any remaining weak links at this point have been lost, silently drop * those by setting them to NULL pointers. */ - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; int a = set_listbasepointers(mainvar, lbarray); while (a--) { diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index d86ddc5b646..289092f7f19 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1141,7 +1141,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } } if (!MAIN_VERSION_ATLEAST(bmain, 276, 5)) { - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; int a; /* Important to clear all non-persistent flags from older versions here, diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 0a4f2fde93f..6fbd4b77487 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -768,7 +768,7 @@ static void write_userdef(BlendWriter *writer, const UserDef *userdef) /* Keep it last of write_foodata functions. */ static void write_libraries(WriteData *wd, Main *main) { - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; ID *id; int a, tot; bool found_one; @@ -954,7 +954,7 @@ static bool write_file_handle(Main *mainvar, * if needed, without duplicating whole code. */ Main *bmain = mainvar; do { - ListBase *lbarray[MAX_LIBARRAY]; + ListBase *lbarray[INDEX_ID_MAX]; int a = set_listbasepointers(bmain, lbarray); while (a--) { ID *id = lbarray[a]->first; |