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:
authorHans Goudey <h.goudey@me.com>2022-05-05 13:07:35 +0300
committerHans Goudey <h.goudey@me.com>2022-05-05 13:07:46 +0300
commitb4fa74e812939fdfbcb430013b63020257cdac27 (patch)
tree2695afb2325531e849756f41fe41c76cb7eb5f83 /source/blender/nodes
parent09f769bde580dffed30c91147d8575a229dfb19f (diff)
Cleanup: Rename field input class name
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/geometry/node_geometry_util.hh4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc16
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/nodes/geometry/node_geometry_util.hh b/source/blender/nodes/geometry/node_geometry_util.hh
index 7af3159bbf8..0ed75bcfa9b 100644
--- a/source/blender/nodes/geometry/node_geometry_util.hh
+++ b/source/blender/nodes/geometry/node_geometry_util.hh
@@ -81,9 +81,9 @@ void separate_geometry(GeometrySet &geometry_set,
std::optional<CustomDataType> node_data_type_to_custom_data_type(eNodeSocketDatatype type);
std::optional<CustomDataType> node_socket_to_custom_data_type(const bNodeSocket &socket);
-class SplineLengthFieldInput final : public GeometryFieldInput {
+class CurveLengthFieldInput final : public GeometryFieldInput {
public:
- SplineLengthFieldInput();
+ CurveLengthFieldInput();
GVArray get_varray_for_context(const GeometryComponent &component,
AttributeDomain domain,
IndexMask mask) const final;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc
index 2e5a94b0a63..aec6320d881 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc
@@ -535,7 +535,7 @@ static Field<int> get_curve_count_field(GeoNodeExecParams params,
auto get_count_op = std::make_shared<FieldOperation>(
FieldOperation(get_count_fn,
- {Field<float>(std::make_shared<SplineLengthFieldInput>()),
+ {Field<float>(std::make_shared<CurveLengthFieldInput>()),
params.extract_input<Field<float>>("Length")}));
return Field<int>(std::move(get_count_op));
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
index 6c24f86b63b..0b1bc03360e 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
@@ -39,15 +39,15 @@ static VArray<float> construct_spline_length_gvarray(const CurveComponent &compo
return {};
}
-SplineLengthFieldInput::SplineLengthFieldInput()
+CurveLengthFieldInput::CurveLengthFieldInput()
: GeometryFieldInput(CPPType::get<float>(), "Spline Length node")
{
category_ = Category::Generated;
}
-GVArray SplineLengthFieldInput::get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
- IndexMask UNUSED(mask)) const
+GVArray CurveLengthFieldInput::get_varray_for_context(const GeometryComponent &component,
+ const AttributeDomain domain,
+ IndexMask UNUSED(mask)) const
{
if (component.type() == GEO_COMPONENT_TYPE_CURVE) {
const CurveComponent &curve_component = static_cast<const CurveComponent &>(component);
@@ -56,15 +56,15 @@ GVArray SplineLengthFieldInput::get_varray_for_context(const GeometryComponent &
return {};
}
-uint64_t SplineLengthFieldInput::hash() const
+uint64_t CurveLengthFieldInput::hash() const
{
/* Some random constant hash. */
return 3549623580;
}
-bool SplineLengthFieldInput::is_equal_to(const fn::FieldNode &other) const
+bool CurveLengthFieldInput::is_equal_to(const fn::FieldNode &other) const
{
- return dynamic_cast<const SplineLengthFieldInput *>(&other) != nullptr;
+ return dynamic_cast<const CurveLengthFieldInput *>(&other) != nullptr;
}
} // namespace blender::nodes
@@ -136,7 +136,7 @@ class SplineCountFieldInput final : public GeometryFieldInput {
static void node_geo_exec(GeoNodeExecParams params)
{
- Field<float> spline_length_field{std::make_shared<SplineLengthFieldInput>()};
+ Field<float> spline_length_field{std::make_shared<CurveLengthFieldInput>()};
Field<int> spline_count_field{std::make_shared<SplineCountFieldInput>()};
params.set_output("Length", std::move(spline_length_field));