From 415af0bec879b6f529fe660acca6a595c667aa5e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 16 Jul 2014 15:13:40 +1000 Subject: Cleanup: Adhere to our naming convention for BKE_linestyle.h API --- source/blender/editors/render/render_shading.c | 36 +++++++++++----------- .../editors/space_buttons/buttons_context.c | 2 +- .../editors/space_buttons/buttons_texture.c | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 9cc672fe8ae..f76fd5e1fc9 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -891,10 +891,10 @@ static int freestyle_linestyle_new_exec(bContext *C, wmOperator *op) } if (lineset->linestyle) { lineset->linestyle->id.us--; - lineset->linestyle = BKE_copy_linestyle(lineset->linestyle); + lineset->linestyle = BKE_linestyle_copy(lineset->linestyle); } else { - lineset->linestyle = BKE_new_linestyle("LineStyle", NULL); + lineset->linestyle = BKE_linestyle_new("LineStyle", NULL); } DAG_id_tag_update(&lineset->linestyle->id, 0); WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); @@ -928,7 +928,7 @@ static int freestyle_color_modifier_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - if (BKE_add_linestyle_color_modifier(lineset->linestyle, NULL, type) == NULL) { + if (BKE_linestyle_modifier_add_color(lineset->linestyle, NULL, type) == NULL) { BKE_report(op->reports, RPT_ERROR, "Unknown line color modifier type"); return OPERATOR_CANCELLED; } @@ -968,7 +968,7 @@ static int freestyle_alpha_modifier_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - if (BKE_add_linestyle_alpha_modifier(lineset->linestyle, NULL, type) == NULL) { + if (BKE_linestyle_modifier_add_alpha(lineset->linestyle, NULL, type) == NULL) { BKE_report(op->reports, RPT_ERROR, "Unknown alpha transparency modifier type"); return OPERATOR_CANCELLED; } @@ -1008,7 +1008,7 @@ static int freestyle_thickness_modifier_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - if (BKE_add_linestyle_thickness_modifier(lineset->linestyle, NULL, type) == NULL) { + if (BKE_linestyle_modifier_add_thickness(lineset->linestyle, NULL, type) == NULL) { BKE_report(op->reports, RPT_ERROR, "Unknown line thickness modifier type"); return OPERATOR_CANCELLED; } @@ -1048,7 +1048,7 @@ static int freestyle_geometry_modifier_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - if (BKE_add_linestyle_geometry_modifier(lineset->linestyle, NULL, type) == NULL) { + if (BKE_linestyle_modifier_add_geometry(lineset->linestyle, NULL, type) == NULL) { BKE_report(op->reports, RPT_ERROR, "Unknown stroke geometry modifier type"); return OPERATOR_CANCELLED; } @@ -1104,16 +1104,16 @@ static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op) switch (freestyle_get_modifier_type(&ptr)) { case LS_MODIFIER_TYPE_COLOR: - BKE_remove_linestyle_color_modifier(lineset->linestyle, modifier); + BKE_linestyle_modifier_remove_color(lineset->linestyle, modifier); break; case LS_MODIFIER_TYPE_ALPHA: - BKE_remove_linestyle_alpha_modifier(lineset->linestyle, modifier); + BKE_linestyle_modifier_remove_alpha(lineset->linestyle, modifier); break; case LS_MODIFIER_TYPE_THICKNESS: - BKE_remove_linestyle_thickness_modifier(lineset->linestyle, modifier); + BKE_linestyle_modifier_remove_thickness(lineset->linestyle, modifier); break; case LS_MODIFIER_TYPE_GEOMETRY: - BKE_remove_linestyle_geometry_modifier(lineset->linestyle, modifier); + BKE_linestyle_modifier_remove_geometry(lineset->linestyle, modifier); break; default: BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); @@ -1154,16 +1154,16 @@ static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op) switch (freestyle_get_modifier_type(&ptr)) { case LS_MODIFIER_TYPE_COLOR: - BKE_copy_linestyle_color_modifier(lineset->linestyle, modifier); + BKE_linestyle_modifier_copy_color(lineset->linestyle, modifier); break; case LS_MODIFIER_TYPE_ALPHA: - BKE_copy_linestyle_alpha_modifier(lineset->linestyle, modifier); + BKE_linestyle_modifier_copy_alpha(lineset->linestyle, modifier); break; case LS_MODIFIER_TYPE_THICKNESS: - BKE_copy_linestyle_thickness_modifier(lineset->linestyle, modifier); + BKE_linestyle_modifier_copy_thickness(lineset->linestyle, modifier); break; case LS_MODIFIER_TYPE_GEOMETRY: - BKE_copy_linestyle_geometry_modifier(lineset->linestyle, modifier); + BKE_linestyle_modifier_copy_geometry(lineset->linestyle, modifier); break; default: BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); @@ -1205,16 +1205,16 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op) switch (freestyle_get_modifier_type(&ptr)) { case LS_MODIFIER_TYPE_COLOR: - BKE_move_linestyle_color_modifier(lineset->linestyle, modifier, dir); + BKE_linestyle_modifier_move_color(lineset->linestyle, modifier, dir); break; case LS_MODIFIER_TYPE_ALPHA: - BKE_move_linestyle_alpha_modifier(lineset->linestyle, modifier, dir); + BKE_linestyle_modifier_move_alpha(lineset->linestyle, modifier, dir); break; case LS_MODIFIER_TYPE_THICKNESS: - BKE_move_linestyle_thickness_modifier(lineset->linestyle, modifier, dir); + BKE_linestyle_modifier_move_thickness(lineset->linestyle, modifier, dir); break; case LS_MODIFIER_TYPE_GEOMETRY: - BKE_move_linestyle_geometry_modifier(lineset->linestyle, modifier, dir); + BKE_linestyle_modifier_move_geometry(lineset->linestyle, modifier, dir); break; default: BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index fc9ac27b5b8..8917704b731 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -154,7 +154,7 @@ static int buttons_context_path_linestyle(ButsContextPath *path) /* if we have a scene, use the lineset's linestyle */ else if (buttons_context_path_scene(path)) { scene = path->ptr[path->len - 1].data; - linestyle = BKE_get_linestyle_from_scene(scene); + linestyle = BKE_linestyle_active_from_scene(scene); if (linestyle) { RNA_id_pointer_create(&linestyle->id, &path->ptr[path->len]); path->len++; diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index 930a05088b1..2ef7626ec7a 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -352,7 +352,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext * ob = (scene->basact) ? scene->basact->object : NULL; wrld = scene->world; brush = BKE_paint_brush(BKE_paint_get_active_from_context(C)); - linestyle = BKE_get_linestyle_from_scene(scene); + linestyle = BKE_linestyle_active_from_scene(scene); } if (ob && ob->type == OB_LAMP && !la) -- cgit v1.2.3