Cleanup: Adhere to our naming convention for BKE_linestyle.h API
authorCampbell Barton <ideasman42@gmail.com>
Wed, 16 Jul 2014 05:13:40 +0000 (15:13 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 16 Jul 2014 05:13:40 +0000 (15:13 +1000)
12 files changed:
source/blender/blenkernel/BKE_linestyle.h
source/blender/blenkernel/intern/freestyle.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/linestyle.c
source/blender/blenkernel/intern/object.c
source/blender/editors/render/render_shading.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_linestyle.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/nodes/texture/node_texture_tree.c

index 3b448e1c40215c3d4f8de3856f2bae6a31a16623..cca4e1c5f1860c69b26634ab91b40f737a0603ea 100644 (file)
@@ -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__ */
index 445acc850e600276592a945e025dfcaa21b2d7aa..4aa1b49ea13843c97488c324192738c7d8e25a44 100644 (file)
@@ -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;
index 1f3327b0dc42628f4486cc6c0edc24727e31c572..df343459d2f6a4939283a53d6a3194838890c010 100644 (file)
@@ -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;
        }
 
index 5d51eb09b6e292927ced921af1bc810699e18be4..7a36a3ef9f7de5f845e272c594750ab5d80239d0 100644 (file)
@@ -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;
 
index 3490bb9ffbd4c9075f967482cbde63b69afae06a..42128a9b3649b1a8f7935780f1a8b29d4648cbb5 100644 (file)
@@ -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);
                                        }
                                }
                        }
index 9cc672fe8aefa363f312d7a089e3a183d5b52a6f..f76fd5e1fc9d8739ed3fb7e34ad19f0eb9541cde 100644 (file)
@@ -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");
index fc9ac27b5b8df17c9ab237b4fd5153026237e833..8917704b73179e6c6868a0aca53120786aa3461d 100644 (file)
@@ -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++;
index 930a05088b1228abc98b1e56df2ec52172d5fe20..2ef7626ec7a63a1e7d391031d0119dc79ec6742f 100644 (file)
@@ -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)
index cca78ee2d8d14d579fc811e912dfb0c3c1590157..fdba76e9aa228059cc8ab5007c28a21f4298c4ee 100644 (file)
@@ -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;
index faff39e679af72a09e10bd207de16b11d8e47196..8fad74797b7fefc5849ee6ae7590e8d386ec3db4 100644 (file)
@@ -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;
        }
index bac1f1321268b5d82e279f4ecb40adb5b37d5a02..a94a46a0e7eee5d9fcbc95fac67cdf181282edf4 100644 (file)
@@ -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;
 }
index a79b95525d392f7e75fb1aafa17bf198cee694c0..c0c5787b765ec2151d546142c1450d500569d97c 100644 (file)
@@ -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);