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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-08 01:29:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-08 01:50:00 +0300
commit8f817de0cbef41dac81e6c7665ada509c3fe2988 (patch)
tree0802c3287116ce0bf600adc4bed8cba31cfc97b1 /source/blender/blenkernel/intern/packedFile.c
parente68ac2827dd4f8ad346011a8a408b342e2718707 (diff)
Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f7e we agree its best to change the convention. Names now mostly follow RNA. Some exceptions: - Use 'nodetrees' instead of 'nodegroups' since the struct is called NodeTree. - Use 'gpencils' instead of 'grease_pencil' since 'gpencil' is a common abbreviation in the C code. Other exceptions: - Leave 'wm' as it's a list of one. - Leave 'ipo' as is for versioning.
Diffstat (limited to 'source/blender/blenkernel/intern/packedFile.c')
-rw-r--r--source/blender/blenkernel/intern/packedFile.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 340acc5a96e..a039e0544d5 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -118,15 +118,15 @@ int countPackedFiles(Main *bmain)
int count = 0;
/* let's check if there are packed files... */
- for (ima = bmain->image.first; ima; ima = ima->id.next)
+ for (ima = bmain->images.first; ima; ima = ima->id.next)
if (BKE_image_has_packedfile(ima))
count ++;
- for (vf = bmain->vfont.first; vf; vf = vf->id.next)
+ for (vf = bmain->fonts.first; vf; vf = vf->id.next)
if (vf->packedfile)
count++;
- for (sound = bmain->sound.first; sound; sound = sound->id.next)
+ for (sound = bmain->sounds.first; sound; sound = sound->id.next)
if (sound->packedfile)
count++;
@@ -222,7 +222,7 @@ void packAll(Main *bmain, ReportList *reports, bool verbose)
bSound *sound;
int tot = 0;
- for (ima = bmain->image.first; ima; ima = ima->id.next) {
+ for (ima = bmain->images.first; ima; ima = ima->id.next) {
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));
@@ -235,14 +235,14 @@ void packAll(Main *bmain, ReportList *reports, bool verbose)
}
}
- for (vfont = bmain->vfont.first; vfont; vfont = vfont->id.next) {
+ for (vfont = bmain->fonts.first; vfont; vfont = vfont->id.next) {
if (vfont->packedfile == NULL && !ID_IS_LINKED(vfont) && BKE_vfont_is_builtin(vfont) == false) {
vfont->packedfile = newPackedFile(reports, vfont->name, BKE_main_blendfile_path(bmain));
tot ++;
}
}
- for (sound = bmain->sound.first; sound; sound = sound->id.next) {
+ for (sound = bmain->sounds.first; sound; sound = sound->id.next) {
if (sound->packedfile == NULL && !ID_IS_LINKED(sound)) {
sound->packedfile = newPackedFile(reports, sound->name, BKE_main_blendfile_path(bmain));
tot++;
@@ -598,7 +598,7 @@ int unpackLibraries(Main *bmain, ReportList *reports)
char *newname;
int ret_value = RET_ERROR;
- for (lib = bmain->library.first; lib; lib = lib->id.next) {
+ for (lib = bmain->libraries.first; lib; lib = lib->id.next) {
if (lib->packedfile && lib->name[0]) {
newname = unpackFile(reports, BKE_main_blendfile_path(bmain), lib->filepath, lib->filepath, lib->packedfile, PF_WRITE_ORIGINAL);
@@ -623,7 +623,7 @@ void packLibraries(Main *bmain, ReportList *reports)
Library *lib;
/* test for relativenss */
- for (lib = bmain->library.first; lib; lib = lib->id.next)
+ for (lib = bmain->libraries.first; lib; lib = lib->id.next)
if (!BLI_path_is_rel(lib->name))
break;
@@ -632,7 +632,7 @@ void packLibraries(Main *bmain, ReportList *reports)
return;
}
- for (lib = bmain->library.first; lib; lib = lib->id.next)
+ for (lib = bmain->libraries.first; lib; lib = lib->id.next)
if (lib->packedfile == NULL)
lib->packedfile = newPackedFile(reports, lib->name, BKE_main_blendfile_path(bmain));
}
@@ -643,15 +643,15 @@ void unpackAll(Main *bmain, ReportList *reports, int how)
VFont *vf;
bSound *sound;
- for (ima = bmain->image.first; ima; ima = ima->id.next)
+ for (ima = bmain->images.first; ima; ima = ima->id.next)
if (BKE_image_has_packedfile(ima))
unpackImage(bmain, reports, ima, how);
- for (vf = bmain->vfont.first; vf; vf = vf->id.next)
+ for (vf = bmain->fonts.first; vf; vf = vf->id.next)
if (vf->packedfile)
unpackVFont(bmain, reports, vf, how);
- for (sound = bmain->sound.first; sound; sound = sound->id.next)
+ for (sound = bmain->sounds.first; sound; sound = sound->id.next)
if (sound->packedfile)
unpackSound(bmain, reports, sound, how);
}