diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-08 01:29:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-08 01:50:00 +0300 |
commit | 8f817de0cbef41dac81e6c7665ada509c3fe2988 (patch) | |
tree | 0802c3287116ce0bf600adc4bed8cba31cfc97b1 /source/blender/editors/gpencil | |
parent | e68ac2827dd4f8ad346011a8a408b342e2718707 (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/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_old.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index e1e1d6a2814..088282c0f02 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -992,7 +992,7 @@ static GHash *gp_strokes_copypastebuf_colors_material_to_name_create(Main *bmain { GHash *ma_to_name = BLI_ghash_ptr_new(__func__); - for (Material *ma = bmain->mat.first; ma != NULL; ma = ma->id.next) { + for (Material *ma = bmain->materials.first; ma != NULL; ma = ma->id.next) { char *name = BKE_id_to_unique_string_key(&ma->id); BLI_ghash_insert(ma_to_name, ma, name); } @@ -1009,7 +1009,7 @@ static GHash *gp_strokes_copypastebuf_colors_name_to_material_create(Main *bmain { GHash *name_to_ma = BLI_ghash_str_new(__func__); - for (Material *ma = bmain->mat.first; ma != NULL; ma = ma->id.next) { + for (Material *ma = bmain->materials.first; ma != NULL; ma = ma->id.next) { char *name = BKE_id_to_unique_string_key(&ma->id); BLI_ghash_insert(name_to_ma, name, ma); } diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index e26acb76a51..680568a96c5 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1124,9 +1124,9 @@ static void gpencil_fill_exit(bContext *C, wmOperator *op) /* delete temp image */ if (tgpf->ima) { - for (Image *ima = bmain->image.first; ima; ima = ima->id.next) { + for (Image *ima = bmain->images.first; ima; ima = ima->id.next) { if (ima == tgpf->ima) { - BLI_remlink(&bmain->image, ima); + BLI_remlink(&bmain->images, ima); BKE_image_free(tgpf->ima); MEM_SAFE_FREE(tgpf->ima); break; diff --git a/source/blender/editors/gpencil/gpencil_old.c b/source/blender/editors/gpencil/gpencil_old.c index 6f3a9bba4e2..b1924b3cacd 100644 --- a/source/blender/editors/gpencil/gpencil_old.c +++ b/source/blender/editors/gpencil/gpencil_old.c @@ -165,7 +165,7 @@ static int gpencil_convert_old_files_exec(bContext *C, wmOperator *UNUSED(op)) #if 0 /* GPXX */ /* Handle object-linked grease pencil datablocks */ - for (Object *ob = bmain->object.first; ob; ob = ob->id.next) { + for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { if (ob->gpd) { if (ob->type == OB_GPENCIL) { /* GP Object - remap the links */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 817d10d4b2f..6cd76fb71ed 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1731,7 +1731,7 @@ static Brush *gp_get_default_eraser(Main *bmain, ToolSettings *ts) Brush *brush_dft = NULL; Paint *paint = &ts->gp_paint->paint; Brush *brush_old = paint->brush; - for (Brush *brush = bmain->brush.first; brush; brush = brush->id.next) { + for (Brush *brush = bmain->brushes.first; brush; brush = brush->id.next) { if ((brush->ob_mode == OB_MODE_PAINT_GPENCIL) && (brush->gpencil_tool == GPAINT_TOOL_ERASE)) { @@ -1773,7 +1773,7 @@ static void gp_set_default_eraser(Main *bmain, Brush *brush_dft) return; } - for (Brush *brush = bmain->brush.first; brush; brush = brush->id.next) { + for (Brush *brush = bmain->brushes.first; brush; brush = brush->id.next) { if ((brush->gpencil_settings) && (brush->gpencil_tool == GPAINT_TOOL_ERASE)) { if (brush == brush_dft) { brush->gpencil_settings->flag |= GP_BRUSH_DEFAULT_ERASER; diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 5544e0c5c4c..5f703808d53 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -1969,7 +1969,7 @@ void ED_gpencil_update_color_uv(Main *bmain, Material *mat) { Material *gps_ma = NULL; /* read all strokes */ - for (Object *ob = bmain->object.first; ob; ob = ob->id.next) { + for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { if (ob->type == OB_GPENCIL) { bGPdata *gpd = ob->data; if (gpd == NULL) { |