Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-12-07 07:52:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-12-07 07:52:59 +0300
commit2e2e6e3bdb694e56fcd161f06b6751e953cd2fa1 (patch)
treeda178a4ab2c3993a90750afef65a51ee460465de /source/blender/editors
parentcc811d1fd63425e180ec50f7d13a0b9fe3a6e2eb (diff)
Cleanup: Use BKE_colorband prefix
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_draw.c4
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
-rw-r--r--source/blender/editors/interface/interface_templates.c6
-rw-r--r--source/blender/editors/interface/resources.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c2
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c2
8 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 04e0a20243b..9a05c12e00a 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1121,7 +1121,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti
glBegin(GL_TRIANGLE_STRIP);
for (int a = 0; a <= sizex; a++) {
float pos = ((float)a) / sizex;
- do_colorband(coba, pos, colf);
+ BKE_colorband_evaluate(coba, pos, colf);
if (display)
IMB_colormanagement_scene_linear_to_display_v3(colf, display);
@@ -1140,7 +1140,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti
glBegin(GL_TRIANGLE_STRIP);
for (int a = 0; a <= sizex; a++) {
float pos = ((float)a) / sizex;
- do_colorband(coba, pos, colf);
+ BKE_colorband_evaluate(coba, pos, colf);
if (display)
IMB_colormanagement_scene_linear_to_display_v3(colf, display);
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 06196b57220..c78fe34e849 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -5933,7 +5933,7 @@ static bool ui_numedit_but_COLORBAND(uiBut *but, uiHandleButtonData *data, int m
data->dragcbd->pos += dx;
CLAMP(data->dragcbd->pos, 0.0f, 1.0f);
- colorband_update_sort(data->coba);
+ BKE_colorband_update_sort(data->coba);
data->dragcbd = data->coba->data + data->coba->cur; /* because qsort */
data->draglastx = mx;
@@ -5963,7 +5963,7 @@ static int ui_do_but_COLORBAND(
if (event->ctrl) {
/* insert new key on mouse location */
float pos = ((float)(mx - but->rect.xmin)) / BLI_rctf_size_x(&but->rect);
- colorband_element_add(coba, pos);
+ BKE_colorband_element_add(coba, pos);
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
else {
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 37d1146e97b..63bc42f6d10 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1451,7 +1451,7 @@ static void colorband_add_cb(bContext *C, void *cb_v, void *coba_v)
else pos = (coba->data[coba->cur + 1].pos + coba->data[coba->cur].pos) * 0.5f;
}
- if (colorband_element_add(coba, pos)) {
+ if (BKE_colorband_element_add(coba, pos)) {
rna_update_cb(C, cb_v, NULL);
ED_undo_push(C, "Add colorband");
}
@@ -1461,7 +1461,7 @@ static void colorband_del_cb(bContext *C, void *cb_v, void *coba_v)
{
ColorBand *coba = coba_v;
- if (colorband_element_remove(coba, coba->cur)) {
+ if (BKE_colorband_element_remove(coba, coba->cur)) {
ED_undo_push(C, "Delete colorband");
rna_update_cb(C, cb_v, NULL);
}
@@ -1497,7 +1497,7 @@ static void colorband_update_cb(bContext *UNUSED(C), void *bt_v, void *coba_v)
/* sneaky update here, we need to sort the colorband points to be in order,
* however the RNA pointer then is wrong, so we update it */
- colorband_update_sort(coba);
+ BKE_colorband_update_sort(coba);
bt->rnapoin.data = coba->data + coba->cur;
}
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index a73ecbac85f..d12e7cc036b 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1839,7 +1839,7 @@ void init_userdef_do_versions(void)
rgba_char_args_set(btheme->tv3d.editmesh_active, 255, 255, 255, 128);
}
if (U.coba_weight.tot == 0)
- init_colorband(&U.coba_weight, true);
+ BKE_colorband_init(&U.coba_weight, true);
}
if (!USER_VERSION_ATLEAST(245, 3)) {
bTheme *btheme;
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 427d4a7bb7b..3ecece580ee 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -665,17 +665,17 @@ void paint_brush_color_get(struct Scene *scene, struct Brush *br, bool color_cor
float color_gr[4];
switch (br->gradient_stroke_mode) {
case BRUSH_GRADIENT_PRESSURE:
- do_colorband(br->gradient, pressure, color_gr);
+ BKE_colorband_evaluate(br->gradient, pressure, color_gr);
break;
case BRUSH_GRADIENT_SPACING_REPEAT:
{
float coord = fmod(distance / br->gradient_spacing, 1.0);
- do_colorband(br->gradient, coord, color_gr);
+ BKE_colorband_evaluate(br->gradient, coord, color_gr);
break;
}
case BRUSH_GRADIENT_SPACING_CLAMP:
{
- do_colorband(br->gradient, distance / br->gradient_spacing, color_gr);
+ BKE_colorband_evaluate(br->gradient, distance / br->gradient_spacing, color_gr);
break;
}
}
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 766942a5fce..a1aad2bdc57 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -1666,7 +1666,7 @@ void paint_2d_gradient_fill(
break;
}
}
- do_colorband(br->gradient, f, color_f);
+ BKE_colorband_evaluate(br->gradient, f, color_f);
/* convert to premultiplied */
mul_v3_fl(color_f, color_f[3]);
color_f[3] *= br->alpha;
@@ -1696,7 +1696,7 @@ void paint_2d_gradient_fill(
}
}
- do_colorband(br->gradient, f, color_f);
+ BKE_colorband_evaluate(br->gradient, f, color_f);
linearrgb_to_srgb_v3_v3(color_f, color_f);
rgba_float_to_uchar((unsigned char *)&color_b, color_f);
((unsigned char *)&color_b)[3] *= br->alpha;
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 60a4cd86aa5..c309b223a81 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4579,7 +4579,7 @@ static void *do_projectpaint_thread(void *ph_v)
break;
}
}
- do_colorband(brush->gradient, f, color_f);
+ BKE_colorband_evaluate(brush->gradient, f, color_f);
color_f[3] *= ((float)projPixel->mask) * (1.0f / 65535.0f) * brush->alpha;
if (is_floatbuf) {
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index dafe25a7072..cf118404183 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -112,7 +112,7 @@ static void create_flame_spectrum_texture(float *data)
static void create_color_ramp(const ColorBand *coba, float *data)
{
for (int i = 0; i < TFUNC_WIDTH; i++) {
- do_colorband(coba, (float)i / TFUNC_WIDTH, &data[i * 4]);
+ BKE_colorband_evaluate(coba, (float)i / TFUNC_WIDTH, &data[i * 4]);
}
}