diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-17 12:36:59 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-17 12:36:59 +0300 |
commit | 5910dbdbf7dc7999597a680f81c261fa7bbcf011 (patch) | |
tree | edc962ebd6b11d89d3c29e571caeee0dcbe4ad79 /source/blender/nodes/shader | |
parent | 0a40c671b0b5a6735bd0137ebcb3ab7568ae4481 (diff) |
Nodes: move some code from blenkernel directory to nodes
This also introduces the `blender::nodes` namespace. Eventually,
we want to move most/all of the node implementation files into
this namespace.
The reason for this file-move is that the code fits much better
into the `nodes` directory than in the `blenkernel` directory.
Diffstat (limited to 'source/blender/nodes/shader')
8 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h index 2aed485c8bc..b0ba1ea194f 100644 --- a/source/blender/nodes/shader/node_shader_util.h +++ b/source/blender/nodes/shader/node_shader_util.h @@ -73,7 +73,7 @@ #ifdef __cplusplus # include "FN_multi_function_builder.hh" -# include "BKE_node_tree_multi_function.hh" +# include "NOD_node_tree_multi_function.hh" # include "BLI_color.hh" # include "BLI_float3.hh" diff --git a/source/blender/nodes/shader/nodes/node_shader_map_range.cc b/source/blender/nodes/shader/nodes/node_shader_map_range.cc index 3f8a516c175..b026499ec4b 100644 --- a/source/blender/nodes/shader/nodes/node_shader_map_range.cc +++ b/source/blender/nodes/shader/nodes/node_shader_map_range.cc @@ -128,7 +128,7 @@ class MapRangeFunction : public blender::fn::MultiFunction { } }; -static void sh_node_map_range_expand_in_mf_network(blender::bke::NodeMFNetworkBuilder &builder) +static void sh_node_map_range_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { bNode &bnode = builder.bnode(); bool clamp = bnode.custom1 != 0; diff --git a/source/blender/nodes/shader/nodes/node_shader_math.cc b/source/blender/nodes/shader/nodes/node_shader_math.cc index c6762f17919..c7035da8c70 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.cc +++ b/source/blender/nodes/shader/nodes/node_shader_math.cc @@ -147,7 +147,7 @@ static int gpu_shader_math(GPUMaterial *mat, } static const blender::fn::MultiFunction &get_base_multi_function( - blender::bke::NodeMFNetworkBuilder &builder) + blender::nodes::NodeMFNetworkBuilder &builder) { const int mode = builder.bnode().custom1; switch (mode) { @@ -347,11 +347,11 @@ static const blender::fn::MultiFunction &get_base_multi_function( } } -static void sh_node_math_expand_in_mf_network(blender::bke::NodeMFNetworkBuilder &builder) +static void sh_node_math_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { const blender::fn::MultiFunction &base_function = get_base_multi_function(builder); - const blender::bke::DNode &dnode = builder.dnode(); + const blender::nodes::DNode &dnode = builder.dnode(); blender::fn::MFNetwork &network = builder.network(); blender::fn::MFFunctionNode &base_node = network.add_function(base_function); diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc index 8cab115c0b5..4b4b80ea1ad 100644 --- a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc +++ b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc @@ -89,7 +89,7 @@ class SeparateRGBFunction : public blender::fn::MultiFunction { } }; -static void sh_node_seprgb_expand_in_mf_network(blender::bke::NodeMFNetworkBuilder &builder) +static void sh_node_seprgb_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { static SeparateRGBFunction fn; builder.set_matching_fn(fn); @@ -146,7 +146,7 @@ static int gpu_shader_combrgb(GPUMaterial *mat, return GPU_stack_link(mat, node, "combine_rgb", in, out); } -static void sh_node_combrgb_expand_in_mf_network(blender::bke::NodeMFNetworkBuilder &builder) +static void sh_node_combrgb_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { static blender::fn::CustomMF_SI_SI_SI_SO<float, float, float, blender::Color4f> fn{ "Combine RGB", [](float r, float g, float b) { return blender::Color4f(r, g, b, 1.0f); }}; diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.cc b/source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.cc index d9af37ab46b..03e18acc245 100644 --- a/source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.cc +++ b/source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.cc @@ -74,7 +74,7 @@ class MF_SeparateXYZ : public blender::fn::MultiFunction { } }; -static void sh_node_sepxyz_expand_in_mf_network(blender::bke::NodeMFNetworkBuilder &builder) +static void sh_node_sepxyz_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { static MF_SeparateXYZ separate_fn; builder.set_matching_fn(separate_fn); @@ -113,7 +113,7 @@ static int gpu_shader_combxyz(GPUMaterial *mat, return GPU_stack_link(mat, node, "combine_xyz", in, out); } -static void sh_node_combxyz_expand_in_mf_network(blender::bke::NodeMFNetworkBuilder &builder) +static void sh_node_combxyz_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { static blender::fn::CustomMF_SI_SI_SI_SO<float, float, float, blender::float3> fn{ "Combine Vector", [](float x, float y, float z) { return blender::float3(x, y, z); }}; diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc b/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc index 76409c836d8..21f15bcf6f4 100644 --- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc +++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc @@ -157,7 +157,7 @@ class ColorBandFunction : public blender::fn::MultiFunction { } }; -static void sh_node_valtorgb_expand_in_mf_network(blender::bke::NodeMFNetworkBuilder &builder) +static void sh_node_valtorgb_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { bNode &bnode = builder.bnode(); const ColorBand *color_band = (const ColorBand *)bnode.storage; diff --git a/source/blender/nodes/shader/nodes/node_shader_value.cc b/source/blender/nodes/shader/nodes/node_shader_value.cc index 64701018d63..1d7c3f47233 100644 --- a/source/blender/nodes/shader/nodes/node_shader_value.cc +++ b/source/blender/nodes/shader/nodes/node_shader_value.cc @@ -39,7 +39,7 @@ static int gpu_shader_value(GPUMaterial *mat, return GPU_stack_link(mat, node, "set_value", in, out, link); } -static void sh_node_value_expand_in_mf_network(blender::bke::NodeMFNetworkBuilder &builder) +static void sh_node_value_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { const bNodeSocket *bsocket = builder.dnode().output(0).bsocket(); const bNodeSocketValueFloat *value = (const bNodeSocketValueFloat *)bsocket->default_value; diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc index 8301ab4d855..c18ad8bb244 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc +++ b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc @@ -161,7 +161,7 @@ static void node_shader_update_vector_math(bNodeTree *UNUSED(ntree), bNode *node } static const blender::fn::MultiFunction &get_multi_function( - blender::bke::NodeMFNetworkBuilder &builder) + blender::nodes::NodeMFNetworkBuilder &builder) { using blender::float3; @@ -271,7 +271,7 @@ static const blender::fn::MultiFunction &get_multi_function( }; } -static void sh_node_vector_math_expand_in_mf_network(blender::bke::NodeMFNetworkBuilder &builder) +static void sh_node_vector_math_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { const blender::fn::MultiFunction &fn = get_multi_function(builder); builder.set_matching_fn(fn); |