diff options
Diffstat (limited to 'source/blender/blenkernel/intern/packedFile.c')
-rw-r--r-- | source/blender/blenkernel/intern/packedFile.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index 489fc2f3710..f17c10765b8 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -232,7 +232,7 @@ void packAll(Main *bmain, ReportList *reports, bool verbose) int tot = 0; for (ima = bmain->image.first; ima; ima = ima->id.next) { - if (BKE_image_has_packedfile(ima) == false && !ID_IS_LINKED_DATABLOCK(ima)) { + if (BKE_image_has_packedfile(ima) == false && !ID_IS_LINKED(ima)) { if (ima->source == IMA_SRC_FILE) { BKE_image_packfiles(reports, ima, ID_BLEND_PATH(bmain, &ima->id)); tot ++; @@ -245,14 +245,14 @@ void packAll(Main *bmain, ReportList *reports, bool verbose) } for (vfont = bmain->vfont.first; vfont; vfont = vfont->id.next) { - if (vfont->packedfile == NULL && !ID_IS_LINKED_DATABLOCK(vfont) && BKE_vfont_is_builtin(vfont) == false) { + if (vfont->packedfile == NULL && !ID_IS_LINKED(vfont) && BKE_vfont_is_builtin(vfont) == false) { vfont->packedfile = newPackedFile(reports, vfont->name, bmain->name); tot ++; } } for (sound = bmain->sound.first; sound; sound = sound->id.next) { - if (sound->packedfile == NULL && !ID_IS_LINKED_DATABLOCK(sound)) { + if (sound->packedfile == NULL && !ID_IS_LINKED(sound)) { sound->packedfile = newPackedFile(reports, sound->name, bmain->name); tot++; } @@ -354,16 +354,15 @@ int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, i return (ret_value); } - -/* + +/** * This function compares a packed file to a 'real' file. * It returns an integer indicating if: * - * PF_EQUAL - the packed file and original file are identical - * PF_DIFFERENT - the packed file and original file differ - * PF_NOFILE - the original file doens't exist + * - PF_EQUAL: the packed file and original file are identical + * - PF_DIFFERENT: the packed file and original file differ + * - PF_NOFILE: the original file doens't exist */ - int checkPackedFile(const char *filename, PackedFile *pf) { BLI_stat_t st; @@ -450,7 +449,7 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na break; } /* else create it */ - /* fall-through */ + ATTR_FALLTHROUGH; } case PF_WRITE_LOCAL: if (writePackedFile(reports, local_name, pf, 1) == RET_OK) { @@ -471,7 +470,7 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na break; } /* else create it */ - /* fall-through */ + ATTR_FALLTHROUGH; } case PF_WRITE_ORIGINAL: if (writePackedFile(reports, abs_name, pf, 1) == RET_OK) { @@ -522,6 +521,8 @@ static void unpack_generate_paths( case ID_IM: BLI_snprintf(r_relpath, relpathlen, "//textures/%s", tempname); break; + default: + break; } { @@ -712,6 +713,8 @@ bool BKE_pack_check(ID *id) Library *li = (Library *)id; return li->packedfile != NULL; } + default: + break; } return false; } @@ -750,5 +753,7 @@ void BKE_unpack_id(Main *bmain, ID *id, ReportList *reports, int how) BKE_reportf(reports, RPT_ERROR, "Cannot unpack individual Library file, '%s'", li->name); break; } + default: + break; } } |