Differential D15954 Diff 56253 source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
| Show First 20 Lines • Show All 274 Lines • ▼ Show 20 Lines | uint64_t hash() const override | ||||
| /* Some random constant hash. */ | /* Some random constant hash. */ | ||||
| return 4536246522; | return 4536246522; | ||||
| } | } | ||||
| bool is_equal_to(const fn::FieldNode &other) const override | bool is_equal_to(const fn::FieldNode &other) const override | ||||
| { | { | ||||
| return dynamic_cast<const IndexOnSplineFieldInput *>(&other) != nullptr; | return dynamic_cast<const IndexOnSplineFieldInput *>(&other) != nullptr; | ||||
| } | } | ||||
| std::optional<eAttrDomain> preferred_domain(const CurvesGeometry & /*curves*/) const | |||||
| { | |||||
| return ATTR_DOMAIN_POINT; | |||||
| } | |||||
| }; | }; | ||||
| static void node_geo_exec(GeoNodeExecParams params) | static void node_geo_exec(GeoNodeExecParams params) | ||||
| { | { | ||||
| Field<float> parameter_field{std::make_shared<CurveParameterFieldInput>()}; | Field<float> parameter_field{std::make_shared<CurveParameterFieldInput>()}; | ||||
| Field<float> length_field{std::make_shared<CurveLengthParameterFieldInput>()}; | Field<float> length_field{std::make_shared<CurveLengthParameterFieldInput>()}; | ||||
| Field<int> index_on_spline_field{std::make_shared<IndexOnSplineFieldInput>()}; | Field<int> index_on_spline_field{std::make_shared<IndexOnSplineFieldInput>()}; | ||||
| params.set_output("Factor", std::move(parameter_field)); | params.set_output("Factor", std::move(parameter_field)); | ||||
| Show All 17 Lines | |||||