diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-12-07 15:53:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-12-07 15:53:03 +0300 |
commit | 1c7cfa025c87e8f31790b48cbb189949f7949ad1 (patch) | |
tree | 3869d475a9d10c005b0bb8006eb77bf55f1903d3 /source/blender/nodes | |
parent | 46f518e92790a04885f4e047bb59b11019d73aa3 (diff) | |
parent | 2e2e6e3bdb694e56fcd161f06b6751e953cd2fa1 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/nodes')
7 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/nodes/composite/node_composite_util.h b/source/blender/nodes/composite/node_composite_util.h index 2dac0cc639a..22c5e6f9507 100644 --- a/source/blender/nodes/composite/node_composite_util.h +++ b/source/blender/nodes/composite/node_composite_util.h @@ -42,6 +42,7 @@ #include "BLT_translation.h" +#include "BKE_colorband.h" #include "BKE_colortools.h" #include "BKE_image.h" #include "BKE_texture.h" diff --git a/source/blender/nodes/composite/nodes/node_composite_valToRgb.c b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c index 32d68550cd4..707f1d22efd 100644 --- a/source/blender/nodes/composite/nodes/node_composite_valToRgb.c +++ b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c @@ -46,7 +46,7 @@ static bNodeSocketTemplate cmp_node_valtorgb_out[] = { static void node_composit_init_valtorgb(bNodeTree *UNUSED(ntree), bNode *node) { - node->storage = add_colorband(true); + node->storage = BKE_colorband_add(true); } void register_node_type_cmp_valtorgb(void) diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h index 148888f7693..2363addb56a 100644 --- a/source/blender/nodes/shader/node_shader_util.h +++ b/source/blender/nodes/shader/node_shader_util.h @@ -55,6 +55,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" +#include "BKE_colorband.h" #include "BKE_colortools.h" #include "BKE_global.h" #include "BKE_image.h" diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c b/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c index 8748c884a25..436eeeefb4a 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c @@ -27,7 +27,6 @@ #include "../node_shader_util.h" -#include "BKE_texture.h" #include "RE_render_ext.h" diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c index b5e32e294bf..39598eb8675 100644 --- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c +++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c @@ -53,14 +53,14 @@ static void node_shader_exec_valtorgb(void *UNUSED(data), int UNUSED(thread), bN float fac; nodestack_get_vec(&fac, SOCK_FLOAT, in[0]); - do_colorband(node->storage, fac, out[0]->vec); + BKE_colorband_evaluate(node->storage, fac, out[0]->vec); out[1]->vec[0] = out[0]->vec[3]; } } static void node_shader_init_valtorgb(bNodeTree *UNUSED(ntree), bNode *node) { - node->storage = add_colorband(true); + node->storage = BKE_colorband_add(true); } static int gpu_shader_valtorgb(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) @@ -68,7 +68,7 @@ static int gpu_shader_valtorgb(GPUMaterial *mat, bNode *node, bNodeExecData *UNU float *array; int size; - colorband_table_RGBA(node->storage, &array, &size); + BKE_colorband_evaluate_table_rgba(node->storage, &array, &size); return GPU_stack_link(mat, node, "valtorgb", in, out, GPU_texture(size, array)); } diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h index 2263c271ccf..f6af5b1b6ca 100644 --- a/source/blender/nodes/texture/node_texture_util.h +++ b/source/blender/nodes/texture/node_texture_util.h @@ -53,6 +53,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" +#include "BKE_colorband.h" #include "BKE_colortools.h" #include "BKE_global.h" #include "BKE_image.h" diff --git a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c index a49d82d27a9..8b016c5aa50 100644 --- a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c +++ b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c @@ -49,7 +49,7 @@ static void valtorgb_colorfn(float *out, TexParams *p, bNode *node, bNodeStack * if (node->storage) { float fac = tex_input_value(in[0], p, thread); - do_colorband(node->storage, fac, out); + BKE_colorband_evaluate(node->storage, fac, out); } } @@ -60,7 +60,7 @@ static void valtorgb_exec(void *data, int UNUSED(thread), bNode *node, bNodeExec static void valtorgb_init(bNodeTree *UNUSED(ntree), bNode *node) { - node->storage = add_colorband(true); + node->storage = BKE_colorband_add(true); } void register_node_type_tex_valtorgb(void) |