18 b.add_output<
decl::Bool>(
"Selection").field_source();
63 const IndexRange points = points_by_curve[i_curve];
68 for (
const int i_point : points) {
82 :
bke::CurvesFieldInput(
CPPType::get<bool>(),
"Handle Type Selection node"),
93 if (domain != AttrDomain::Point) {
111 return mode_ == other_handle_selection->mode_ && type_ == other_handle_selection->type_;
118 return AttrDomain::Point;
129 Field<bool> selection_field{std::make_shared<HandleTypeFieldInput>(handle_type, mode)};
130 params.set_output(
"Selection", std::move(selection_field));
139 ntype.
ui_name =
"Handle Type Selection";
140 ntype.
ui_description =
"Provide a selection based on the handle types of Bézier control points";
147 "NodeGeometryCurveSelectHandles",
Low-level operations for curves.
#define NODE_STORAGE_FUNCS(StorageT)
#define GEO_NODE_CURVE_HANDLE_TYPE_SELECTION
#define BLI_assert_unreachable()
GeometryNodeCurveHandleMode
@ GEO_NODE_CURVE_HANDLE_RIGHT
@ GEO_NODE_CURVE_HANDLE_LEFT
GeometryNodeCurveHandleType
@ GEO_NODE_CURVE_HANDLE_ALIGN
@ GEO_NODE_CURVE_HANDLE_AUTO
@ GEO_NODE_CURVE_HANDLE_FREE
@ GEO_NODE_CURVE_HANDLE_VECTOR
#define NOD_REGISTER_NODE(REGISTER_FUNC)
BMesh const char void * data
unsigned long long int uint64_t
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr void fill(const T &value) const
static VArray from_container(ContainerT container)
VArray< int8_t > handle_types_left() const
OffsetIndices< int > points_by_curve() const
VArray< int8_t > handle_types_right() const
IndexRange curves_range() const
VArray< int8_t > curve_types() const
void * MEM_callocN(size_t len, const char *str)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
static HandleType handle_type_from_input_type(const GeometryNodeCurveHandleType type)
static void node_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
static void select_by_handle_type(const bke::CurvesGeometry &curves, const HandleType type, const GeometryNodeCurveHandleMode mode, const MutableSpan< bool > r_selection)
static void node_init(bNodeTree *, bNode *node)
uint64_t get_default_hash(const T &v, const Args &...args)
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)