Commit: 8f817de0cbef41dac81e6c7665ada509c3fe2988
Author: Campbell Barton
Date:   Fri Mar 8 09:29:17 2019 +1100
Branches: master
https://developer.blender.org/rB8f817de0cbef41dac81e6c7665ada509c3fe2988

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.

===================================================================

M       source/blender/alembic/intern/abc_mesh.cc
M       source/blender/blenkernel/BKE_main.h
M       source/blender/blenkernel/intern/action.c
M       source/blender/blenkernel/intern/anim_sys.c
M       source/blender/blenkernel/intern/blender_copybuffer.c
M       source/blender/blenkernel/intern/blendfile.c
M       source/blender/blenkernel/intern/brush.c
M       source/blender/blenkernel/intern/cachefile.c
M       source/blender/blenkernel/intern/collection.c
M       source/blender/blenkernel/intern/font.c
M       source/blender/blenkernel/intern/image.c
M       source/blender/blenkernel/intern/ipo.c
M       source/blender/blenkernel/intern/layer.c
M       source/blender/blenkernel/intern/library.c
M       source/blender/blenkernel/intern/library_remap.c
M       source/blender/blenkernel/intern/main.c
M       source/blender/blenkernel/intern/mask.c
M       source/blender/blenkernel/intern/material.c
M       source/blender/blenkernel/intern/mesh_convert.c
M       source/blender/blenkernel/intern/movieclip.c
M       source/blender/blenkernel/intern/node.c
M       source/blender/blenkernel/intern/object.c
M       source/blender/blenkernel/intern/object_dupli.c
M       source/blender/blenkernel/intern/packedFile.c
M       source/blender/blenkernel/intern/paint_toolslots.c
M       source/blender/blenkernel/intern/rigidbody.c
M       source/blender/blenkernel/intern/scene.c
M       source/blender/blenkernel/intern/sequencer.c
M       source/blender/blenkernel/intern/sound.c
M       source/blender/blenkernel/intern/workspace.c
M       source/blender/blenloader/intern/readblenentry.c
M       source/blender/blenloader/intern/readfile.c
M       source/blender/blenloader/intern/versioning_250.c
M       source/blender/blenloader/intern/versioning_260.c
M       source/blender/blenloader/intern/versioning_270.c
M       source/blender/blenloader/intern/versioning_280.c
M       source/blender/blenloader/intern/versioning_defaults.c
M       source/blender/blenloader/intern/versioning_legacy.c
M       source/blender/blenloader/intern/writefile.c
M       source/blender/bmesh/intern/bmesh_mesh_conv.c
M       source/blender/collada/collada_utils.cpp
M       source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc
M       
source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
M       source/blender/depsgraph/intern/depsgraph_build.cc
M       source/blender/depsgraph/intern/depsgraph_tag.cc
M       source/blender/editors/animation/anim_filter.c
M       source/blender/editors/animation/anim_markers.c
M       source/blender/editors/animation/keyingsets.c
M       source/blender/editors/armature/armature_naming.c
M       source/blender/editors/armature/armature_relations.c
M       source/blender/editors/armature/armature_utils.c
M       source/blender/editors/armature/pose_transform.c
M       source/blender/editors/curve/editcurve.c
M       source/blender/editors/gpencil/gpencil_edit.c
M       source/blender/editors/gpencil/gpencil_fill.c
M       source/blender/editors/gpencil/gpencil_old.c
M       source/blender/editors/gpencil/gpencil_paint.c
M       source/blender/editors/gpencil/gpencil_utils.c
M       source/blender/editors/interface/interface_ops.c
M       source/blender/editors/interface/interface_templates.c
M       source/blender/editors/mesh/editmesh_utils.c
M       source/blender/editors/object/object_add.c
M       source/blender/editors/object/object_bake_api.c
M       source/blender/editors/object/object_collection.c
M       source/blender/editors/object/object_constraint.c
M       source/blender/editors/object/object_edit.c
M       source/blender/editors/object/object_modifier.c
M       source/blender/editors/object/object_relations.c
M       source/blender/editors/object/object_select.c
M       source/blender/editors/object/object_transform.c
M       source/blender/editors/render/render_internal.c
M       source/blender/editors/render/render_preview.c
M       source/blender/editors/render/render_update.c
M       source/blender/editors/scene/scene_edit.c
M       source/blender/editors/screen/screen_edit.c
M       source/blender/editors/screen/screen_ops.c
M       source/blender/editors/screen/workspace_edit.c
M       source/blender/editors/sculpt_paint/paint_image.c
M       source/blender/editors/sculpt_paint/paint_image_proj.c
M       source/blender/editors/sculpt_paint/paint_ops.c
M       source/blender/editors/sound/sound_ops.c
M       source/blender/editors/space_image/image_ops.c
M       source/blender/editors/space_info/info_ops.c
M       source/blender/editors/space_nla/nla_edit.c
M       source/blender/editors/space_node/node_edit.c
M       source/blender/editors/space_node/node_relationships.c
M       source/blender/editors/space_node/node_templates.c
M       source/blender/editors/space_outliner/outliner_collections.c
M       source/blender/editors/space_outliner/outliner_tools.c
M       source/blender/editors/space_outliner/outliner_tree.c
M       source/blender/editors/space_sequencer/sequencer_add.c
M       source/blender/editors/space_text/text_ops.c
M       source/blender/editors/space_view3d/view3d_ops.c
M       source/blender/editors/space_view3d/view3d_snap.c
M       source/blender/editors/space_view3d/view3d_view.c
M       source/blender/editors/transform/transform_conversions.c
M       source/blender/editors/transform/transform_snap.c
M       source/blender/editors/util/ed_util.c
M       
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
M       source/blender/gpu/intern/gpu_draw.c
M       source/blender/gpu/intern/gpu_material.c
M       source/blender/imbuf/intern/colormanagement.c
M       source/blender/makesrna/intern/rna_armature.c
M       source/blender/makesrna/intern/rna_brush.c
M       source/blender/makesrna/intern/rna_color.c
M       source/blender/makesrna/intern/rna_key.c
M       source/blender/makesrna/intern/rna_lattice.c
M       source/blender/makesrna/intern/rna_main.c
M       source/blender/makesrna/intern/rna_main_api.c
M       source/blender/makesrna/intern/rna_material.c
M       source/blender/makesrna/intern/rna_meta.c
M       source/blender/makesrna/intern/rna_particle.c
M       source/blender/makesrna/intern/rna_scene.c
M       source/blender/makesrna/intern/rna_sculpt_paint.c
M       source/blender/makesrna/intern/rna_space.c
M       source/blender/makesrna/intern/rna_userdef.c
M       source/blender/makesrna/intern/rna_wm_gizmo.c
M       source/blender/nodes/composite/node_composite_tree.c
M       source/blender/nodes/composite/nodes/node_composite_image.c
M       source/blender/python/generic/bpy_internal_import.c
M       source/blender/python/intern/bpy_interface.c
M       source/blender/python/intern/bpy_rna.c
M       source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
M       source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
M       source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c
M       source/blender/windowmanager/intern/wm_event_system.c
M       source/blender/windowmanager/intern/wm_files.c
M       source/blender/windowmanager/intern/wm_operators.c
M       source/blender/windowmanager/intern/wm_toolsystem.c
M       source/creator/creator_args.c

