Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c5
-rw-r--r--source/blender/blenloader/intern/readfile.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 505c236e01f..bd759e2c580 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1847,11 +1847,12 @@ static void *read_struct(FileData *fd, BHead *bh, const char *blockname)
if (bh->SDNAnr && (fd->flags & FD_FLAGS_SWITCH_ENDIAN))
switch_endian_structs(fd->filesdna, bh);
- if (fd->compflags[bh->SDNAnr]) { /* flag==0: doesn't exist anymore */
- if (fd->compflags[bh->SDNAnr] == 2) {
+ if (fd->compflags[bh->SDNAnr] != SDNA_CMP_REMOVED) {
+ if (fd->compflags[bh->SDNAnr] == SDNA_CMP_NOT_EQUAL) {
temp = DNA_struct_reconstruct(fd->memsdna, fd->filesdna, fd->compflags, bh->SDNAnr, bh->nr, (bh+1));
}
else {
+ /* SDNA_CMP_EQUAL */
temp = MEM_mallocN(bh->len, blockname);
memcpy(temp, (bh+1), bh->len);
}
diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h
index f6c3b69c414..00e19b0597a 100644
--- a/source/blender/blenloader/intern/readfile.h
+++ b/source/blender/blenloader/intern/readfile.h
@@ -75,7 +75,7 @@ typedef struct FileData {
// general reading variables
struct SDNA *filesdna;
struct SDNA *memsdna;
- char *compflags;
+ char *compflags; /* array of eSDNA_StructCompare */
int fileversion;
int id_name_offs; /* used to retrieve ID names from (bhead+1) */