63 if (curves ==
nullptr) {
68 if (vertex_group_index < 0) {
77 const int vertex_group_index)
const
89 if (curves ==
nullptr) {
94 if (vertex_group_index < 0) {
104 if (curves ==
nullptr) {
128 if (curves ==
nullptr) {
136 const auto get_fn = [&]() {
141 if (iter.is_stopped()) {
169 [](
const void *owner) ->
int {
182 [](
const void *owner) ->
int {
229 static auto handle_type_clamp = mf::build::SI1_SO<int8_t, int8_t>(
230 "Handle Type Validate",
234 mf::build::exec_presets::AllSpanOrSingle());
251 static float default_nurbs_weight = 1.0f;
259 &default_nurbs_weight);
261 static const auto nurbs_order_clamp = mf::build::SI1_SO<int8_t, int8_t>(
262 "NURBS Order Validate",
264 mf::build::exec_presets::AllSpanOrSingle());
265 static int nurbs_order_default = 4;
273 &nurbs_order_default);
275 static const auto normal_mode_clamp = mf::build::SI1_SO<int8_t, int8_t>(
276 "Normal Mode Validate",
280 mf::build::exec_presets::AllSpanOrSingle());
296 static const auto knots_mode_clamp = mf::build::SI1_SO<int8_t, int8_t>(
297 "Knots Mode Validate",
301 mf::build::exec_presets::AllSpanOrSingle());
310 static const auto curve_type_clamp = mf::build::SI1_SO<int8_t, int8_t>(
311 "Curve Type Validate",
315 mf::build::exec_presets::AllSpanOrSingle());
324 static const auto resolution_clamp = mf::build::SI1_SO<int, int>(
325 "Resolution Validate",
326 [](
int value) {
return std::max<int>(
value, 1); },
327 mf::build::exec_presets::AllSpanOrSingle());
328 static int resolution_default = 12;
336 &resolution_default);
345 static const auto material_index_clamp = mf::build::SI1_SO<int, int>(
346 "Material Index Validate",
349 return std::clamp<int>(
value, 0, std::numeric_limits<short>::max());
351 mf::build::exec_presets::AllSpanOrSingle());
381 {&vertex_groups, &curve_custom_data, &point_custom_data});
392 if (owner ==
nullptr) {
412 if (owner ==
nullptr) {
416 return curves.
adapt_domain(varray, from_domain, to_domain);
Low-level operations for curves.
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
@ NORMAL_MODE_MINIMUM_TWIST
@ NURBS_KNOT_MODE_ENDPOINT_BEZIER
Object is a sort of wrapper for general info.
constexpr bool is_empty() const
static VArray ForSingle(T value, const int64_t size)
MutableSpan< MDeformVert > deform_verts_for_write()
void update_curve_types()
void tag_normals_changed()
Span< MDeformVert > deform_verts() const
void tag_topology_changed()
GVArray adapt_domain(const GVArray &varray, AttrDomain from, AttrDomain to) const
void tag_positions_changed()
void tag_material_index_changed()
bool foreach_attribute(const void *owner, FunctionRef< void(const AttributeIter &)> fn) const final
GAttributeReader try_get_for_read(const void *owner, const StringRef attribute_id) const final
void foreach_domain(const FunctionRef< void(AttrDomain)> callback) const final
GAttributeWriter try_get_for_write(void *owner, const StringRef attribute_id) const final
bool try_delete(void *owner, const StringRef name) const final
GAttributeReader get_for_vertex_group_index(const CurvesGeometry &curves, const Span< MDeformVert > dverts, const int vertex_group_index) const
DEGForeachIDComponentCallback callback
void MEM_freeN(void *vmemh)
AttributeAccessorFunctions accessor_functions_for_providers()
static GeometryAttributeProviders create_attribute_providers_for_curve()
static void tag_component_curve_types_changed(void *owner)
static void tag_component_positions_changed(void *owner)
const AttributeAccessorFunctions & get_attribute_accessor_functions()
static void tag_component_topology_changed(void *owner)
static void tag_component_radii_changed(void *owner)
static AttributeAccessorFunctions get_curves_accessor_functions()
static void tag_component_material_index_changed(void *owner)
static void tag_component_normals_changed(void *owner)
void remove_defgroup_index(MutableSpan< MDeformVert > dverts, int defgroup_index)
VMutableArray< float > varray_for_mutable_deform_verts(MutableSpan< MDeformVert > dverts, int defgroup_index)
VArray< float > varray_for_deform_verts(Span< MDeformVert > dverts, int defgroup_index)
ListBase vertex_group_names
GVArray(* adapt_domain)(const void *owner, const GVArray &varray, AttrDomain from_domain, AttrDomain to_domain)
bool(* domain_supported)(const void *owner, AttrDomain domain)
int(* domain_size)(const void *owner, AttrDomain domain)