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/editors/render
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/editors/render')
-rw-r--r--source/blender/editors/render/render_internal.c4
-rw-r--r--source/blender/editors/render/render_preview.c22
-rw-r--r--source/blender/editors/render/render_update.c10
3 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 216d9713b6a..b5546bd7b90 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -261,7 +261,7 @@ static void screen_render_single_layer_set(wmOperator *op, Main *mainp, ViewLaye
char scene_name[MAX_ID_NAME - 2];
RNA_string_get(op->ptr, "scene", scene_name);
- scn = (Scene *)BLI_findstring(&mainp->scene, scene_name, offsetof(ID, name) + 2);
+ scn = (Scene *)BLI_findstring(&mainp->scenes, scene_name, offsetof(ID, name) + 2);
if (scn) {
/* camera switch wont have updated */
@@ -817,7 +817,7 @@ static void clean_viewport_memory(Main *bmain, Scene *scene)
Base *base;
/* Tag all the available objects. */
- BKE_main_id_tag_listbase(&bmain->object, LIB_TAG_DOIT, true);
+ BKE_main_id_tag_listbase(&bmain->objects, LIB_TAG_DOIT, true);
/* Go over all the visible objects. */
for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) {
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 5ea63901085..9599a7bdbee 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -249,7 +249,7 @@ static Scene *preview_get_scene(Main *pr_main)
{
if (pr_main == NULL) return NULL;
- return pr_main->scene.first;
+ return pr_main->scenes.first;
}
static const char *preview_collection_name(const char pr_type)
@@ -307,7 +307,7 @@ static World *preview_get_localized_world(ShaderPreview *sp, World *world)
return sp->worldcopy;
}
sp->worldcopy = BKE_world_localize(world);
- BLI_addtail(&sp->pr_main->world, sp->worldcopy);
+ BLI_addtail(&sp->pr_main->worlds, sp->worldcopy);
return sp->worldcopy;
}
@@ -359,7 +359,7 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty
/* this flag tells render to not execute depsgraph or ipos etc */
sce->r.scemode |= R_BUTS_PREVIEW;
/* set world always back, is used now */
- sce->world = pr_main->world.first;
+ sce->world = pr_main->worlds.first;
/* now: exposure copy */
if (scene->world) {
sce->world->exp = scene->world->exp;
@@ -407,7 +407,7 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty
BLI_assert(sp->id_copy != NULL);
mat = sp->matcopy = (Material *)sp->id_copy;
sp->id_copy = NULL;
- BLI_addtail(&pr_main->mat, mat);
+ BLI_addtail(&pr_main->materials, mat);
/* use current scene world to light sphere */
if (mat->pr_type == MA_SPHERE_A && sp->pr_method == PR_BUTS_RENDER) {
@@ -467,7 +467,7 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty
BLI_assert(sp->id_copy != NULL);
tex = sp->texcopy = (Tex *)sp->id_copy;
sp->id_copy = NULL;
- BLI_addtail(&pr_main->tex, tex);
+ BLI_addtail(&pr_main->textures, tex);
}
set_preview_collection(sce, view_layer, MA_TEXTURE);
@@ -486,7 +486,7 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty
BLI_assert(sp->id_copy != NULL);
la = sp->lampcopy = (Light *)sp->id_copy;
sp->id_copy = NULL;
- BLI_addtail(&pr_main->light, la);
+ BLI_addtail(&pr_main->lights, la);
}
set_preview_collection(sce, view_layer, MA_LAMP);
@@ -520,7 +520,7 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty
BLI_assert(sp->id_copy != NULL);
wrld = sp->worldcopy = (World *)sp->id_copy;
sp->id_copy = NULL;
- BLI_addtail(&pr_main->world, wrld);
+ BLI_addtail(&pr_main->worlds, wrld);
}
set_preview_collection(sce, view_layer, MA_SKY);
@@ -900,19 +900,19 @@ static void shader_preview_free(void *customdata)
if (sp->matcopy) {
sp->id_copy = (ID *)sp->matcopy;
- BLI_remlink(&pr_main->mat, sp->matcopy);
+ BLI_remlink(&pr_main->materials, sp->matcopy);
}
if (sp->texcopy) {
sp->id_copy = (ID *)sp->texcopy;
- BLI_remlink(&pr_main->tex, sp->texcopy);
+ BLI_remlink(&pr_main->textures, sp->texcopy);
}
if (sp->worldcopy) {
sp->id_copy = (ID *)sp->worldcopy;
- BLI_remlink(&pr_main->world, sp->worldcopy);
+ BLI_remlink(&pr_main->worlds, sp->worldcopy);
}
if (sp->lampcopy) {
sp->id_copy = (ID *)sp->lampcopy;
- BLI_remlink(&pr_main->light, sp->lampcopy);
+ BLI_remlink(&pr_main->lights, sp->lampcopy);
}
if (sp->id_copy) {
/* node previews */
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 462fd997fc5..d99c9847ed6 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -176,7 +176,7 @@ void ED_render_engine_area_exit(Main *bmain, ScrArea *sa)
void ED_render_engine_changed(Main *bmain)
{
/* on changing the render engine type, clear all running render engines */
- for (bScreen *sc = bmain->screen.first; sc; sc = sc->id.next) {
+ for (bScreen *sc = bmain->screens.first; sc; sc = sc->id.next) {
for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) {
ED_render_engine_area_exit(bmain, sa);
}
@@ -185,7 +185,7 @@ void ED_render_engine_changed(Main *bmain)
/* Inform all render engines and draw managers. */
DEGEditorUpdateContext update_ctx = {NULL};
update_ctx.bmain = bmain;
- for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
+ for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
update_ctx.scene = scene;
LISTBASE_FOREACH(ViewLayer *, view_layer, &scene->view_layers) {
/* TDODO(sergey): Iterate over depsgraphs instead? */
@@ -225,7 +225,7 @@ static void texture_changed(Main *bmain, Tex *tex)
/* icons */
BKE_icon_changed(BKE_icon_id_ensure(&tex->id));
- for (scene = bmain->scene.first; scene; scene = scene->id.next) {
+ for (scene = bmain->scenes.first; scene; scene = scene->id.next) {
/* paint overlays */
for (view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
BKE_paint_invalidate_overlay_tex(scene, view_layer, tex);
@@ -254,7 +254,7 @@ static void image_changed(Main *bmain, Image *ima)
BKE_icon_changed(BKE_icon_id_ensure(&ima->id));
/* textures */
- for (tex = bmain->tex.first; tex; tex = tex->id.next)
+ for (tex = bmain->textures.first; tex; tex = tex->id.next)
if (tex->ima == ima)
texture_changed(bmain, tex);
}
@@ -264,7 +264,7 @@ static void scene_changed(Main *bmain, Scene *scene)
Object *ob;
/* glsl */
- for (ob = bmain->object.first; ob; ob = ob->id.next) {
+ for (ob = bmain->objects.first; ob; ob = ob->id.next) {
if (ob->mode & OB_MODE_TEXTURE_PAINT) {
BKE_texpaint_slots_refresh_object(scene, ob);
BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL);