diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-05-25 18:03:54 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-05-25 18:03:54 +0300 |
commit | 00955cd31eda95aca619842064d22663af4c812b (patch) | |
tree | 85a4650d260f2fdc250d433d51d7309b77f08510 /source/blender/nodes | |
parent | fd94e033446c72fb92048a9864c1d539fccde59a (diff) |
Revert "Blenlib: Explicit Colors."
This reverts commit fd94e033446c72fb92048a9864c1d539fccde59a.
does not compile against latest master.
Diffstat (limited to 'source/blender/nodes')
13 files changed, 76 insertions, 88 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc index 71643df1cb6..21538db5455 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc @@ -101,12 +101,9 @@ template<> inline float3 clamp_value(const float3 val, const float3 min, const f return tmp; } -template<> -inline ColorGeometry4f clamp_value(const ColorGeometry4f val, - const ColorGeometry4f min, - const ColorGeometry4f max) +template<> inline Color4f clamp_value(const Color4f val, const Color4f min, const Color4f max) { - ColorGeometry4f tmp; + Color4f tmp; tmp.r = std::min(std::max(val.r, min.r), max.r); tmp.g = std::min(std::max(val.g, min.g), max.g); tmp.b = std::min(std::max(val.b, min.b), max.b); @@ -217,8 +214,8 @@ static void clamp_attribute(GeometryComponent &component, const GeoNodeExecParam break; } case CD_PROP_COLOR: { - ColorGeometry4f min = params.get_input<ColorGeometry4f>("Min_003"); - ColorGeometry4f max = params.get_input<ColorGeometry4f>("Max_003"); + Color4f min = params.get_input<Color4f>("Min_003"); + Color4f max = params.get_input<Color4f>("Max_003"); if (operation == NODE_CLAMP_RANGE) { if (min.r > max.r) { std::swap(min.r, max.r); @@ -233,9 +230,8 @@ static void clamp_attribute(GeometryComponent &component, const GeoNodeExecParam std::swap(min.a, max.a); } } - MutableSpan<ColorGeometry4f> results = attribute_result.as_span<ColorGeometry4f>(); - clamp_attribute<ColorGeometry4f>( - attribute_input->typed<ColorGeometry4f>(), results, min, max); + MutableSpan<Color4f> results = attribute_result.as_span<Color4f>(); + clamp_attribute<Color4f>(attribute_input->typed<Color4f>(), results, min, max); break; } default: { diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc index 5293dd8c876..b13e82e676d 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc @@ -83,8 +83,8 @@ static void execute_on_component(const GeoNodeExecParams ¶ms, GeometryCompon * currently. */ const AttributeDomain result_domain = get_result_domain(component, input_name, result_name); - OutputAttribute_Typed<ColorGeometry4f> attribute_result = - component.attribute_try_get_for_output_only<ColorGeometry4f>(result_name, result_domain); + OutputAttribute_Typed<Color4f> attribute_result = + component.attribute_try_get_for_output_only<Color4f>(result_name, result_domain); if (!attribute_result) { return; } @@ -92,7 +92,7 @@ static void execute_on_component(const GeoNodeExecParams ¶ms, GeometryCompon GVArray_Typed<float> attribute_in = component.attribute_get_for_read<float>( input_name, result_domain, 0.0f); - MutableSpan<ColorGeometry4f> results = attribute_result.as_span(); + MutableSpan<Color4f> results = attribute_result.as_span(); ColorBand *color_ramp = &node_storage->color_ramp; parallel_for(IndexRange(attribute_in.size()), 512, [&](IndexRange range) { diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc index 57ac68b4cd4..a2ff1668a06 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc @@ -131,16 +131,16 @@ static void do_equal_operation_float3(const VArray<float3> &input_a, } } -static void do_equal_operation_color4f(const VArray<ColorGeometry4f> &input_a, - const VArray<ColorGeometry4f> &input_b, +static void do_equal_operation_color4f(const VArray<Color4f> &input_a, + const VArray<Color4f> &input_b, const float threshold, MutableSpan<bool> span_result) { const float threshold_squared = pow2f(threshold); const int size = input_a.size(); for (const int i : IndexRange(size)) { - const ColorGeometry4f a = input_a[i]; - const ColorGeometry4f b = input_b[i]; + const Color4f a = input_a[i]; + const Color4f b = input_b[i]; span_result[i] = len_squared_v4v4(a, b) < threshold_squared; } } @@ -185,16 +185,16 @@ static void do_not_equal_operation_float3(const VArray<float3> &input_a, } } -static void do_not_equal_operation_color4f(const VArray<ColorGeometry4f> &input_a, - const VArray<ColorGeometry4f> &input_b, +static void do_not_equal_operation_color4f(const VArray<Color4f> &input_a, + const VArray<Color4f> &input_b, const float threshold, MutableSpan<bool> span_result) { const float threshold_squared = pow2f(threshold); const int size = input_a.size(); for (const int i : IndexRange(size)) { - const ColorGeometry4f a = input_a[i]; - const ColorGeometry4f b = input_b[i]; + const Color4f a = input_a[i]; + const Color4f b = input_b[i]; span_result[i] = len_squared_v4v4(a, b) >= threshold_squared; } } @@ -287,10 +287,8 @@ static void attribute_compare_calc(GeometryComponent &component, const GeoNodeEx attribute_a->typed<float3>(), attribute_b->typed<float3>(), threshold, result_span); } else if (input_data_type == CD_PROP_COLOR) { - do_equal_operation_color4f(attribute_a->typed<ColorGeometry4f>(), - attribute_b->typed<ColorGeometry4f>(), - threshold, - result_span); + do_equal_operation_color4f( + attribute_a->typed<Color4f>(), attribute_b->typed<Color4f>(), threshold, result_span); } else if (input_data_type == CD_PROP_BOOL) { do_equal_operation_bool( @@ -307,10 +305,8 @@ static void attribute_compare_calc(GeometryComponent &component, const GeoNodeEx attribute_a->typed<float3>(), attribute_b->typed<float3>(), threshold, result_span); } else if (input_data_type == CD_PROP_COLOR) { - do_not_equal_operation_color4f(attribute_a->typed<ColorGeometry4f>(), - attribute_b->typed<ColorGeometry4f>(), - threshold, - result_span); + do_not_equal_operation_color4f( + attribute_a->typed<Color4f>(), attribute_b->typed<Color4f>(), threshold, result_span); } else if (input_data_type == CD_PROP_BOOL) { do_not_equal_operation_bool( diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc index 599c9e58e52..2fc86269797 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_curve_map.cc @@ -165,10 +165,9 @@ static void execute_on_component(const GeoNodeExecParams ¶ms, GeometryCompon } case CD_PROP_COLOR: { const CurveMapping *cumap = (CurveMapping *)node_storage.curve_rgb; - GVArray_Typed<ColorGeometry4f> attribute_in = - component.attribute_get_for_read<ColorGeometry4f>( - input_name, result_domain, ColorGeometry4f(0.0f, 0.0f, 0.0f, 1.0f)); - MutableSpan<ColorGeometry4f> results = attribute_result.as_span<ColorGeometry4f>(); + GVArray_Typed<Color4f> attribute_in = component.attribute_get_for_read<Color4f>( + input_name, result_domain, Color4f(0.0f, 0.0f, 0.0f, 1.0f)); + MutableSpan<Color4f> results = attribute_result.as_span<Color4f>(); parallel_for(IndexRange(attribute_in.size()), 512, [&](IndexRange range) { for (const int i : range) { BKE_curvemapping_evaluateRGBF(cumap, results[i], attribute_in[i]); diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc index 389abe3b2aa..60522fd0f72 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc @@ -110,7 +110,7 @@ static void fill_attribute(GeometryComponent &component, const GeoNodeExecParams break; } case CD_PROP_COLOR: { - const ColorGeometry4f value = params.get_input<ColorGeometry4f>("Value_002"); + const Color4f value = params.get_input<Color4f>("Value_002"); attribute->fill(&value); break; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc index a6bd6c0ee32..e502a183ef5 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc @@ -120,16 +120,16 @@ static void do_mix_operation_float3(const int blend_mode, static void do_mix_operation_color4f(const int blend_mode, const VArray<float> &factors, - const VArray<ColorGeometry4f> &inputs_a, - const VArray<ColorGeometry4f> &inputs_b, - VMutableArray<ColorGeometry4f> &results) + const VArray<Color4f> &inputs_a, + const VArray<Color4f> &inputs_b, + VMutableArray<Color4f> &results) { const int size = results.size(); parallel_for(IndexRange(size), 512, [&](IndexRange range) { for (const int i : range) { const float factor = factors[i]; - ColorGeometry4f a = inputs_a[i]; - const ColorGeometry4f b = inputs_b[i]; + Color4f a = inputs_a[i]; + const Color4f b = inputs_b[i]; ramp_blend(blend_mode, a, factor, b); results.set(i, a); } @@ -160,9 +160,9 @@ static void do_mix_operation(const CustomDataType result_type, else if (result_type == CD_PROP_COLOR) { do_mix_operation_color4f(blend_mode, attribute_factor, - attribute_a.typed<ColorGeometry4f>(), - attribute_b.typed<ColorGeometry4f>(), - attribute_result.typed<ColorGeometry4f>()); + attribute_a.typed<Color4f>(), + attribute_b.typed<Color4f>(), + attribute_result.typed<Color4f>()); } } diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_sample_texture.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_sample_texture.cc index d6b1ad3e9e0..aa558314b9e 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_sample_texture.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_sample_texture.cc @@ -79,9 +79,8 @@ static void execute_on_component(GeometryComponent &component, const GeoNodeExec const AttributeDomain result_domain = get_result_domain( component, result_attribute_name, mapping_name); - OutputAttribute_Typed<ColorGeometry4f> attribute_out = - component.attribute_try_get_for_output_only<ColorGeometry4f>(result_attribute_name, - result_domain); + OutputAttribute_Typed<Color4f> attribute_out = + component.attribute_try_get_for_output_only<Color4f>(result_attribute_name, result_domain); if (!attribute_out) { return; } @@ -89,7 +88,7 @@ static void execute_on_component(GeometryComponent &component, const GeoNodeExec GVArray_Typed<float3> mapping_attribute = component.attribute_get_for_read<float3>( mapping_name, result_domain, {0, 0, 0}); - MutableSpan<ColorGeometry4f> colors = attribute_out.as_span(); + MutableSpan<Color4f> colors = attribute_out.as_span(); parallel_for(IndexRange(mapping_attribute.size()), 128, [&](IndexRange range) { for (const int i : range) { TexResult texture_result = {0}; diff --git a/source/blender/nodes/geometry/nodes/node_geo_switch.cc b/source/blender/nodes/geometry/nodes/node_geo_switch.cc index 049ba5d3143..e0daae0c172 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_switch.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_switch.cc @@ -134,7 +134,7 @@ static void geo_node_switch_exec(GeoNodeExecParams params) break; } case SOCK_RGBA: { - output_input<ColorGeometry4f>(params, input, "_004", "Output_004"); + output_input<Color4f>(params, input, "_004", "Output_004"); break; } case SOCK_STRING: { diff --git a/source/blender/nodes/intern/node_geometry_exec.cc b/source/blender/nodes/intern/node_geometry_exec.cc index 188d198e159..73a702c753a 100644 --- a/source/blender/nodes/intern/node_geometry_exec.cc +++ b/source/blender/nodes/intern/node_geometry_exec.cc @@ -104,10 +104,9 @@ GVArrayPtr GeoNodeExecParams::get_input_attribute(const StringRef name, return std::make_unique<fn::GVArray_For_SingleValue>(*cpp_type, domain_size, buffer); } if (found_socket->type == SOCK_RGBA) { - const ColorGeometry4f value = this->get_input<ColorGeometry4f>(found_socket->identifier); + const Color4f value = this->get_input<Color4f>(found_socket->identifier); BUFFER_FOR_CPP_TYPE_VALUE(*cpp_type, buffer); - conversions.convert_to_uninitialized( - CPPType::get<ColorGeometry4f>(), *cpp_type, &value, buffer); + conversions.convert_to_uninitialized(CPPType::get<Color4f>(), *cpp_type, &value, buffer); return std::make_unique<fn::GVArray_For_SingleValue>(*cpp_type, domain_size, buffer); } BLI_assert(false); diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc index 783a7a9b3d8..ce2848b52a0 100644 --- a/source/blender/nodes/intern/node_socket.cc +++ b/source/blender/nodes/intern/node_socket.cc @@ -637,9 +637,9 @@ static bNodeSocketType *make_socket_type_vector(PropertySubType subtype) static bNodeSocketType *make_socket_type_rgba() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_RGBA, PROP_NONE); - socktype->get_cpp_type = []() { return &blender::fn::CPPType::get<blender::ColorGeometry4f>(); }; + socktype->get_cpp_type = []() { return &blender::fn::CPPType::get<blender::Color4f>(); }; socktype->get_cpp_value = [](const bNodeSocket &socket, void *r_value) { - *(blender::ColorGeometry4f *)r_value = ((bNodeSocketValueRGBA *)socket.default_value)->value; + *(blender::Color4f *)r_value = ((bNodeSocketValueRGBA *)socket.default_value)->value; }; return socktype; } diff --git a/source/blender/nodes/intern/type_conversions.cc b/source/blender/nodes/intern/type_conversions.cc index 220e5ea9046..63f7b8a9ee8 100644 --- a/source/blender/nodes/intern/type_conversions.cc +++ b/source/blender/nodes/intern/type_conversions.cc @@ -66,9 +66,9 @@ static bool float_to_bool(const float &a) { return a > 0.0f; } -static ColorGeometry4f float_to_color(const float &a) +static Color4f float_to_color(const float &a) { - return ColorGeometry4f(a, a, a, 1.0f); + return Color4f(a, a, a, 1.0f); } static float3 float2_to_float3(const float2 &a) @@ -87,9 +87,9 @@ static bool float2_to_bool(const float2 &a) { return !is_zero_v2(a); } -static ColorGeometry4f float2_to_color(const float2 &a) +static Color4f float2_to_color(const float2 &a) { - return ColorGeometry4f(a.x, a.y, 0.0f, 1.0f); + return Color4f(a.x, a.y, 0.0f, 1.0f); } static bool float3_to_bool(const float3 &a) @@ -108,9 +108,9 @@ static float2 float3_to_float2(const float3 &a) { return float2(a); } -static ColorGeometry4f float3_to_color(const float3 &a) +static Color4f float3_to_color(const float3 &a) { - return ColorGeometry4f(a.x, a.y, a.z, 1.0f); + return Color4f(a.x, a.y, a.z, 1.0f); } static bool int_to_bool(const int32_t &a) @@ -129,9 +129,9 @@ static float3 int_to_float3(const int32_t &a) { return float3((float)a); } -static ColorGeometry4f int_to_color(const int32_t &a) +static Color4f int_to_color(const int32_t &a) { - return ColorGeometry4f((float)a, (float)a, (float)a, 1.0f); + return Color4f((float)a, (float)a, (float)a, 1.0f); } static float bool_to_float(const bool &a) @@ -150,28 +150,28 @@ static float3 bool_to_float3(const bool &a) { return (a) ? float3(1.0f) : float3(0.0f); } -static ColorGeometry4f bool_to_color(const bool &a) +static Color4f bool_to_color(const bool &a) { - return (a) ? ColorGeometry4f(1.0f, 1.0f, 1.0f, 1.0f) : ColorGeometry4f(0.0f, 0.0f, 0.0f, 1.0f); + return (a) ? Color4f(1.0f, 1.0f, 1.0f, 1.0f) : Color4f(0.0f, 0.0f, 0.0f, 1.0f); } -static bool color_to_bool(const ColorGeometry4f &a) +static bool color_to_bool(const Color4f &a) { return rgb_to_grayscale(a) > 0.0f; } -static float color_to_float(const ColorGeometry4f &a) +static float color_to_float(const Color4f &a) { return rgb_to_grayscale(a); } -static int32_t color_to_int(const ColorGeometry4f &a) +static int32_t color_to_int(const Color4f &a) { return (int)rgb_to_grayscale(a); } -static float2 color_to_float2(const ColorGeometry4f &a) +static float2 color_to_float2(const Color4f &a) { return float2(a.r, a.g); } -static float3 color_to_float3(const ColorGeometry4f &a) +static float3 color_to_float3(const Color4f &a) { return float3(a.r, a.g, a.b); } @@ -184,37 +184,37 @@ static DataTypeConversions create_implicit_conversions() add_implicit_conversion<float, float3, float_to_float3>(conversions); add_implicit_conversion<float, int32_t, float_to_int>(conversions); add_implicit_conversion<float, bool, float_to_bool>(conversions); - add_implicit_conversion<float, ColorGeometry4f, float_to_color>(conversions); + add_implicit_conversion<float, Color4f, float_to_color>(conversions); add_implicit_conversion<float2, float3, float2_to_float3>(conversions); add_implicit_conversion<float2, float, float2_to_float>(conversions); add_implicit_conversion<float2, int32_t, float2_to_int>(conversions); add_implicit_conversion<float2, bool, float2_to_bool>(conversions); - add_implicit_conversion<float2, ColorGeometry4f, float2_to_color>(conversions); + add_implicit_conversion<float2, Color4f, float2_to_color>(conversions); add_implicit_conversion<float3, bool, float3_to_bool>(conversions); add_implicit_conversion<float3, float, float3_to_float>(conversions); add_implicit_conversion<float3, int32_t, float3_to_int>(conversions); add_implicit_conversion<float3, float2, float3_to_float2>(conversions); - add_implicit_conversion<float3, ColorGeometry4f, float3_to_color>(conversions); + add_implicit_conversion<float3, Color4f, float3_to_color>(conversions); add_implicit_conversion<int32_t, bool, int_to_bool>(conversions); add_implicit_conversion<int32_t, float, int_to_float>(conversions); add_implicit_conversion<int32_t, float2, int_to_float2>(conversions); add_implicit_conversion<int32_t, float3, int_to_float3>(conversions); - add_implicit_conversion<int32_t, ColorGeometry4f, int_to_color>(conversions); + add_implicit_conversion<int32_t, Color4f, int_to_color>(conversions); add_implicit_conversion<bool, float, bool_to_float>(conversions); add_implicit_conversion<bool, int32_t, bool_to_int>(conversions); add_implicit_conversion<bool, float2, bool_to_float2>(conversions); add_implicit_conversion<bool, float3, bool_to_float3>(conversions); - add_implicit_conversion<bool, ColorGeometry4f, bool_to_color>(conversions); + add_implicit_conversion<bool, Color4f, bool_to_color>(conversions); - add_implicit_conversion<ColorGeometry4f, bool, color_to_bool>(conversions); - add_implicit_conversion<ColorGeometry4f, float, color_to_float>(conversions); - add_implicit_conversion<ColorGeometry4f, int32_t, color_to_int>(conversions); - add_implicit_conversion<ColorGeometry4f, float2, color_to_float2>(conversions); - add_implicit_conversion<ColorGeometry4f, float3, color_to_float3>(conversions); + add_implicit_conversion<Color4f, bool, color_to_bool>(conversions); + add_implicit_conversion<Color4f, float, color_to_float>(conversions); + add_implicit_conversion<Color4f, int32_t, color_to_int>(conversions); + add_implicit_conversion<Color4f, float2, color_to_float2>(conversions); + add_implicit_conversion<Color4f, float3, color_to_float3>(conversions); return conversions; } diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc index a7239154633..8ca4a6bab5f 100644 --- a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc +++ b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc @@ -70,7 +70,7 @@ class SeparateRGBFunction : public blender::fn::MultiFunction { static blender::fn::MFSignature create_signature() { blender::fn::MFSignatureBuilder signature{"Separate RGB"}; - signature.single_input<blender::ColorGeometry4f>("Color"); + signature.single_input<blender::Color4f>("Color"); signature.single_output<float>("R"); signature.single_output<float>("G"); signature.single_output<float>("B"); @@ -81,14 +81,14 @@ class SeparateRGBFunction : public blender::fn::MultiFunction { blender::fn::MFParams params, blender::fn::MFContext UNUSED(context)) const override { - const blender::VArray<blender::ColorGeometry4f> &colors = - params.readonly_single_input<blender::ColorGeometry4f>(0, "Color"); + const blender::VArray<blender::Color4f> &colors = + params.readonly_single_input<blender::Color4f>(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"); for (int64_t i : mask) { - blender::ColorGeometry4f color = colors[i]; + blender::Color4f color = colors[i]; rs[i] = color.r; gs[i] = color.g; bs[i] = color.b; @@ -155,9 +155,8 @@ static int gpu_shader_combrgb(GPUMaterial *mat, 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::ColorGeometry4f> fn{ - "Combine RGB", - [](float r, float g, float b) { return blender::ColorGeometry4f(r, g, b, 1.0f); }}; + 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); }}; builder.set_matching_fn(fn); } diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc b/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc index 5b2eb300aac..90e8161c09f 100644 --- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc +++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc @@ -140,7 +140,7 @@ class ColorBandFunction : public blender::fn::MultiFunction { { blender::fn::MFSignatureBuilder signature{"Color Band"}; signature.single_input<float>("Value"); - signature.single_output<blender::ColorGeometry4f>("Color"); + signature.single_output<blender::Color4f>("Color"); signature.single_output<float>("Alpha"); return signature.build(); } @@ -150,12 +150,12 @@ class ColorBandFunction : public blender::fn::MultiFunction { blender::fn::MFContext UNUSED(context)) const override { const blender::VArray<float> &values = params.readonly_single_input<float>(0, "Value"); - blender::MutableSpan<blender::ColorGeometry4f> colors = - params.uninitialized_single_output<blender::ColorGeometry4f>(1, "Color"); + blender::MutableSpan<blender::Color4f> colors = + params.uninitialized_single_output<blender::Color4f>(1, "Color"); blender::MutableSpan<float> alphas = params.uninitialized_single_output<float>(2, "Alpha"); for (int64_t i : mask) { - blender::ColorGeometry4f color; + blender::Color4f color; BKE_colorband_evaluate(&color_band_, values[i], color); colors[i] = color; alphas[i] = color.a; |