From 8f817de0cbef41dac81e6c7665ada509c3fe2988 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 8 Mar 2019 09:29:17 +1100 Subject: 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. --- source/blender/editors/sculpt_paint/paint_image.c | 2 +- source/blender/editors/sculpt_paint/paint_image_proj.c | 2 +- source/blender/editors/sculpt_paint/paint_ops.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 510f9827736..4749d2a3308 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -1112,7 +1112,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) } if (ima) { - for (sc = bmain->screen.first; sc; sc = sc->id.next) { + for (sc = bmain->screens.first; sc; sc = sc->id.next) { ScrArea *sa; for (sa = sc->areabase.first; sa; sa = sa->next) { SpaceLink *sl; diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index e26d9b1ef9d..f8a2259d4a5 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -5704,7 +5704,7 @@ void paint_proj_stroke_done(void *ps_handle_p) /* use project paint to re-apply an image */ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) { - Image *image = BLI_findlink(&CTX_data_main(C)->image, RNA_enum_get(op->ptr, "image")); + Image *image = BLI_findlink(&CTX_data_main(C)->images, RNA_enum_get(op->ptr, "image")); Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); ProjPaintState ps = {NULL}; diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 03f69750aca..12e98bc5d33 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -348,7 +348,7 @@ static Brush *brush_tool_cycle(Main *bmain, Paint *paint, Brush *brush_orig, con { Brush *brush, *first_brush; - if (!brush_orig && !(brush_orig = bmain->brush.first)) { + if (!brush_orig && !(brush_orig = bmain->brushes.first)) { return NULL; } @@ -362,7 +362,7 @@ static Brush *brush_tool_cycle(Main *bmain, Paint *paint, Brush *brush_orig, con /* Try to tool-slot first. */ first_brush = BKE_paint_toolslots_brush_get(paint, tool); if (first_brush == NULL) { - first_brush = bmain->brush.first; + first_brush = bmain->brushes.first; } } else { @@ -370,7 +370,7 @@ static Brush *brush_tool_cycle(Main *bmain, Paint *paint, Brush *brush_orig, con * currently active brush do a cycling via all possible * brushes with requested tool. */ - first_brush = brush_orig->id.next ? brush_orig->id.next : bmain->brush.first; + first_brush = brush_orig->id.next ? brush_orig->id.next : bmain->brushes.first; } /* get the next brush with the active tool */ @@ -382,7 +382,7 @@ static Brush *brush_tool_cycle(Main *bmain, Paint *paint, Brush *brush_orig, con return brush; } - brush = brush->id.next ? brush->id.next : bmain->brush.first; + brush = brush->id.next ? brush->id.next : bmain->brushes.first; } while (brush != first_brush); return NULL; -- cgit v1.2.3