Differential D16083 Diff 56395 source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
| Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | public: | ||||
| bool is_equal_to(const fn::FieldNode &other) const override | bool is_equal_to(const fn::FieldNode &other) const override | ||||
| { | { | ||||
| if (const EndpointFieldInput *other_endpoint = dynamic_cast<const EndpointFieldInput *>( | if (const EndpointFieldInput *other_endpoint = dynamic_cast<const EndpointFieldInput *>( | ||||
| &other)) { | &other)) { | ||||
| return start_size_ == other_endpoint->start_size_ && end_size_ == other_endpoint->end_size_; | return start_size_ == other_endpoint->start_size_ && end_size_ == other_endpoint->end_size_; | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| 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<int> start_size = params.extract_input<Field<int>>("Start Size"); | Field<int> start_size = params.extract_input<Field<int>>("Start Size"); | ||||
| Field<int> end_size = params.extract_input<Field<int>>("End Size"); | Field<int> end_size = params.extract_input<Field<int>>("End Size"); | ||||
| Field<bool> selection_field{std::make_shared<EndpointFieldInput>(start_size, end_size)}; | Field<bool> selection_field{std::make_shared<EndpointFieldInput>(start_size, end_size)}; | ||||
| params.set_output("Selection", std::move(selection_field)); | params.set_output("Selection", std::move(selection_field)); | ||||
| Show All 16 Lines | |||||