diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_linestyle.h | 46 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/freestyle.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/linestyle.c | 72 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 2 | ||||
-rw-r--r-- | source/blender/editors/render/render_shading.c | 36 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_texture.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_linestyle.c | 16 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/texture/node_texture_tree.c | 2 |
12 files changed, 95 insertions, 95 deletions
diff --git a/source/blender/blenkernel/BKE_linestyle.h b/source/blender/blenkernel/BKE_linestyle.h index 3b448e1c402..cca4e1c5f18 100644 --- a/source/blender/blenkernel/BKE_linestyle.h +++ b/source/blender/blenkernel/BKE_linestyle.h @@ -44,35 +44,35 @@ struct Main; struct Object; struct ColorBand; -FreestyleLineStyle *BKE_new_linestyle(const char *name, struct Main *main); -void BKE_free_linestyle(FreestyleLineStyle *linestyle); -FreestyleLineStyle *BKE_copy_linestyle(FreestyleLineStyle *linestyle); +FreestyleLineStyle *BKE_linestyle_new(const char *name, struct Main *main); +void BKE_linestyle_free(FreestyleLineStyle *linestyle); +FreestyleLineStyle *BKE_linestyle_copy(FreestyleLineStyle *linestyle); -FreestyleLineStyle *BKE_get_linestyle_from_scene(struct Scene *scene); +FreestyleLineStyle *BKE_linestyle_active_from_scene(struct Scene *scene); -LineStyleModifier *BKE_add_linestyle_color_modifier(FreestyleLineStyle *linestyle, const char *name, int type); -LineStyleModifier *BKE_add_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, const char *name, int type); -LineStyleModifier *BKE_add_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, const char *name, int type); -LineStyleModifier *BKE_add_linestyle_geometry_modifier(FreestyleLineStyle *linestyle, const char *name, int type); +LineStyleModifier *BKE_linestyle_modifier_add_color(FreestyleLineStyle *linestyle, const char *name, int type); +LineStyleModifier *BKE_linestyle_modifier_add_alpha(FreestyleLineStyle *linestyle, const char *name, int type); +LineStyleModifier *BKE_linestyle_modifier_add_thickness(FreestyleLineStyle *linestyle, const char *name, int type); +LineStyleModifier *BKE_linestyle_modifier_add_geometry(FreestyleLineStyle *linestyle, const char *name, int type); -LineStyleModifier *BKE_copy_linestyle_color_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m); -LineStyleModifier *BKE_copy_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m); -LineStyleModifier *BKE_copy_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m); -LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m); +LineStyleModifier *BKE_linestyle_modifier_copy_color(FreestyleLineStyle *linestyle, LineStyleModifier *m); +LineStyleModifier *BKE_linestyle_modifier_copy_alpha(FreestyleLineStyle *linestyle, LineStyleModifier *m); +LineStyleModifier *BKE_linestyle_modifier_copy_thickness(FreestyleLineStyle *linestyle, LineStyleModifier *m); +LineStyleModifier *BKE_linestyle_modifier_copy_geometry(FreestyleLineStyle *linestyle, LineStyleModifier *m); -int BKE_remove_linestyle_color_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier); -int BKE_remove_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier); -int BKE_remove_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier); -int BKE_remove_linestyle_geometry_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier); +int BKE_linestyle_modifier_remove_color(FreestyleLineStyle *linestyle, LineStyleModifier *modifier); +int BKE_linestyle_modifier_remove_alpha(FreestyleLineStyle *linestyle, LineStyleModifier *modifier); +int BKE_linestyle_modifier_remove_thickness(FreestyleLineStyle *linestyle, LineStyleModifier *modifier); +int BKE_linestyle_modifier_remove_geometry(FreestyleLineStyle *linestyle, LineStyleModifier *modifier); -void BKE_move_linestyle_color_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction); -void BKE_move_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction); -void BKE_move_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction); -void BKE_move_linestyle_geometry_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction); +void BKE_linestyle_modifier_move_color(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction); +void BKE_linestyle_modifier_move_alpha(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction); +void BKE_linestyle_modifier_move_thickness(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction); +void BKE_linestyle_modifier_move_geometry(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction); -void BKE_list_modifier_color_ramps(FreestyleLineStyle *linestyle, ListBase *listbase); -char *BKE_path_from_ID_to_color_ramp(FreestyleLineStyle *linestyle, struct ColorBand *color_ramp); +void BKE_linestyle_modifier_list_color_ramps(FreestyleLineStyle *linestyle, ListBase *listbase); +char *BKE_linestyle_path_to_color_ramp(FreestyleLineStyle *linestyle, struct ColorBand *color_ramp); -void BKE_unlink_linestyle_target_object(FreestyleLineStyle *linestyle, struct Object *ob); +void BKE_linestyle_target_object_unlink(FreestyleLineStyle *linestyle, struct Object *ob); #endif /* __BKE_LINESTYLE_H__ */ diff --git a/source/blender/blenkernel/intern/freestyle.c b/source/blender/blenkernel/intern/freestyle.c index 445acc850e6..4aa1b49ea13 100644 --- a/source/blender/blenkernel/intern/freestyle.c +++ b/source/blender/blenkernel/intern/freestyle.c @@ -187,7 +187,7 @@ FreestyleLineSet *BKE_freestyle_lineset_add(FreestyleConfig *config, const char BLI_addtail(&config->linesets, (void *)lineset); BKE_freestyle_lineset_set_active_index(config, lineset_index); - lineset->linestyle = BKE_new_linestyle("LineStyle", NULL); + lineset->linestyle = BKE_linestyle_new("LineStyle", NULL); lineset->flags |= FREESTYLE_LINESET_ENABLED; lineset->selection = FREESTYLE_SEL_VISIBILITY | FREESTYLE_SEL_EDGE_TYPES | FREESTYLE_SEL_IMAGE_BORDER; lineset->qi = FREESTYLE_QI_VISIBLE; diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 1f3327b0dc4..df343459d2f 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -382,7 +382,7 @@ bool id_copy(ID *id, ID **newid, bool test) if (!test) *newid = (ID *)BKE_mask_copy((Mask *)id); return true; case ID_LS: - if (!test) *newid = (ID *)BKE_copy_linestyle((FreestyleLineStyle *)id); + if (!test) *newid = (ID *)BKE_linestyle_copy((FreestyleLineStyle *)id); return true; } @@ -1005,7 +1005,7 @@ void BKE_libblock_free_ex(Main *bmain, void *idv, bool do_id_user) BKE_mask_free(bmain, (Mask *)id); break; case ID_LS: - BKE_free_linestyle((FreestyleLineStyle *)id); + BKE_linestyle_free((FreestyleLineStyle *)id); break; } diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c index 5d51eb09b6e..7a36a3ef9f7 100644 --- a/source/blender/blenkernel/intern/linestyle.c +++ b/source/blender/blenkernel/intern/linestyle.c @@ -100,12 +100,12 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle) BLI_listbase_clear(&linestyle->thickness_modifiers); BLI_listbase_clear(&linestyle->geometry_modifiers); - BKE_add_linestyle_geometry_modifier(linestyle, NULL, LS_MODIFIER_SAMPLING); + BKE_linestyle_modifier_add_geometry(linestyle, NULL, LS_MODIFIER_SAMPLING); linestyle->caps = LS_CAPS_BUTT; } -FreestyleLineStyle *BKE_new_linestyle(const char *name, struct Main *main) +FreestyleLineStyle *BKE_linestyle_new(const char *name, struct Main *main) { FreestyleLineStyle *linestyle; @@ -119,7 +119,7 @@ FreestyleLineStyle *BKE_new_linestyle(const char *name, struct Main *main) return linestyle; } -void BKE_free_linestyle(FreestyleLineStyle *linestyle) +void BKE_linestyle_free(FreestyleLineStyle *linestyle) { LineStyleModifier *m; @@ -138,27 +138,27 @@ void BKE_free_linestyle(FreestyleLineStyle *linestyle) BKE_free_animdata(&linestyle->id); while ((m = (LineStyleModifier *)linestyle->color_modifiers.first)) - BKE_remove_linestyle_color_modifier(linestyle, m); + BKE_linestyle_modifier_remove_color(linestyle, m); while ((m = (LineStyleModifier *)linestyle->alpha_modifiers.first)) - BKE_remove_linestyle_alpha_modifier(linestyle, m); + BKE_linestyle_modifier_remove_alpha(linestyle, m); while ((m = (LineStyleModifier *)linestyle->thickness_modifiers.first)) - BKE_remove_linestyle_thickness_modifier(linestyle, m); + BKE_linestyle_modifier_remove_thickness(linestyle, m); while ((m = (LineStyleModifier *)linestyle->geometry_modifiers.first)) - BKE_remove_linestyle_geometry_modifier(linestyle, m); + BKE_linestyle_modifier_remove_geometry(linestyle, m); } -FreestyleLineStyle *BKE_copy_linestyle(FreestyleLineStyle *linestyle) +FreestyleLineStyle *BKE_linestyle_copy(FreestyleLineStyle *linestyle) { FreestyleLineStyle *new_linestyle; LineStyleModifier *m; int a; - new_linestyle = BKE_new_linestyle(linestyle->id.name + 2, NULL); - BKE_free_linestyle(new_linestyle); + new_linestyle = BKE_linestyle_new(linestyle->id.name + 2, NULL); + BKE_linestyle_free(new_linestyle); for (a = 0; a < MAX_MTEX; a++) { if (linestyle->mtex[a]) { - new_linestyle->mtex[a] = MEM_mallocN(sizeof(MTex), "BKE_copy_linestyle"); + new_linestyle->mtex[a] = MEM_mallocN(sizeof(MTex), "BKE_linestyle_copy"); memcpy(new_linestyle->mtex[a], linestyle->mtex[a], sizeof(MTex)); id_us_plus((ID *)new_linestyle->mtex[a]->tex); } @@ -199,18 +199,18 @@ FreestyleLineStyle *BKE_copy_linestyle(FreestyleLineStyle *linestyle) new_linestyle->texstep = linestyle->texstep; new_linestyle->pr_texture = linestyle->pr_texture; for (m = (LineStyleModifier *)linestyle->color_modifiers.first; m; m = m->next) - BKE_copy_linestyle_color_modifier(new_linestyle, m); + BKE_linestyle_modifier_copy_color(new_linestyle, m); for (m = (LineStyleModifier *)linestyle->alpha_modifiers.first; m; m = m->next) - BKE_copy_linestyle_alpha_modifier(new_linestyle, m); + BKE_linestyle_modifier_copy_alpha(new_linestyle, m); for (m = (LineStyleModifier *)linestyle->thickness_modifiers.first; m; m = m->next) - BKE_copy_linestyle_thickness_modifier(new_linestyle, m); + BKE_linestyle_modifier_copy_thickness(new_linestyle, m); for (m = (LineStyleModifier *)linestyle->geometry_modifiers.first; m; m = m->next) - BKE_copy_linestyle_geometry_modifier(new_linestyle, m); + BKE_linestyle_modifier_copy_geometry(new_linestyle, m); return new_linestyle; } -FreestyleLineStyle *BKE_get_linestyle_from_scene(Scene *scene) +FreestyleLineStyle *BKE_linestyle_active_from_scene(Scene *scene) { SceneRenderLayer *actsrl = BLI_findlink(&scene->r.layers, scene->r.actlay); FreestyleConfig *config = &actsrl->freestyleConfig; @@ -268,7 +268,7 @@ static LineStyleModifier *alloc_color_modifier(const char *name, int type) return new_modifier(name, type, size); } -LineStyleModifier *BKE_add_linestyle_color_modifier(FreestyleLineStyle *linestyle, const char *name, int type) +LineStyleModifier *BKE_linestyle_modifier_add_color(FreestyleLineStyle *linestyle, const char *name, int type) { LineStyleModifier *m; @@ -302,7 +302,7 @@ LineStyleModifier *BKE_add_linestyle_color_modifier(FreestyleLineStyle *linestyl return m; } -LineStyleModifier *BKE_copy_linestyle_color_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m) +LineStyleModifier *BKE_linestyle_modifier_copy_color(FreestyleLineStyle *linestyle, LineStyleModifier *m) { LineStyleModifier *new_m; @@ -357,7 +357,7 @@ LineStyleModifier *BKE_copy_linestyle_color_modifier(FreestyleLineStyle *linesty return new_m; } -int BKE_remove_linestyle_color_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m) +int BKE_linestyle_modifier_remove_color(FreestyleLineStyle *linestyle, LineStyleModifier *m) { if (BLI_findindex(&linestyle->color_modifiers, m) == -1) return -1; @@ -402,7 +402,7 @@ static LineStyleModifier *alloc_alpha_modifier(const char *name, int type) return new_modifier(name, type, size); } -LineStyleModifier *BKE_add_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, const char *name, int type) +LineStyleModifier *BKE_linestyle_modifier_add_alpha(FreestyleLineStyle *linestyle, const char *name, int type) { LineStyleModifier *m; @@ -448,7 +448,7 @@ LineStyleModifier *BKE_add_linestyle_alpha_modifier(FreestyleLineStyle *linestyl return m; } -LineStyleModifier *BKE_copy_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m) +LineStyleModifier *BKE_linestyle_modifier_copy_alpha(FreestyleLineStyle *linestyle, LineStyleModifier *m) { LineStyleModifier *new_m; @@ -506,7 +506,7 @@ LineStyleModifier *BKE_copy_linestyle_alpha_modifier(FreestyleLineStyle *linesty return new_m; } -int BKE_remove_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m) +int BKE_linestyle_modifier_remove_alpha(FreestyleLineStyle *linestyle, LineStyleModifier *m) { if (BLI_findindex(&linestyle->alpha_modifiers, m) == -1) return -1; @@ -555,7 +555,7 @@ static LineStyleModifier *alloc_thickness_modifier(const char *name, int type) return new_modifier(name, type, size); } -LineStyleModifier *BKE_add_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, const char *name, int type) +LineStyleModifier *BKE_linestyle_modifier_add_thickness(FreestyleLineStyle *linestyle, const char *name, int type) { LineStyleModifier *m; @@ -617,7 +617,7 @@ LineStyleModifier *BKE_add_linestyle_thickness_modifier(FreestyleLineStyle *line return m; } -LineStyleModifier *BKE_copy_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m) +LineStyleModifier *BKE_linestyle_modifier_copy_thickness(FreestyleLineStyle *linestyle, LineStyleModifier *m) { LineStyleModifier *new_m; @@ -694,7 +694,7 @@ LineStyleModifier *BKE_copy_linestyle_thickness_modifier(FreestyleLineStyle *lin return new_m; } -int BKE_remove_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m) +int BKE_linestyle_modifier_remove_thickness(FreestyleLineStyle *linestyle, LineStyleModifier *m) { if (BLI_findindex(&linestyle->thickness_modifiers, m) == -1) return -1; @@ -769,7 +769,7 @@ static LineStyleModifier *alloc_geometry_modifier(const char *name, int type) return new_modifier(name, type, size); } -LineStyleModifier *BKE_add_linestyle_geometry_modifier(FreestyleLineStyle *linestyle, const char *name, int type) +LineStyleModifier *BKE_linestyle_modifier_add_geometry(FreestyleLineStyle *linestyle, const char *name, int type) { LineStyleModifier *m; @@ -887,7 +887,7 @@ LineStyleModifier *BKE_add_linestyle_geometry_modifier(FreestyleLineStyle *lines return m; } -LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m) +LineStyleModifier *BKE_linestyle_modifier_copy_geometry(FreestyleLineStyle *linestyle, LineStyleModifier *m) { LineStyleModifier *new_m; @@ -1021,7 +1021,7 @@ LineStyleModifier *BKE_copy_linestyle_geometry_modifier(FreestyleLineStyle *line return new_m; } -int BKE_remove_linestyle_geometry_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m) +int BKE_linestyle_modifier_remove_geometry(FreestyleLineStyle *linestyle, LineStyleModifier *m) { if (BLI_findindex(&linestyle->geometry_modifiers, m) == -1) return -1; @@ -1038,27 +1038,27 @@ static void move_modifier(ListBase *lb, LineStyleModifier *modifier, int directi BLI_insertlinkafter(lb, modifier->next, modifier); } -void BKE_move_linestyle_color_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction) +void BKE_linestyle_modifier_move_color(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction) { move_modifier(&linestyle->color_modifiers, modifier, direction); } -void BKE_move_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction) +void BKE_linestyle_modifier_move_alpha(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction) { move_modifier(&linestyle->alpha_modifiers, modifier, direction); } -void BKE_move_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction) +void BKE_linestyle_modifier_move_thickness(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction) { move_modifier(&linestyle->thickness_modifiers, modifier, direction); } -void BKE_move_linestyle_geometry_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction) +void BKE_linestyle_modifier_move_geometry(FreestyleLineStyle *linestyle, LineStyleModifier *modifier, int direction) { move_modifier(&linestyle->geometry_modifiers, modifier, direction); } -void BKE_list_modifier_color_ramps(FreestyleLineStyle *linestyle, ListBase *listbase) +void BKE_linestyle_modifier_list_color_ramps(FreestyleLineStyle *linestyle, ListBase *listbase) { LineStyleModifier *m; ColorBand *color_ramp; @@ -1089,7 +1089,7 @@ void BKE_list_modifier_color_ramps(FreestyleLineStyle *linestyle, ListBase *list } } -char *BKE_path_from_ID_to_color_ramp(FreestyleLineStyle *linestyle, ColorBand *color_ramp) +char *BKE_linestyle_path_to_color_ramp(FreestyleLineStyle *linestyle, ColorBand *color_ramp) { LineStyleModifier *m; bool found = false; @@ -1120,11 +1120,11 @@ char *BKE_path_from_ID_to_color_ramp(FreestyleLineStyle *linestyle, ColorBand *c return BLI_sprintfN("color_modifiers[\"%s\"].color_ramp", name_esc); } } - printf("BKE_path_from_ID_to_color_ramp: No color ramps correspond to the given pointer.\n"); + printf("BKE_linestyle_path_to_color_ramp: No color ramps correspond to the given pointer.\n"); return NULL; } -void BKE_unlink_linestyle_target_object(FreestyleLineStyle *linestyle, struct Object *ob) +void BKE_linestyle_target_object_unlink(FreestyleLineStyle *linestyle, struct Object *ob) { LineStyleModifier *m; diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 3490bb9ffbd..42128a9b364 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -709,7 +709,7 @@ void BKE_object_unlink(Object *ob) lineset; lineset = lineset->next) { if (lineset->linestyle) { - BKE_unlink_linestyle_target_object(lineset->linestyle, ob); + BKE_linestyle_target_object_unlink(lineset->linestyle, ob); } } } 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) diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index cca78ee2d8d..fdba76e9aa2 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -193,7 +193,7 @@ static char *rna_ColorRamp_path(PointerRNA *ptr) case ID_LS: { - char *path = BKE_path_from_ID_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data); + char *path = BKE_linestyle_path_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data); if (path) return path; break; @@ -277,7 +277,7 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr) ListBase listbase; LinkData *link; - BKE_list_modifier_color_ramps((FreestyleLineStyle *)id, &listbase); + BKE_linestyle_modifier_list_color_ramps((FreestyleLineStyle *)id, &listbase); for (link = (LinkData *)listbase.first; link; link = link->next) { RNA_pointer_create(id, &RNA_ColorRamp, link->data, &ramp_ptr); COLRAMP_GETPATH; diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index faff39e679a..8fad74797b7 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -286,7 +286,7 @@ static void rna_LineStyle_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin static LineStyleModifier *rna_LineStyle_color_modifier_add(FreestyleLineStyle *linestyle, ReportList *reports, const char *name, int type) { - LineStyleModifier *modifier = BKE_add_linestyle_color_modifier(linestyle, name, type); + LineStyleModifier *modifier = BKE_linestyle_modifier_add_color(linestyle, name, type); if (!modifier) { BKE_report(reports, RPT_ERROR, "Failed to add the color modifier"); @@ -304,7 +304,7 @@ static void rna_LineStyle_color_modifier_remove(FreestyleLineStyle *linestyle, R { LineStyleModifier *modifier = modifier_ptr->data; - if (BKE_remove_linestyle_color_modifier(linestyle, modifier) == -1) { + if (BKE_linestyle_modifier_remove_color(linestyle, modifier) == -1) { BKE_reportf(reports, RPT_ERROR, "Color modifier '%s' could not be removed", modifier->name); return; } @@ -318,7 +318,7 @@ static void rna_LineStyle_color_modifier_remove(FreestyleLineStyle *linestyle, R static LineStyleModifier *rna_LineStyle_alpha_modifier_add(FreestyleLineStyle *linestyle, ReportList *reports, const char *name, int type) { - LineStyleModifier *modifier = BKE_add_linestyle_alpha_modifier(linestyle, name, type); + LineStyleModifier *modifier = BKE_linestyle_modifier_add_alpha(linestyle, name, type); if (!modifier) { BKE_report(reports, RPT_ERROR, "Failed to add the alpha modifier"); @@ -336,7 +336,7 @@ static void rna_LineStyle_alpha_modifier_remove(FreestyleLineStyle *linestyle, R { LineStyleModifier *modifier = modifier_ptr->data; - if (BKE_remove_linestyle_alpha_modifier(linestyle, modifier) == -1) { + if (BKE_linestyle_modifier_remove_alpha(linestyle, modifier) == -1) { BKE_reportf(reports, RPT_ERROR, "Alpha modifier '%s' could not be removed", modifier->name); return; } @@ -350,7 +350,7 @@ static void rna_LineStyle_alpha_modifier_remove(FreestyleLineStyle *linestyle, R static LineStyleModifier *rna_LineStyle_thickness_modifier_add(FreestyleLineStyle *linestyle, ReportList *reports, const char *name, int type) { - LineStyleModifier *modifier = BKE_add_linestyle_thickness_modifier(linestyle, name, type); + LineStyleModifier *modifier = BKE_linestyle_modifier_add_thickness(linestyle, name, type); if (!modifier) { BKE_report(reports, RPT_ERROR, "Failed to add the thickness modifier"); @@ -368,7 +368,7 @@ static void rna_LineStyle_thickness_modifier_remove(FreestyleLineStyle *linestyl { LineStyleModifier *modifier = modifier_ptr->data; - if (BKE_remove_linestyle_thickness_modifier(linestyle, modifier) == -1) { + if (BKE_linestyle_modifier_remove_thickness(linestyle, modifier) == -1) { BKE_reportf(reports, RPT_ERROR, "Thickness modifier '%s' could not be removed", modifier->name); return; } @@ -382,7 +382,7 @@ static void rna_LineStyle_thickness_modifier_remove(FreestyleLineStyle *linestyl static LineStyleModifier *rna_LineStyle_geometry_modifier_add(FreestyleLineStyle *linestyle, ReportList *reports, const char *name, int type) { - LineStyleModifier *modifier = BKE_add_linestyle_geometry_modifier(linestyle, name, type); + LineStyleModifier *modifier = BKE_linestyle_modifier_add_geometry(linestyle, name, type); if (!modifier) { BKE_report(reports, RPT_ERROR, "Failed to add the geometry modifier"); @@ -400,7 +400,7 @@ static void rna_LineStyle_geometry_modifier_remove(FreestyleLineStyle *linestyle { LineStyleModifier *modifier = modifier_ptr->data; - if (BKE_remove_linestyle_geometry_modifier(linestyle, modifier) == -1) { + if (BKE_linestyle_modifier_remove_geometry(linestyle, modifier) == -1) { BKE_reportf(reports, RPT_ERROR, "Geometry modifier '%s' could not be removed", modifier->name); return; } diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index bac1f132126..a94a46a0e7e 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -685,7 +685,7 @@ static void rna_Main_grease_pencil_remove(Main *bmain, ReportList *reports, Poin FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char *name) { - FreestyleLineStyle *linestyle = BKE_new_linestyle(name, bmain); + FreestyleLineStyle *linestyle = BKE_linestyle_new(name, bmain); id_us_min(&linestyle->id); return linestyle; } diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c index a79b95525d3..c0c5787b765 100644 --- a/source/blender/nodes/texture/node_texture_tree.c +++ b/source/blender/nodes/texture/node_texture_tree.c @@ -111,7 +111,7 @@ static void texture_get_from_context(const bContext *C, bNodeTreeType *UNUSED(tr } } else if (snode->texfrom == SNODE_TEX_LINESTYLE) { - FreestyleLineStyle *linestyle = BKE_get_linestyle_from_scene(scene); + FreestyleLineStyle *linestyle = BKE_linestyle_active_from_scene(scene); if (linestyle) { *r_from = (ID *)linestyle; tx = give_current_linestyle_texture(linestyle); |