diff options
author | Hans Goudey <h.goudey@me.com> | 2022-03-16 20:33:36 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-03-16 20:33:36 +0300 |
commit | 2564d152d6edf65afcb573598a1303483c62eb06 (patch) | |
tree | 378ffe6dc426d769eda0635971f06849cfef301c /source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc | |
parent | 263c5b33d697f6202e3d9b07317e1dc05ffb9a25 (diff) |
Cleanup: Remove unnecessary namespace specification
Ever since d5b72fb06cd0405c46, shader nodes have been in the
`blender::nodes` namespace, so they don't need to use that to access
Blender's C++ types and functions.
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc b/source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc index 2a88c10b61a..657f591a50c 100644 --- a/source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc +++ b/source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc @@ -27,36 +27,34 @@ static int gpu_shader_seprgb(GPUMaterial *mat, return GPU_stack_link(mat, node, "separate_rgb", in, out); } -class SeparateRGBFunction : public blender::fn::MultiFunction { +class SeparateRGBFunction : public fn::MultiFunction { public: SeparateRGBFunction() { - static blender::fn::MFSignature signature = create_signature(); + static fn::MFSignature signature = create_signature(); this->set_signature(&signature); } - static blender::fn::MFSignature create_signature() + static fn::MFSignature create_signature() { - blender::fn::MFSignatureBuilder signature{"Separate RGB"}; - signature.single_input<blender::ColorGeometry4f>("Color"); + fn::MFSignatureBuilder signature{"Separate RGB"}; + signature.single_input<ColorGeometry4f>("Color"); signature.single_output<float>("R"); signature.single_output<float>("G"); signature.single_output<float>("B"); return signature.build(); } - void call(blender::IndexMask mask, - blender::fn::MFParams params, - blender::fn::MFContext UNUSED(context)) const override + void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override { - const blender::VArray<blender::ColorGeometry4f> &colors = - params.readonly_single_input<blender::ColorGeometry4f>(0, "Color"); - blender::MutableSpan<float> rs = params.uninitialized_single_output<float>(1, "R"); - blender::MutableSpan<float> gs = params.uninitialized_single_output<float>(2, "G"); - blender::MutableSpan<float> bs = params.uninitialized_single_output<float>(3, "B"); + const VArray<ColorGeometry4f> &colors = params.readonly_single_input<ColorGeometry4f>(0, + "Color"); + MutableSpan<float> rs = params.uninitialized_single_output<float>(1, "R"); + MutableSpan<float> gs = params.uninitialized_single_output<float>(2, "G"); + MutableSpan<float> bs = params.uninitialized_single_output<float>(3, "B"); for (int64_t i : mask) { - blender::ColorGeometry4f color = colors[i]; + ColorGeometry4f color = colors[i]; rs[i] = color.r; gs[i] = color.g; bs[i] = color.b; @@ -64,7 +62,7 @@ class SeparateRGBFunction : public blender::fn::MultiFunction { } }; -static void sh_node_seprgb_build_multi_function(blender::nodes::NodeMultiFunctionBuilder &builder) +static void sh_node_seprgb_build_multi_function(NodeMultiFunctionBuilder &builder) { static SeparateRGBFunction fn; builder.set_matching_fn(fn); @@ -106,11 +104,10 @@ static int gpu_shader_combrgb(GPUMaterial *mat, return GPU_stack_link(mat, node, "combine_rgb", in, out); } -static void sh_node_combrgb_build_multi_function(blender::nodes::NodeMultiFunctionBuilder &builder) +static void sh_node_combrgb_build_multi_function(NodeMultiFunctionBuilder &builder) { - static blender::fn::CustomMF_SI_SI_SI_SO<float, float, float, blender::ColorGeometry4f> fn{ - "Combine RGB", - [](float r, float g, float b) { return blender::ColorGeometry4f(r, g, b, 1.0f); }}; + static fn::CustomMF_SI_SI_SI_SO<float, float, float, ColorGeometry4f> fn{ + "Combine RGB", [](float r, float g, float b) { return ColorGeometry4f(r, g, b, 1.0f); }}; builder.set_matching_fn(fn); } |