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:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_draw.c6
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
-rw-r--r--source/blender/editors/interface/interface_templates.c8
-rw-r--r--source/blender/editors/interface/resources.c4
-rw-r--r--source/blender/editors/object/object_add.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c8
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c3
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c4
9 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index e46c6a0e267..3ecb72353bc 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -40,9 +40,9 @@
#include "BLI_string.h"
#include "BLI_utildefines.h"
+#include "BKE_colorband.h"
#include "BKE_colortools.h"
#include "BKE_node.h"
-#include "BKE_texture.h"
#include "BKE_tracking.h"
@@ -1335,7 +1335,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti
immBegin(GWN_PRIM_TRI_STRIP, (sizex + 1) * 2);
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);
@@ -1354,7 +1354,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), const rcti
immBegin(GWN_PRIM_TRI_STRIP, (sizex + 1) * 2);
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 a4ce0e2f4a8..f28a398a46a 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -61,6 +61,7 @@
#include "PIL_time.h"
+#include "BKE_colorband.h"
#include "BKE_blender_undo.h"
#include "BKE_brush.h"
#include "BKE_colortools.h"
@@ -68,7 +69,6 @@
#include "BKE_idprop.h"
#include "BKE_report.h"
#include "BKE_screen.h"
-#include "BKE_texture.h"
#include "BKE_tracking.h"
#include "BKE_unit.h"
#include "BKE_paint.h"
@@ -5930,7 +5930,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;
@@ -5960,7 +5960,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 2546527d43b..7c58ac88a23 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -53,6 +53,7 @@
#include "BLF_api.h"
#include "BLT_translation.h"
+#include "BKE_colorband.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -70,7 +71,6 @@
#include "BKE_report.h"
#include "BKE_sca.h"
#include "BKE_screen.h"
-#include "BKE_texture.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
@@ -1714,7 +1714,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");
}
@@ -1724,7 +1724,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);
}
@@ -1760,7 +1760,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 bf42316289f..2eae452debb 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -46,10 +46,10 @@
#include "BLI_math.h"
#include "BKE_appdir.h"
+#include "BKE_colorband.h"
#include "BKE_DerivedMesh.h"
#include "BKE_global.h"
#include "BKE_main.h"
-#include "BKE_texture.h"
#include "BIF_gl.h"
@@ -2000,7 +2000,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/object/object_add.c b/source/blender/editors/object/object_add.c
index e8807432328..98ee42f127b 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -92,7 +92,6 @@
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_speaker.h"
-#include "BKE_texture.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 2d1f0cb3b0d..aebd0c10e9c 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -50,6 +50,7 @@
#include "DNA_node_types.h"
#include "DNA_object_types.h"
+#include "BKE_colorband.h"
#include "BKE_context.h"
#include "BKE_DerivedMesh.h"
#include "BKE_brush.h"
@@ -58,7 +59,6 @@
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_paint.h"
-#include "BKE_texture.h"
#include "DEG_depsgraph.h"
@@ -666,17 +666,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 30830e4e7bc..603b8f9a185 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -44,12 +44,12 @@
#include "BLI_bitmap.h"
#include "BLI_task.h"
+#include "BKE_colorband.h"
#include "BKE_context.h"
#include "BKE_brush.h"
#include "BKE_image.h"
#include "BKE_paint.h"
#include "BKE_report.h"
-#include "BKE_texture.h"
#include "DEG_depsgraph.h"
@@ -1667,7 +1667,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;
@@ -1697,7 +1697,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 900ca844dbf..7148469a9d8 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -62,6 +62,7 @@
#include "DNA_object_types.h"
#include "BKE_camera.h"
+#include "BKE_colorband.h"
#include "BKE_context.h"
#include "BKE_colortools.h"
#include "BKE_DerivedMesh.h"
@@ -4582,7 +4583,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 3a80624acd9..d39f3937a9d 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -41,7 +41,7 @@
#include "BLI_math.h"
#include "BKE_DerivedMesh.h"
-#include "BKE_texture.h"
+#include "BKE_colorband.h"
#include "BKE_particle.h"
#include "smoke_API.h"
@@ -111,7 +111,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]);
}
}