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/image.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/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 38513f8b427..177601c4746 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -556,7 +556,7 @@ Image *BKE_image_load_exists_ex(Main *bmain, const char *filepath, bool *r_exist
BLI_path_abs(str, BKE_main_blendfile_path_from_global());
/* first search an identical filepath */
- for (ima = bmain->image.first; ima; ima = ima->id.next) {
+ for (ima = bmain->images.first; ima; ima = ima->id.next) {
if (ima->source != IMA_SRC_VIEWER && ima->source != IMA_SRC_GENERATED) {
STRNCPY(strtest, ima->name);
BLI_path_abs(strtest, ID_BLEND_PATH(bmain, &ima->id));
@@ -912,12 +912,12 @@ void BKE_image_print_memlist(Main *bmain)
Image *ima;
uintptr_t size, totsize = 0;
- for (ima = bmain->image.first; ima; ima = ima->id.next)
+ for (ima = bmain->images.first; ima; ima = ima->id.next)
totsize += image_mem_size(ima);
printf("\ntotal image memory len: %.3f MB\n", (double)totsize / (double)(1024 * 1024));
- for (ima = bmain->image.first; ima; ima = ima->id.next) {
+ for (ima = bmain->images.first; ima; ima = ima->id.next) {
size = image_mem_size(ima);
if (size)
@@ -940,14 +940,14 @@ void BKE_image_free_all_textures(Main *bmain)
uintptr_t tot_freed_size = 0;
#endif
- for (ima = bmain->image.first; ima; ima = ima->id.next)
+ for (ima = bmain->images.first; ima; ima = ima->id.next)
ima->id.tag &= ~LIB_TAG_DOIT;
- for (tex = bmain->tex.first; tex; tex = tex->id.next)
+ for (tex = bmain->textures.first; tex; tex = tex->id.next)
if (tex->ima)
tex->ima->id.tag |= LIB_TAG_DOIT;
- for (ima = bmain->image.first; ima; ima = ima->id.next) {
+ for (ima = bmain->images.first; ima; ima = ima->id.next) {
if (ima->cache && (ima->id.tag & LIB_TAG_DOIT)) {
#ifdef CHECK_FREED_SIZE
uintptr_t old_size = image_mem_size(ima);
@@ -987,7 +987,7 @@ void BKE_image_all_free_anim_ibufs(Main *bmain, int cfra)
{
Image *ima;
- for (ima = bmain->image.first; ima; ima = ima->id.next)
+ for (ima = bmain->images.first; ima; ima = ima->id.next)
if (BKE_image_is_animated(ima))
BKE_image_free_anim_ibufs(ima, cfra);
}
@@ -2570,7 +2570,7 @@ Image *BKE_image_verify_viewer(Main *bmain, int type, const char *name)
{
Image *ima;
- for (ima = bmain->image.first; ima; ima = ima->id.next)
+ for (ima = bmain->images.first; ima; ima = ima->id.next)
if (ima->source == IMA_SRC_VIEWER)
if (ima->type == type)
break;
@@ -2759,27 +2759,27 @@ void BKE_image_walk_id_all_users(ID *id, void *customdata,
void BKE_image_walk_all_users(const Main *mainp, void *customdata,
void callback(Image *ima, ImageUser *iuser, void *customdata))
{
- for (Scene *scene = mainp->scene.first; scene; scene = scene->id.next) {
+ for (Scene *scene = mainp->scenes.first; scene; scene = scene->id.next) {
BKE_image_walk_id_all_users(&scene->id, customdata, callback);
}
- for (Object *ob = mainp->object.first; ob; ob = ob->id.next) {
+ for (Object *ob = mainp->objects.first; ob; ob = ob->id.next) {
BKE_image_walk_id_all_users(&ob->id, customdata, callback);
}
- for (bNodeTree *ntree = mainp->nodetree.first; ntree; ntree = ntree->id.next) {
+ for (bNodeTree *ntree = mainp->nodetrees.first; ntree; ntree = ntree->id.next) {
BKE_image_walk_id_all_users(&ntree->id, customdata, callback);
}
- for (Material *ma = mainp->mat.first; ma; ma = ma->id.next) {
+ for (Material *ma = mainp->materials.first; ma; ma = ma->id.next) {
BKE_image_walk_id_all_users(&ma->id, customdata, callback);
}
- for (Tex *tex = mainp->tex.first; tex; tex = tex->id.next) {
+ for (Tex *tex = mainp->textures.first; tex; tex = tex->id.next) {
BKE_image_walk_id_all_users(&tex->id, customdata, callback);
}
- for (Camera *cam = mainp->camera.first; cam; cam = cam->id.next) {
+ for (Camera *cam = mainp->cameras.first; cam; cam = cam->id.next) {
BKE_image_walk_id_all_users(&cam->id, customdata, callback);
}
@@ -2949,7 +2949,7 @@ void BKE_image_signal(Main *bmain, Image *ima, ImageUser *iuser, int signal)
* this also makes sure all scenes are accounted for. */
{
Scene *scene;
- for (scene = bmain->scene.first; scene; scene = scene->id.next) {
+ for (scene = bmain->scenes.first; scene; scene = scene->id.next) {
if (scene->nodetree) {
nodeUpdateID(scene->nodetree, &ima->id);
}