21 b.add_input<
decl::Bool>(
N_(
"Start Vertices")).default_value(
true).hide_value().supports_field();
22 b.add_input<
decl::Int>(
N_(
"Next Vertex Index")).default_value(-1).hide_value().supports_field();
33 for (
const int start_vert : start_selection) {
34 selection[start_vert] =
true;
37 for (
const int start_i : start_selection) {
39 while (iter != next_indices[iter] && !selection[next_indices[iter]]) {
40 if (next_indices[iter] < 0 || next_indices[iter] >= src_mesh.
totvert) {
43 selection[next_indices[iter]] =
true;
44 iter = next_indices[iter];
50 if ((selection[edge.v1] && selection[edge.v2]) &&
51 (edge.v1 == next_indices[edge.v2] || edge.v2 == next_indices[edge.v1])) {
52 r_selection[i] =
true;
65 start_vertices_(start_vertices),
66 next_vertex_(next_vertex)
81 if (
mesh ==
nullptr) {
87 evaluator.add(next_vertex_);
88 evaluator.add(start_vertices_);
91 const IndexMask start_verts = evaluator.get_evaluated_as_mask(1);
93 if (start_verts.is_empty()) {
102 return mesh_component.
attributes()->adapt_domain<
bool>(
115 return other_field->start_vertices_ == start_vertices_ &&
116 other_field->next_vertex_ == next_vertex_;
127 std::make_shared<PathToEdgeSelectionFieldInput>(start_vertices, next_vertex)};
128 params.set_output(
"Selection", std::move(selection_field));
@ GEO_COMPONENT_TYPE_MESH
#define GEO_NODE_EDGE_PATHS_TO_SELECTION
void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth)
void nodeRegisterType(struct bNodeType *ntype)
static uint8 component(Color32 c, uint i)
int attribute_domain_size(eAttrDomain domain) const
const Mesh * get_for_read() const
std::optional< blender::bke::AttributeAccessor > attributes() const final
MutableSpan< T > as_mutable_span()
static VArray ForContainer(ContainerT container)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static void edge_paths_to_selection(const Mesh &src_mesh, const IndexMask start_selection, const Span< int > next_indices, MutableSpan< bool > r_selection)
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
uint64_t get_default_hash_2(const T1 &v1, const T2 &v2)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_geo_edge_paths_to_selection()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
unsigned __int64 uint64_t
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare