18 .description(
N_(
"The amount of points to select from the start of each spline"));
23 .description(
N_(
"The amount of points to select from the end of each spline"));
27 N_(
"The selection from the start and end of the splines based on the input sizes"));
37 start_size_(start_size),
58 if (
curves.points_num() == 0) {
64 evaluator.add(start_size_);
65 evaluator.add(end_size_);
67 const VArray<int> start_size = evaluator.get_evaluated<
int>(0);
68 const VArray<int> end_size = evaluator.get_evaluated<
int>(1);
74 for (const int i : curves_range) {
75 const IndexRange range = curves.points_for_curve(i);
76 const int start = std::max(start_size[i], 0);
77 const int end = std::max(end_size[i], 0);
79 selection_span.slice(range.take_front(start)).fill(true);
80 selection_span.slice(range.take_back(end)).fill(true);
97 return start_size_ == other_endpoint->start_size_ && end_size_ == other_endpoint->end_size_;
107 Field<bool> selection_field{std::make_shared<EndpointFieldInput>(start_size, end_size)};
108 params.set_output(
"Selection", std::move(selection_field));
Low-level operations for curves.
@ GEO_COMPONENT_TYPE_CURVE
#define GEO_NODE_CURVE_ENDPOINT_SELECTION
void nodeRegisterType(struct bNodeType *ntype)
static uint8 component(Color32 c, uint i)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
const Curves * get_for_read() const
static VArray ForContainer(ContainerT container)
static CurvesGeometry & wrap(::CurvesGeometry &dna_struct)
StringRefNull description() const
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
void parallel_for(IndexRange range, int64_t grain_size, const Function &function)
void devirtualize_varray2(const VArray< T1 > &varray1, const VArray< T2 > &varray2, const Func &func, bool enable=true)
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_curve_endpoint_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