===================================================================

diff --git a/source/blender/alembic/intern/abc_mesh.cc 
b/source/blender/alembic/intern/abc_mesh.cc
index 50d9567fba7..e7771827b2b 100644
--- a/source/blender/alembic/intern/abc_mesh.cc
+++ b/source/blender/alembic/intern/abc_mesh.cc
@@ -682,7 +682,7 @@ namespace utils {
 
 static void build_mat_map(const Main *bmain, std::map<std::string, Material *> 
&mat_map)
 {
-       Material *material = static_cast<Material *>(bmain->mat.first);
+       Material *material = static_cast<Material *>(bmain->materials.first);
 
        for (; material; material = static_cast<Material *>(material->id.next)) 
{
                mat_map[material->id.name + 2] = material;
diff --git a/source/blender/blenkernel/BKE_main.h 
b/source/blender/blenkernel/BKE_main.h
index 48f9ac1a0da..03f9f9a21ea 100644
--- a/source/blender/blenkernel/BKE_main.h
+++ b/source/blender/blenkernel/BKE_main.h
@@ -84,42 +84,42 @@ typedef struct Main {
        BlendThumbnail *blen_thumb;
 
        struct Library *curlib;
-       ListBase scene;
-       ListBase library;
-       ListBase object;
-       ListBase mesh;
-       ListBase curve;
-       ListBase mball;
-       ListBase mat;
-       ListBase tex;
-       ListBase image;
-       ListBase lattice;
-       ListBase light;
-       ListBase camera;
-       ListBase ipo;   // XXX deprecated
-       ListBase key;
-       ListBase world;
-       ListBase screen;
-       ListBase vfont;
-       ListBase text;
-       ListBase speaker;
-       ListBase lightprobe;
-       ListBase sound;
-       ListBase collection;
-       ListBase armature;
-       ListBase action;
-       ListBase nodetree;
-       ListBase brush;
-       ListBase particle;
-       ListBase palette;
-       ListBase paintcurve;
-       ListBase wm;
-       ListBase gpencil;
-       ListBase movieclip;
-       ListBase mask;
-       ListBase linestyle;
-       ListBase cachefile;
-       ListBase workspace;
+       ListBase scenes;
+       ListBase libraries;
+       ListBase objects;
+       ListBase meshes;
+       ListBase curves;
+       ListBase metaballs;
+       ListBase materials;
+       ListBase textures;
+       ListBase images;
+       ListBase lattices;
+       ListBase lights;
+       ListBase cameras;
+       ListBase ipo;  /* Deprecated (only for versioning). */
+       ListBase shapekeys;
+       ListBase worlds;
+       ListBase screens;
+       ListBase fonts;
+       ListBase texts;
+       ListBase speakers;
+       ListBase lightprobes;
+       ListBase sounds;
+       ListBase collections;
+       ListBase armatures;
+       ListBase actions;
+       ListBase nodetrees;
+       ListBase brushes;
+       ListBase particles;
+       ListBase palettes;
+       ListBase paintcurves;
+       ListBase wm;  /* Singleton (exception). */
+       ListBase gpencils;
+       ListBase movieclips;
+       ListBase masks;
+       ListBase linestyles;
+       ListBase cachefiles;
+       ListBase workspaces;
 
        /* Must be generated, used and freed by same code - never assume this 
is valid data unless you know
         * when, who and how it was created.
diff --git a/source/blender/blenkernel/intern/action.c 
b/source/blender/blenkernel/intern/action.c
index 0a45e9c0172..9ba3a23df05 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -1005,7 +1005,7 @@ void framechange_poses_clear_unkeyed(Main *bmain)
 
        /* This needs to be done for each object that has a pose */
        /* TODO: proxies may/may not be correctly handled here... (this needs 
checking) */
-       for (ob = bmain->object.first; ob; ob = ob->id.next) {
+       for (ob = bmain->objects.first; ob; ob = ob->id.next) {
                /* we only need to do this on objects with a pose */
                if ((pose = ob->pose)) {
                        for (pchan = pose->chanbase.first; pchan; pchan = 
pchan->next) {
diff --git a/source/blender/blenkernel/intern/anim_sys.c 
b/source/blender/blenkernel/intern/anim_sys.c
index 7c1c26948b4..33f19caf1cc 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1135,70 +1135,70 @@ void BKE_animdata_main_cb(Main *bmain, 
ID_AnimData_Edit_Callback func, void *use
        } (void)0
 
        /* nodes */
-       ANIMDATA_IDS_CB(bmain->nodetree.first);
+       ANIMDATA_IDS_CB(bmain->nodetrees.first);
 
        /* textures */
-       ANIMDATA_NODETREE_IDS_CB(bmain->tex.first, Tex);
+       ANIMDATA_NODETREE_IDS_CB(bmain->textures.first, Tex);
 
        /* lights */
-       ANIMDATA_NODETREE_IDS_CB(bmain->light.first, Light);
+       ANIMDATA_NODETREE_IDS_CB(bmain->lights.first, Light);
 
        /* materials */
-       ANIMDATA_NODETREE_IDS_CB(bmain->mat.first, Material);
+       ANIMDATA_NODETREE_IDS_CB(bmain->materials.first, Material);
 
        /* cameras */
-       ANIMDATA_IDS_CB(bmain->camera.first);
+       ANIMDATA_IDS_CB(bmain->cameras.first);
 
        /* shapekeys */
-       ANIMDATA_IDS_CB(bmain->key.first);
+       ANIMDATA_IDS_CB(bmain->shapekeys.first);
 
        /* metaballs */
-       ANIMDATA_IDS_CB(bmain->mball.first);
+       ANIMDATA_IDS_CB(bmain->metaballs.first);
 
        /* curves */
-       ANIMDATA_IDS_CB(bmain->curve.first);
+       ANIMDATA_IDS_CB(bmain->curves.first);
 
        /* armatures */
-       ANIMDATA_IDS_CB(bmain->armature.first);
+       ANIMDATA_IDS_CB(bmain->armatures.first);
 
        /* lattices */
-       ANIMDATA_IDS_CB(bmain->lattice.first);
+       ANIMDATA_IDS_CB(bmain->lattices.first);
 
        /* meshes */
-       ANIMDATA_IDS_CB(bmain->mesh.first);
+       ANIMDATA_IDS_CB(bmain->meshes.first);
 
        /* particles */
-       ANIMDATA_IDS_CB(bmain->particle.first);
+       ANIMDATA_IDS_CB(bmain->particles.first);
 
        /* speakers */
-       ANIMDATA_IDS_CB(bmain->speaker.first);
+       ANIMDATA_IDS_CB(bmain->speakers.first);
 
        /* movie clips */
-       ANIMDATA_IDS_CB(bmain->movieclip.first);
+       ANIMDATA_IDS_CB(bmain->movieclips.first);
 
        /* objects */
-       ANIMDATA_IDS_CB(bmain->object.first);
+       ANIMDATA_IDS_CB(bmain->objects.first);
 
        /* masks */
-       ANIMDATA_IDS_CB(bmain->mask.first);
+       ANIMDATA_IDS_CB(bmain->masks.first);
 
        /* worlds */
-       ANIMDATA_NODETREE_IDS_CB(bmain->world.first, World);
+       ANIMDATA_NODETREE_IDS_CB(bmain->worlds.first, World);
 
        /* scenes */
-       ANIMDATA_NODETREE_IDS_CB(bmain->scene.first, Scene);
+       ANIMDATA_NODETREE_IDS_CB(bmain->scenes.first, Scene);
 
        /* line styles */
-       ANIMDATA_IDS_CB(bmain->linestyle.first);
+       ANIMDATA_IDS_CB(bmain->linestyles.first);
 
        /* grease pencil */
-       ANIMDATA_IDS_CB(bmain->gpencil.first);
+       ANIMDATA_IDS_CB(bmain->gpencils.first);
 
        /* palettes */
-       ANIMDATA_IDS_CB(bmain->palette.first);
+       ANIMDATA_IDS_CB(bmain->palettes.first);
 
        /* cache files */
-       ANIMDATA_IDS_CB(bmain->cachefile.first);
+       ANIMDATA_IDS_CB(bmain->cachefiles.first);
 }
 
 /* Fix all RNA-Paths throughout the database (directly access the Global.main 
version)
@@ -1234,67 +1234,67 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id, 
const char *prefix, const cha
        } (void)0
 
        /* nodes */
-       RENAMEFIX_ANIM_IDS(bmain->nodetree.first);
+       RENAMEFIX_ANIM_IDS(bmain->nodetrees.first);
 
        /* textures */
-       RENAMEFIX_ANIM_NODETREE_IDS(bmain->tex.first, Tex);
+       RENAMEFIX_ANIM_NODETREE_IDS(bmain->textures.first, Tex);
 
        /* lights */
-       RENAMEFIX_ANIM_NODETREE_IDS(bmain->light.first, Light);
+       RENAMEFIX_ANIM_NODETREE_IDS(bmain->lights.first, Light);
 
        /* materials */
-       RENAMEFIX_ANIM_NODETREE_IDS(bmain->mat.first, Material);
+       RENAMEFIX_ANIM_NODETREE_IDS(bmain->materials.first, Material);
 
        /* cameras */
-       RENAMEFIX_ANIM_IDS(bmain->camera.first);
+       RENAMEFIX_ANIM_IDS(bmain->cameras.first);
 
        /* shapekeys */
-       RENAMEFIX_ANIM_IDS(bmain->key.first);
+       RENAMEFIX_ANIM_IDS(bmain->shapekeys.first);
 
        /* metaballs */
-       RENAMEFIX_ANIM_IDS(bmain->mball.first);
+       RENAMEFIX_ANIM_IDS(bmain->metaballs.first);
 
        /* curves */
-       RENAMEFIX_ANIM_IDS(bmain->curve.first);
+       RENAMEFIX_ANIM_IDS(bmain->curves.first);
 
        /* armatures */
-       RENAMEFIX_ANIM_IDS(bmain->armature.first);
+       RENAMEFIX_ANIM_IDS(bmain->armatures.first);
 
        /* lattices */
-       RENAMEFIX_ANIM_IDS(bmain->lattice.first);
+       RENAMEFIX_ANIM_IDS(bmain->lattices.first);
 
        /* meshes */
-       RENAMEFIX_ANIM_IDS(bmain->mesh.first);
+       RENAMEFIX_ANIM_IDS(bmain->meshes.first);
 
        /* particles */
-       RENAMEFIX_ANIM_IDS(bmain->particle.first);
+       RENAMEFIX_ANIM_IDS(bmain->particles.first);
 
        /* speakers */
-       RENAMEFIX_ANIM_IDS(bmain->speaker.first);
+       RENAMEFIX_ANIM_IDS(bmain->speakers.first);
 
        /* movie clips */
-       RENAMEFIX_ANIM_IDS(bmain->movieclip.first);
+       RENAMEFIX_ANIM_IDS(bmain->movieclips.first);
 
        /* objects */
-       RENAMEFIX_ANIM_IDS(bmain->object.first);
+       RENAMEFIX_ANIM_IDS(bmain->objects.first);
 
        /* masks */
-       RENAMEFIX_ANIM_IDS(bmain->mask.first);
+       RENAMEFIX_ANIM_IDS(bmain->masks.first);
 
        /* worlds */
-       RENAMEFIX_ANIM_NODETREE_IDS(bmain->world.first, World);
+       RENAMEFIX_ANIM_NODETREE_IDS(bmain->worlds.first, World);
 
        /* linestyles */
-       RENAMEFIX_ANIM_IDS(bmain->linestyle.first);
+       RENAMEFIX_ANIM_IDS(bmain->linestyles.first);
 
        /* grease pencil */
-       RENAMEFIX_ANIM_IDS(bmain->gpencil.first);
+       RENAMEFIX_ANIM_IDS(bmain->gpencils.first);
 
        /* cache files */
-       RENAMEFIX_ANIM_IDS(bmain->cachefile.first);
+       RENAMEFIX_ANIM_IDS(bmain->cachefiles.first);
 
        /* scenes */
-       RENAMEFIX_ANIM_NODETREE_IDS(bmain->scene.first, Scene);
+       RENAMEFIX_ANIM_NODETREE_IDS(bmain->scenes.first, Scene);
 }
 
 /* *********************************** */
@@ -3608,7 +3608,7 @@ void BKE_animsys_evaluate_all_animation(Main *main, 
Depsgraph *depsgraph, Scene
         * however, if there are some curves, we will need to make sure that 
their 'ctime' property gets
         * set correctly, so this optimization must be skipped in that case...
         */
-       if (BLI_listbase_is_empty(&main->action) && 
BLI_listbase_is_empty(&main->curve)) {
+       if (BLI_listbase_is_empty(&main->actions) && 
BLI_listbase_is_empty(&main->curves)) {
                if (G.debug & G_DEBUG)
                        printf("\tNo Actions, so no animation needs to be 
evaluated...\n");
 
@@ -3616,74 +3616,74 @@ void BKE_animsys_evaluate_all_animation(Main *main, 
Depsgraph *depsgraph, Scene
        }
 
        /* nodes */
-       EVAL_ANIM_IDS(main->nodetree.first, ADT_RECALC_ANIM);
+       EVAL_ANIM_IDS(main->nodetrees.first, ADT_RECALC_ANIM);
 
        /* textures */
-       EVAL_ANIM_NODETREE_IDS(main->tex.first, Tex, ADT_RECALC_ANIM);
+       EVAL_ANIM_NODETREE_IDS(main->textures.first, Tex, ADT_RECALC_ANIM);
 
        /* lights */
-       EVAL_ANIM_NODETREE_IDS(main->light.first, Light, ADT_RECALC_ANIM);
+       EVAL_ANIM_NODETREE_IDS(main->lights.first, Light, ADT_RECALC_ANIM);
 
        /* materials */
-       EVAL_ANIM_NODETREE_IDS(main->mat.first, Material, ADT_RECALC_ANIM);
+       EVAL_ANIM_NODETREE_IDS(main->materials.first, Material, 
ADT_RECALC_ANIM);
 
        /* cameras */
-       EVAL_ANIM_IDS(main->camera.first, ADT_RECALC_ANIM);
+       EVAL_ANIM_IDS(main->cameras.first, ADT_RECALC_ANIM);
 
        /* shapekeys */
-       EVAL_ANIM_IDS(main->key.first, ADT_RECALC_ANIM);
+       EVAL_ANIM_IDS(main->shapekeys.first, ADT_REC

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to