Blender V5.0
blender::bke::CurvesGeometry Class Reference

#include <BKE_curves.hh>

Inherits CurvesGeometry.

Classes

struct  BlendWriteData

Public Member Functions

template<typename T>
VArray< Tadapt_domain (const VArray< T > &varray, AttrDomain from, AttrDomain to) const
Constructors/Destructor
 CurvesGeometry ()
 CurvesGeometry (int point_num, int curve_num)
 CurvesGeometry (const CurvesGeometry &other)
 CurvesGeometry (CurvesGeometry &&other)
CurvesGeometryoperator= (const CurvesGeometry &other)
CurvesGeometryoperator= (CurvesGeometry &&other)
 ~CurvesGeometry ()
Accessors
Span< int > offsets () const
MutableSpan< int > offsets_for_write ()
VArray< int8_t > curve_types () const
MutableSpan< int8_t > curve_types_for_write ()
void fill_curve_types (CurveType type)
void fill_curve_types (const IndexMask &selection, CurveType type)
void update_curve_types ()
Span< float3positions () const
MutableSpan< float3positions_for_write ()
VArray< floatradius () const
MutableSpan< floatradius_for_write ()
VArray< bool > cyclic () const
MutableSpan< bool > cyclic_for_write ()
VArray< int > resolution () const
MutableSpan< int > resolution_for_write ()
VArray< floattilt () const
MutableSpan< floattilt_for_write ()
VArray< int8_t > normal_mode () const
MutableSpan< int8_t > normal_mode_for_write ()
VArray< int8_t > handle_types_left () const
MutableSpan< int8_t > handle_types_left_for_write ()
VArray< int8_t > handle_types_right () const
MutableSpan< int8_t > handle_types_right_for_write ()
std::optional< Span< float3 > > handle_positions_left () const
MutableSpan< float3handle_positions_left_for_write ()
std::optional< Span< float3 > > handle_positions_right () const
MutableSpan< float3handle_positions_right_for_write ()
VArray< int8_t > nurbs_orders () const
MutableSpan< int8_t > nurbs_orders_for_write ()
VArray< int8_t > nurbs_knots_modes () const
MutableSpan< int8_t > nurbs_knots_modes_for_write ()
std::optional< Span< float > > nurbs_weights () const
MutableSpan< floatnurbs_weights_for_write ()
std::optional< Span< float2 > > surface_uv_coords () const
MutableSpan< float2surface_uv_coords_for_write ()
Span< floatnurbs_custom_knots () const
MutableSpan< floatnurbs_custom_knots_for_write ()
OffsetIndices< int > nurbs_custom_knots_by_curve () const
IndexMask nurbs_custom_knot_curves (IndexMaskMemory &memory) const
void nurbs_custom_knots_update_size ()
void nurbs_custom_knots_resize (int knots_num)
Span< MDeformVertdeform_verts () const
MutableSpan< MDeformVertdeform_verts_for_write ()
Operations
std::optional< Bounds< float3 > > bounds_min_max (bool use_radius=true) const
void count_memory (MemoryCounter &memory) const
std::optional< int > material_index_max () const
void resize (int points_num, int curves_num)
void tag_positions_changed ()
void tag_topology_changed ()
void tag_normals_changed ()
void tag_radii_changed ()
void tag_material_index_changed ()
void translate (const float3 &translation)
void transform (const float4x4 &matrix)
void calculate_bezier_auto_handles ()
void remove_points (const IndexMask &points_to_delete, const AttributeFilter &attribute_filter)
void remove_curves (const IndexMask &curves_to_delete, const AttributeFilter &attribute_filter)
void reverse_curves (const IndexMask &curves_to_reverse)
void remove_attributes_based_on_types ()
Domain Interpolation
AttributeAccessor attributes () const
MutableAttributeAccessor attributes_for_write ()
GVArray adapt_domain (const GVArray &varray, AttrDomain from, AttrDomain to) const
File reading/writing.
void blend_read (BlendDataReader &reader)
void blend_write_prepare (BlendWriteData &write_data)
void blend_write (BlendWriter &writer, ID &id, const BlendWriteData &write_data)

#CurvesGeometry Inline Methods

int points_num () const
int curves_num () const
bool is_empty () const
IndexRange points_range () const
IndexRange curves_range () const
OffsetIndices< int > points_by_curve () const
bool has_curve_with_type (CurveType type) const
bool has_curve_with_type (Span< CurveType > types) const
bool is_single_type (CurveType type) const
const std::array< int, CURVE_TYPES_NUM > & curve_type_counts () const
bool nurbs_has_custom_knots () const
int evaluated_points_num () const
Span< int > bezier_evaluated_offsets_for_curve (int curve_index) const
Span< floatevaluated_lengths_for_curve (int curve_index, bool cyclic) const
float evaluated_length_total_for_curve (int curve_index, bool cyclic) const

Evaluation

IndexMask indices_for_curve_type (CurveType type, IndexMaskMemory &memory) const
IndexMask indices_for_curve_type (CurveType type, const IndexMask &selection, IndexMaskMemory &memory) const
Array< int > point_to_curve_map () const
OffsetIndices< int > evaluated_points_by_curve () const
bool has_cyclic_curve () const
Span< float3evaluated_positions () const
Span< float3evaluated_tangents () const
Span< float3evaluated_normals () const
void ensure_evaluated_lengths () const
void ensure_can_interpolate_to_evaluated () const
void interpolate_to_evaluated (int curve_index, GSpan src, GMutableSpan dst) const
void interpolate_to_evaluated (GSpan src, GMutableSpan dst) const

Additional Inherited Members

Public Attributes inherited from CurvesGeometry
int * curve_offsets
struct AttributeStorage attribute_storage
CustomData point_data
CustomData curve_data_legacy
int point_num
int curve_num
ListBase vertex_group_names
int vertex_group_active_index
int attributes_active_index
CurvesGeometryRuntimeHandleruntime
floatcustom_knots
int custom_knot_num
char _pad [4]

Detailed Description

A C++ class that wraps the DNA struct for better encapsulation and ease of use. It inherits directly from the struct rather than storing a pointer to avoid more complicated ownership handling.

Definition at line 155 of file BKE_curves.hh.

Constructor & Destructor Documentation

◆ CurvesGeometry() [1/4]

CurvesGeometry::CurvesGeometry ( )

Definition at line 65 of file curves_geometry.cc.

References CurvesGeometry().

Referenced by CurvesGeometry(), CurvesGeometry(), CurvesGeometry(), operator=(), and operator=().

◆ CurvesGeometry() [2/4]

◆ CurvesGeometry() [3/4]

◆ CurvesGeometry() [4/4]

◆ ~CurvesGeometry()

Member Function Documentation

◆ adapt_domain() [1/2]

◆ adapt_domain() [2/2]

template<typename T>
VArray< T > blender::bke::CurvesGeometry::adapt_domain ( const VArray< T > & varray,
AttrDomain from,
AttrDomain to ) const
inline

Definition at line 491 of file BKE_curves.hh.

References adapt_domain(), T, and blender::GVArray::typed().

◆ attributes()

AttributeAccessor CurvesGeometry::attributes ( ) const

Definition at line 1865 of file curves_geometry.cc.

References blender::bke::curves::get_attribute_accessor_functions().

Referenced by blender::ed::greasepencil::apply_color_operation_for_mode(), attr_create_generic(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), BKE_grease_pencil_material_index_used(), blender::build_concurrent(), blender::bke::build_mesh_positions(), blender::ed::spreadsheet::GreasePencilLayerCurvesDomainViewItem::build_row(), blender::build_sequential(), blender::bke::compare_geometry::compare_curves(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_and_reorder_curves(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::ed::curves::copy_data_to_geometry(), blender::bke::curves::copy_only_curve_domain(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::ed::greasepencil::create_curves_outline(), blender::create_dashes(), blender::draw::create_edit_points_data(), blender::create_envelope_strokes(), blender::draw::curve_create_attribute(), blender::bke::curve_to_mesh_sweep(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::nodes::node_geo_curve_to_points_cc::curves_to_points(), blender::deform_drawing_as_envelope(), blender::draw::DRW_curves_batch_cache_create_requested(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::draw::CurvesEvalCache::ensure_attributes(), blender::draw::ensure_control_point_attribute(), evaluated_normals(), export_hair_curves(), export_hair_curves_motion(), blender::geometry::extend_curves(), blender::geometry::extract_curves(), blender::geometry::extract_curves_points(), blender::geometry::extract_greasepencil_layer_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::geometry::gather_curve_attributes_to_interpolate(), blender::geometry::gather_point_attributes_to_interpolate(), blender::geometry::gather_point_attributes_to_interpolate(), blender::ed::greasepencil::get_boundary_bounds(), blender::get_factor_from_draw_speed(), blender::modifier::greasepencil::get_filtered_stroke_mask(), blender::modifier::greasepencil::get_influence_vertex_weights(), blender::ed::sculpt_paint::greasepencil::get_single_stroke(), blender::bke::AttributeExistsFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput::get_varray_for_context(), blender::nodes::node_geo_material_selection_cc::MaterialSelectionFieldInput::get_varray_for_context(), blender::ed::greasepencil::get_visible_boundary_strokes(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_copy_strokes_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), blender::geometry::initialize_curves_builtin_attribute_defaults(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::geometry::join_curves_ranges(), material_index_max(), blender::modify_curves(), blender::modify_fill_color(), blender::modify_stroke_color(), blender::modify_stroke_color(), blender::nodes::node_geo_curve_set_handle_type_cc::node_geo_exec(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::nodes::node_geo_instance_on_points_cc::node_geo_exec(), blender::nodes::node_geo_set_curve_handles_cc::node_geo_exec(), blender::nodes::node_geo_set_grease_pencil_color_cc::node_geo_exec(), blender::draw::overlay::AttributeTexts::object_sync(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_done(), blender::geometry::preprocess_curves(), remove_attributes_based_on_types(), blender::geometry::remove_points_and_split(), blender::ed::greasepencil::render_strokes(), blender::geometry::reorder_and_flip_curves(), blender::reorder_cyclic_curve_points(), blender::draw::request_attribute(), blender::geometry::retrieve_attribute_spans(), blender::geometry::retrieve_attribute_spans(), reverse_curves(), blender::geometry::separate_curves_selection(), blender::ed::curves::set_attribute_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), stats_object_edit(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), transform(), blender::geometry::trim_curves(), view3d_lasso_select(), and blender::io::hydra::CurvesData::write_curves().

◆ attributes_for_write()

MutableAttributeAccessor CurvesGeometry::attributes_for_write ( )

Definition at line 1870 of file curves_geometry.cc.

References blender::bke::curves::get_attribute_accessor_functions().

Referenced by blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::nodes::ForeachElementComponent::attributes_for_write(), BKE_grease_pencil_material_index_remove(), BKE_grease_pencil_material_remap(), blender::build_concurrent(), blender::build_sequential(), blender::geometry::calc_radius_with_interpolation(), blender::ed::greasepencil::clipboard_paste_strokes_ex(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_and_reorder_curves(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::ed::curves::copy_data_to_geometry(), blender::bke::curves::copy_only_curve_domain(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::create_array_copies(), blender::geometry::create_curve_from_vert_indices(), blender::create_dashes(), blender::create_envelope_strokes(), blender::nodes::node_geo_points_to_curves_cc::curve_from_points(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curves_copy_curve_selection(), blender::nodes::node_geo_points_to_curves_cc::curves_from_points(), CurvesGeometry(), blender::deform_drawing(), blender::deform_drawing(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::geometry::execute_realize_curve_tasks(), blender::geometry::execute_realize_grease_pencil_task(), blender::geometry::extend_curves(), blender::geometry::extract_greasepencil_layer_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), blender::geometry::fillet_curves(), blender::geometry::gather_point_attributes_to_interpolate(), blender::generate_curves(), blender::ed::sculpt_paint::greasepencil::get_single_stroke(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::geometry::join_curves_ranges(), blender::ed::object::mesh_data_to_grease_pencil(), blender::geometry::mesh_faces_to_curves_convert(), MOD_lineart_gpencil_generate_v3(), blender::modify_fill_color(), blender::modify_fill_color(), blender::modify_opacity(), blender::modify_softness(), blender::modify_stroke_by_index(), blender::modify_stroke_by_layer(), blender::modify_stroke_by_material(), blender::modify_stroke_color(), blender::modify_stroke_random(), blender::nodes::node_geo_set_grease_pencil_color_cc::node_geo_exec(), blender::nodes::node_geo_set_grease_pencil_softness_cc::node_geo_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_done(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::bke::bake::prepare_geometry_for_bake_recursive(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::usd::USDCurvesReader::read_custom_data(), blender::io::usd::USDCurvesReader::read_velocities(), remove_attributes_based_on_types(), blender::geometry::remove_points_and_split(), blender::geometry::reorder_and_flip_curves(), blender::reorder_cyclic_curve_points(), blender::ed::curves::resize_curves(), blender::geometry::retrieve_attribute_spans(), blender::geometry::retrieve_attribute_spans(), reverse_curves(), blender::ed::curves::separate_points(), blender::nodes::node_geo_set_spline_cyclic_cc::set_curve_cyclic(), blender::nodes::node_geo_set_curve_normal_cc::set_curve_normal(), blender::nodes::node_geo_set_spline_resolution_cc::set_curve_resolution(), blender::nodes::node_geo_set_curve_tilt_cc::set_curve_tilt(), blender::nodes::node_geo_set_position_cc::set_curves_position(), blender::nodes::node_geo_set_material_index_cc::set_material_index_in_grease_pencil(), blender::nodes::node_geo_set_curve_radius_cc::set_radius(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::geometry::smooth_curve_positions(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::nodes::node_geo_interpolate_curves_cc::store_output_attributes(), blender::geometry::subdivide_curves(), transform(), blender::geometry::trim_curves(), blender::write_stroke_transforms(), and blender::write_weights_for_drawing().

◆ bezier_evaluated_offsets_for_curve()

Span< int > CurvesGeometry::bezier_evaluated_offsets_for_curve ( int curve_index) const
inline

Retrieve offsets into a Bezier curve's evaluated points for each control point. Stored in the same format as OffsetIndices. Call evaluated_points_by_curve() first to ensure that the evaluated offsets cache is current.

Definition at line 1051 of file BKE_curves.hh.

References offsets(), blender::bke::curves::per_curve_point_offsets_range(), points_by_curve(), and CurvesGeometry::runtime.

Referenced by blender::geometry::lookup_point_bezier(), blender::geometry::sample_curve_attribute(), and blender::bke::write_sharp_bezier_edges().

◆ blend_read()

◆ blend_write()

◆ blend_write_prepare()

void CurvesGeometry::blend_write_prepare ( BlendWriteData & write_data)

◆ bounds_min_max()

◆ calculate_bezier_auto_handles()

◆ count_memory()

◆ curve_type_counts()

◆ curve_types()

VArray< int8_t > CurvesGeometry::curve_types ( ) const

The type (CurveType) of each curve, or potentially a single if all are the same type.

Definition at line 229 of file curves_geometry.cc.

References blender::bke::ATTR_CURVE_TYPE, CurvesGeometry::attribute_storage, blender::bke::Curve, CURVE_TYPE_CATMULL_ROM, and blender::bke::get_varray_attribute().

Referenced by apply_to_curves_point_selection(), calculate_bezier_auto_handles(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::geometry::compute_curve_trim_parameters(), blender::nodes::node_geo_input_tangent_cc::construct_curve_tangent_gvarray(), blender::geometry::convert_bezier_or_catmull_rom_to_poly_before_conversion_to_nurbs(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), curve_type_counts(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), blender::draw::DRW_curves_batch_cache_create_requested(), blender::draw::CurvesEvalCache::ensure_common(), evaluated_normals(), evaluated_positions(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), indices_for_curve_type(), init_curves_point_selection_status(), init_curves_selection_status(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves_with_samples(), interpolate_to_evaluated(), interpolate_to_evaluated(), nurbs_custom_knot_curves(), nurbs_custom_knots_by_curve(), blender::geometry::resample_to_uniform(), blender::geometry::sample_curve_attribute(), blender::geometry::sample_curve_positions_and_handles(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), blender::geometry::subdivide_curves(), blender::geometry::trim_curves(), update_curve_types(), and blender::bke::write_sharp_bezier_edges().

◆ curve_types_for_write()

MutableSpan< int8_t > CurvesGeometry::curve_types_for_write ( )

◆ curves_num()

int CurvesGeometry::curves_num ( ) const
inline

The number of curves in the data-block.

Definition at line 986 of file BKE_curves.hh.

References CurvesGeometry::curve_num.

Referenced by blender::nodes::node_geo_curve_spline_parameter_cc::accumulated_lengths_curve_domain(), blender::geometry::add_curves_on_mesh(), blender::ed::curves::append_primitive_curve(), blender::build_drawing(), blender::build_sequential(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_curve_parameters(), blender::bke::calculate_result_offsets(), blender::ed::greasepencil::clipboard_paste_strokes_ex(), blender::bke::compare_geometry::compare_curves(), blender::ed::greasepencil::compute_topology_change(), blender::nodes::node_geo_input_spline_length_cc::construct_curve_point_count_gvarray(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::bke::curves::nurbs::copy_custom_knots(), blender::bke::curves::copy_only_curve_domain(), blender::geometry::create_curves_for_faces(), blender::create_envelope_strokes(), blender::nodes::node_geo_curve_sample_cc::curve_accumulated_lengths(), blender::draw::curve_eval_render_wire_verts_edges_len_get(), blender::nodes::node_geo_curve_fill_cc::curve_fill_calculate(), blender::bke::curves_copy_curve_selection(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::curves_merge_endpoints(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), curves_range(), blender::draw::curves_sub_pass_setup_implementation(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curves_to_grease_pencil_with_one_layer(), blender::nodes::node_geo_deform_curves_on_surface_cc::deform_curves(), blender::deform_drawing(), blender::nodes::node_geo_curve_fill_cc::do_group_aware_cdt(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::duplicate_strokes(), blender::draw::ensure_control_point_attribute(), ensure_evaluated_lengths(), blender::draw::CurvesEvalCache::ensure_positions(), evaluated_points_by_curve(), blender::geometry::execute_realize_curve_task(), blender::geometry::extend_curves(), blender::io::grease_pencil::extend_curves_geometry(), blender::ed::curves::extrude_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), blender::geometry::fillet_curves(), blender::ed::sculpt_paint::greasepencil::find_curve_mapping_from_index(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::get_factor_from_draw_speed(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::nodes::node_geo_material_selection_cc::MaterialSelectionFieldInput::get_varray_for_context(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_copy_strokes_exec(), handle_curves_knot_mode(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves_with_samples(), is_single_type(), blender::modify_drawing(), blender::modify_fill_color(), blender::modify_stroke_by_index(), blender::nodes::node_geo_curve_sample_cc::node_geo_exec(), blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::nodes::node_geo_interpolate_curves_cc::parameterize_guide_curves(), blender::point_counts_to_keep_concurrent(), blender::points_info_sequential(), blender::geometry::reorder_curves_geometry(), blender::reorder_cyclic_curve_points(), blender::reorder_strokes(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), resize(), blender::ed::curves::resize_curves(), blender::nodes::node_geo_curve_reverse_cc::reverse_curve(), blender::nodes::node_geo_set_curve_normal_cc::set_curve_normal(), blender::simplify_drawing(), stats_object(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::trim_curves(), blender::nodes::node_geo_curve_trim_cc::trim_curves(), blender::io::hydra::CurvesData::write_curves(), and blender::write_stroke_transforms().

◆ curves_range()

IndexRange CurvesGeometry::curves_range ( ) const
inline

Definition at line 1004 of file BKE_curves.hh.

References curves_num().

Referenced by blender::nodes::node_geo_curve_spline_parameter_cc::accumulated_lengths_curve_domain(), blender::geometry::add_curves_on_mesh(), apply_to_curves_point_selection(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), blender::nodes::node_geo_blur_attribute_cc::blur_on_curve_exec(), blender::build_concurrent(), blender::build_sequential(), calculate_bezier_auto_handles(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::ed::greasepencil::compute_topology_change(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::create_envelope_strokes(), blender::nodes::node_geo_curve_sample_cc::curve_accumulated_lengths(), blender::draw::curve_create_curves_lines(), blender::draw::curve_eval_render_wire_verts_edges_len_get(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::curves_merge_endpoints(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curves_to_grease_pencil_with_one_layer(), blender::nodes::node_geo_curve_length_cc::curves_total_length(), blender::nodes::node_geo_deform_curves_on_surface_cc::deform_curves(), blender::deform_drawing(), blender::io::alembic::ABCCurveWriter::do_write(), blender::draw::DRW_curves_batch_cache_create_requested(), ensure_evaluated_lengths(), evaluated_normals(), evaluated_positions(), evaluated_tangents(), blender::geometry::execute_realize_curve_task(), blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects(), blender::geometry::extend_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::nodes::node_geo_curve_fillet_cc::fillet_curve(), blender::geometry::fillet_curves(), blender::geometry::find_connected_ranges(), blender::ed::sculpt_paint::greasepencil::find_curve_mapping_from_index(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::generate_curves(), blender::get_factor_from_draw_speed(), blender::modifier::greasepencil::get_filtered_stroke_mask(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::get_varray_for_context(), blender::ed::greasepencil::get_visible_boundary_strokes(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::ed::greasepencil::grease_pencil_primitive_exit(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), has_cyclic_curve(), indices_for_curve_type(), init_curves_point_selection_status(), init_curves_selection_status(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth(), interpolate_to_evaluated(), blender::modify_drawing(), blender::modify_drawing(), nurbs_custom_knot_curves(), nurbs_custom_knots_by_curve(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::nodes::node_geo_interpolate_curves_cc::parameterize_guide_curves(), blender::point_counts_to_keep_concurrent(), blender::points_info_sequential(), blender::io::usd::populate_curve_props_for_nurbs(), blender::io::usd::populate_curve_verts(), blender::io::usd::populate_curve_verts_for_bezier(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), remove_curves(), blender::geometry::remove_points_and_split(), blender::reorder_strokes(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::ed::greasepencil::retrieve_visible_strokes(), blender::geometry::sample_curve_padded(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::nodes::node_geo_interpolate_curves_cc::store_output_attributes(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_curves(), blender::subdivide_drawing(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_grease_pencil_curves(), blender::ed::greasepencil::trim::trim_curve_segments(), blender::geometry::trim_curves(), and blender::io::hydra::CurvesData::write_curves().

◆ cyclic()

VArray< bool > CurvesGeometry::cyclic ( ) const

Whether the curve loops around to connect to itself, on the curve domain.

Definition at line 353 of file curves_geometry.cc.

References blender::bke::ATTR_CYCLIC, CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_varray_attribute().

Referenced by blender::nodes::node_geo_curve_spline_parameter_cc::accumulated_lengths_curve_domain(), blender::nodes::node_geo_blur_attribute_cc::blur_on_curve_exec(), calculate_bezier_auto_handles(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_curve_parameters(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::geometry::compute_curve_trim_parameters(), blender::ed::greasepencil::compute_topology_change(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::create_dashes(), blender::nodes::node_geo_curve_sample_cc::curve_accumulated_lengths(), blender::draw::curve_create_curves_lines(), blender::draw::curve_eval_render_wire_verts_edges_len_get(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::curves_merge_endpoints(), blender::nodes::node_geo_curve_length_cc::curves_total_length(), blender::deform_drawing(), blender::deform_drawing(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), blender::draw::DRW_curves_batch_cache_create_requested(), blender::draw::CurvesEvalCache::ensure_common(), ensure_evaluated_lengths(), evaluated_length_total_for_curve(), evaluated_lengths_for_curve(), evaluated_normals(), evaluated_positions(), evaluated_tangents(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::nodes::node_geo_offset_point_in_curve_cc::ControlPointNeighborFieldInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::OffsetValidFieldInput::get_varray_for_context(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), has_cyclic_curve(), init_curves_selection_status(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::geometry::interpolate_curves(), blender::modify_drawing(), blender::point_counts_to_keep_concurrent(), blender::geometry::remove_points_and_split(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::io::obj::OBJCurvesTest::run_nurbs_test(), blender::geometry::sample_curve_positions_and_handles(), blender::simplify_drawing(), blender::geometry::smooth_curve_positions(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), blender::bke::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::trim_catmull_rom_curves(), blender::ed::greasepencil::trim::trim_curve_segments(), update_custom_knots(), and blender::write_stroke_transforms().

◆ cyclic_for_write()

MutableSpan< bool > CurvesGeometry::cyclic_for_write ( )

Mutable access to curve cyclic values. Call tag_topology_changed after changes.

Definition at line 358 of file curves_geometry.cc.

References blender::bke::ATTR_CYCLIC, CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_mutable_attribute().

Referenced by blender::ed::curves::copy_data_to_geometry(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_radius(), blender::geometry::create_curve_from_vert_indices(), blender::io::obj::OBJCurvesTest::create_curves(), blender::geometry::create_curves_for_faces(), blender::nodes::node_geo_curve_primitive_circle_cc::create_point_circle_curve(), blender::nodes::node_geo_curve_primitive_circle_cc::create_radius_circle_curve(), blender::nodes::node_geo_curve_primitive_star_cc::create_star_curve(), blender::geometry::curves_merge_endpoints(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), handle_curves_cyclic(), blender::ed::object::mesh_data_to_grease_pencil(), blender::ed::space_node::node_draw_zones_and_frames(), blender::nodes::node_geo_curve_primitive_quadrilateral_cc::node_geo_exec(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::geometry::remove_points_and_split(), and blender::io::grease_pencil::shape_attributes_to_curves().

◆ deform_verts()

Span< MDeformVert > CurvesGeometry::deform_verts ( ) const

Vertex group data, encoded as an array of indices and weights for every vertex.

Warning
: May be empty.

Definition at line 604 of file curves_geometry.cc.

References CD_MDEFORMVERT, CustomData_get_layer(), CurvesGeometry::point_data, and CurvesGeometry::point_num.

Referenced by blender::modify_curves(), and blender::modify_drawing().

◆ deform_verts_for_write()

◆ ensure_can_interpolate_to_evaluated()

◆ ensure_evaluated_lengths()

◆ evaluated_length_total_for_curve()

◆ evaluated_lengths_for_curve()

Span< float > CurvesGeometry::evaluated_lengths_for_curve ( int curve_index,
bool cyclic ) const
inline

Return a cache of accumulated lengths along the curve. Each item is the length of the subsequent segment (the first value is the length of the first segment rather than 0). This calculation is rather trivial, and only depends on the evaluated positions, but the results are used often, and it is necessarily single threaded per curve, so it is cached.

Parameters
cyclicThis argument is redundant with the data stored for the curve, but is passed for performance reasons to avoid looking up the attribute.

Definition at line 1069 of file BKE_curves.hh.

References cyclic(), and CurvesGeometry::runtime.

Referenced by blender::geometry::compute_curve_trim_parameters(), evaluated_length_total_for_curve(), blender::geometry::resample_to_uniform(), blender::geometry::sample_curve_uniform(), and blender::write_stroke_transforms().

◆ evaluated_normals()

◆ evaluated_points_by_curve()

OffsetIndices< int > CurvesGeometry::evaluated_points_by_curve ( ) const

The offsets of every curve's evaluated points.

Definition at line 698 of file curves_geometry.cc.

References blender::bke::CurvesGeometryRuntime::EvaluatedOffsets::all_bezier_offsets, blender::bke::calculate_evaluated_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_shrink(), CURVE_TYPE_BEZIER, CURVE_TYPE_POLY, curves_num(), blender::bke::CurvesGeometryRuntime::EvaluatedOffsets::evaluated_offsets, has_curve_with_type(), is_single_type(), points_by_curve(), points_num(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and CurvesGeometry::runtime.

Referenced by blender::bke::calculate_result_offsets(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::geometry::compute_curve_trim_parameters(), blender::draw::curve_create_curves_lines(), blender::draw::curve_eval_render_wire_verts_edges_len_get(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::nodes::node_geo_curve_fill_cc::do_cdt(), blender::nodes::node_geo_curve_fill_cc::do_cdt_with_mask(), blender::draw::DRW_curves_batch_cache_create_requested(), blender::draw::CurvesEvalCache::ensure_common(), ensure_evaluated_lengths(), evaluated_normals(), evaluated_points_num(), evaluated_positions(), evaluated_tangents(), blender::bke::foreach_curve_combination(), interpolate_to_evaluated(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::geometry::sample_curve_attribute(), and blender::geometry::trim_evaluated_curves().

◆ evaluated_points_num()

int CurvesGeometry::evaluated_points_num ( ) const
inline

The total number of points in the evaluated poly curve. This can depend on the resolution attribute if it exists.

Definition at line 1045 of file BKE_curves.hh.

References evaluated_points_by_curve(), and blender::offset_indices::OffsetIndices< T >::total_size().

Referenced by bounds_min_max(), blender::draw::curves_sub_pass_setup_implementation(), ensure_evaluated_lengths(), evaluated_normals(), evaluated_positions(), and evaluated_tangents().

◆ evaluated_positions()

Span< float3 > CurvesGeometry::evaluated_positions ( ) const

Definition at line 818 of file curves_geometry.cc.

References blender::bke::curves::bezier::calculate_evaluated_positions(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_shrink(), blender::array_utils::copy_group_to_group(), curve_type_counts(), CURVE_TYPE_POLY, curve_types(), curves_range(), cyclic(), evaluated_points_by_curve(), evaluated_points_num(), evaluated_positions(), blender::bke::curves::fill_points(), blender::bke::curves::foreach_curve_by_type(), handle_positions_left(), handle_positions_right(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated(), is_single_type(), nurbs_orders(), nurbs_weights(), offsets(), blender::bke::curves::per_curve_point_offsets_range(), points_by_curve(), positions(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), resolution(), CurvesGeometry::runtime, and blender::Span< T >::slice().

Referenced by bounds_min_max(), blender::bke::build_mesh_positions(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::draw::create_edit_points_position_vbo(), blender::draw::curve_create_curves_pos(), blender::nodes::node_geo_curve_fill_cc::do_cdt(), blender::nodes::node_geo_curve_fill_cc::do_cdt_with_mask(), ensure_evaluated_lengths(), evaluated_positions(), evaluated_tangents(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::geometry::trim_curves(), and blender::geometry::trim_evaluated_curves().

◆ evaluated_tangents()

◆ fill_curve_types() [1/2]

void CurvesGeometry::fill_curve_types ( const IndexMask & selection,
CurveType type )

◆ fill_curve_types() [2/2]

◆ handle_positions_left()

◆ handle_positions_left_for_write()

◆ handle_positions_right()

◆ handle_positions_right_for_write()

◆ handle_types_left()

◆ handle_types_left_for_write()

◆ handle_types_right()

◆ handle_types_right_for_write()

◆ has_curve_with_type() [1/2]

◆ has_curve_with_type() [2/2]

bool CurvesGeometry::has_curve_with_type ( Span< CurveType > types) const
inline

Definition at line 1019 of file BKE_curves.hh.

References types.

◆ has_cyclic_curve()

bool CurvesGeometry::has_cyclic_curve ( ) const

◆ indices_for_curve_type() [1/2]

IndexMask CurvesGeometry::indices_for_curve_type ( CurveType type,
const IndexMask & selection,
IndexMaskMemory & memory ) const

◆ indices_for_curve_type() [2/2]

IndexMask CurvesGeometry::indices_for_curve_type ( CurveType type,
IndexMaskMemory & memory ) const

◆ interpolate_to_evaluated() [1/2]

void CurvesGeometry::interpolate_to_evaluated ( GSpan src,
GMutableSpan dst ) const

◆ interpolate_to_evaluated() [2/2]

void CurvesGeometry::interpolate_to_evaluated ( int curve_index,
GSpan src,
GMutableSpan dst ) const

Evaluate a generic data to the standard evaluated points of a specific curve, defined by the resolution attribute or other factors, depending on the curve type.

Warning
This function expects offsets to the evaluated points for each curve to be calculated. That can be ensured with ensure_can_interpolate_to_evaluated.

Definition at line 1113 of file curves_geometry.cc.

References BLI_assert, curve_types(), blender::bke::evaluate_generic_data_for_curve(), nurbs_orders(), nurbs_weights(), resolution(), CurvesGeometry::runtime, blender::GMutableSpan::size(), and blender::GSpan::size().

Referenced by bounds_min_max(), blender::draw::curve_create_attribute(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), and blender::geometry::sample_curve_attribute().

◆ is_empty()

bool CurvesGeometry::is_empty ( ) const
inline

Return true if there are no curves in the geometry.

Definition at line 994 of file BKE_curves.hh.

References BLI_assert, CurvesGeometry::curve_num, and CurvesGeometry::point_num.

Referenced by apply_to_curves_point_selection(), bounds_min_max(), blender::build_drawing(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::ed::curves::copy_data_to_geometry(), blender::nodes::node_geo_curve_fill_cc::curve_fill_calculate(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::deform_drawing(), blender::deform_drawing(), blender::deform_drawing(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::draw::CurvesEvalCache::ensure_positions(), blender::geometry::fillet_curves(), blender::nodes::node_geo_curve_fillet_cc::fillet_grease_pencil(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), init_curves_point_selection_status(), init_curves_selection_status(), blender::geometry::interpolate_curves_with_samples(), blender::ed::greasepencil::join_curves(), blender::geometry::join_curves(), blender::nodes::node_geo_curve_sample_cc::node_geo_exec(), blender::nodes::node_geo_instance_on_points_cc::node_geo_exec(), blender::nodes::LazyFunctionForForeachGeometryElementZone::prepare_components(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::nodes::node_geo_set_position_cc::set_position_in_grease_pencil(), blender::geometry::subdivide_curves(), blender::bke::tests::TEST(), blender::nodes::node_geo_curve_trim_cc::trim_curves(), blender::ed::sculpt_paint::greasepencil::trim_stroke_ends(), and blender::write_weights_for_drawing().

◆ is_single_type()

bool CurvesGeometry::is_single_type ( CurveType type) const
inline

◆ material_index_max()

std::optional< int > CurvesGeometry::material_index_max ( ) const

Get the largest material index used by the geometry or nullopt if there are none. The returned value is clamped between 0 and MAXMAT even if the stored material indices may be out of that range.

Definition at line 1369 of file curves_geometry.cc.

References attributes(), blender::bke::Curve, blender::SharedCache< T >::data(), blender::SharedCache< T >::ensure(), blender::bounds::max(), blender::bke::CurvesGeometryRuntime::max_material_index_cache, and MAXMAT.

◆ normal_mode()

VArray< int8_t > CurvesGeometry::normal_mode ( ) const

Which method to use for calculating the normals of evaluated points (NormalMode). Call tag_normals_changed after changes.

Definition at line 375 of file curves_geometry.cc.

References blender::bke::ATTR_NORMAL_MODE, CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_varray_attribute().

Referenced by evaluated_normals().

◆ normal_mode_for_write()

◆ nurbs_custom_knot_curves()

IndexMask CurvesGeometry::nurbs_custom_knot_curves ( IndexMaskMemory & memory) const

◆ nurbs_custom_knots()

◆ nurbs_custom_knots_by_curve()

◆ nurbs_custom_knots_for_write()

◆ nurbs_custom_knots_resize()

void CurvesGeometry::nurbs_custom_knots_resize ( int knots_num)

Resizes custom knots array. Used when knots number is known in advance and knot values are set together with topological data.

Definition at line 594 of file curves_geometry.cc.

References CurvesGeometry::custom_knot_num, CurvesGeometry::custom_knots, blender::implicit_sharing::resize_trivial_array(), and CurvesGeometry::runtime.

Referenced by blender::geometry::execute_realize_curve_tasks().

◆ nurbs_custom_knots_update_size()

◆ nurbs_has_custom_knots()

◆ nurbs_knots_modes()

◆ nurbs_knots_modes_for_write()

◆ nurbs_orders()

◆ nurbs_orders_for_write()

◆ nurbs_weights()

◆ nurbs_weights_for_write()

◆ offsets()

Span< int > CurvesGeometry::offsets ( ) const

The index of the first point in every curve. The size of this span is one larger than the number of curves, but the spans will be empty if there are no curves/points.

Consider using points_by_curve rather than these offsets directly.

Definition at line 336 of file curves_geometry.cc.

References CurvesGeometry::curve_num, and CurvesGeometry::curve_offsets.

Referenced by blender::geometry::add_curves_on_mesh(), bezier_evaluated_offsets_for_curve(), blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions(), blender::bke::compare_geometry::compare_curves(), blender::geometry::copy_and_reorder_curves(), blender::geometry::create_curves_for_faces(), blender::create_envelope_strokes(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::io::alembic::curves_topology_changed(), blender::io::usd::curves_topology_changed(), evaluated_positions(), blender::geometry::execute_realize_curve_task(), blender::io::grease_pencil::extend_curves_geometry(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::geometry::reorder_and_flip_curves(), blender::ed::curves::resize_curves(), blender::geometry::subdivide_curves(), blender::bke::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), and blender::geometry::trim_curves().

◆ offsets_for_write()

MutableSpan< int > CurvesGeometry::offsets_for_write ( )

Definition at line 343 of file curves_geometry.cc.

References CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, blender::implicit_sharing::make_trivial_data_mutable(), and CurvesGeometry::runtime.

Referenced by blender::geometry::add_curves_on_mesh(), blender::build_concurrent(), blender::build_sequential(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_and_reorder_curves(), blender::ed::curves::copy_data_to_geometry(), blender::geometry::create_curve_from_vert_indices(), blender::io::obj::OBJCurvesTest::create_curves(), blender::geometry::create_curves_for_faces(), blender::create_dashes(), blender::create_envelope_strokes(), blender::bke::curves_copy_curve_selection(), blender::nodes::node_geo_points_to_curves_cc::curves_from_points(), blender::ed::greasepencil::curves_merge_by_distance(), CurvesGeometry(), blender::geometry::debug_randomize_curve_order(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::geometry::execute_realize_curve_task(), blender::geometry::execute_realize_curve_tasks(), blender::geometry::extend_curves(), blender::io::grease_pencil::extend_curves_geometry(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::extrude_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::nodes::node_geo_interpolate_curves_cc::generate_interpolated_curves(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::geometry::join_curves_ranges(), blender::ed::object::mesh_data_to_grease_pencil(), MOD_lineart_gpencil_generate_v3(), blender::ed::space_node::node_draw_zones_and_frames(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::geometry::remove_points_and_split(), blender::geometry::reorder_and_flip_curves(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::geometry::subdivide_curves(), and blender::geometry::trim_curves().

◆ operator=() [1/2]

CurvesGeometry & CurvesGeometry::operator= ( const CurvesGeometry & other)

Definition at line 153 of file curves_geometry.cc.

References CurvesGeometry().

◆ operator=() [2/2]

CurvesGeometry & CurvesGeometry::operator= ( CurvesGeometry && other)

Definition at line 199 of file curves_geometry.cc.

References CurvesGeometry().

◆ point_to_curve_map()

◆ points_by_curve()

OffsetIndices< int > CurvesGeometry::points_by_curve ( ) const
inline

The offsets of every curve into arrays on the points domain.

Definition at line 1039 of file BKE_curves.hh.

References CurvesGeometry::curve_num, and CurvesGeometry::curve_offsets.

Referenced by blender::geometry::add_curves_on_mesh(), blender::ed::curves::append_point_knots(), apply_to_curves_point_selection(), bezier_evaluated_offsets_for_curve(), blender::nodes::node_geo_blur_attribute_cc::blur_on_curve_exec(), blender::build_concurrent(), blender::build_sequential(), blender::geometry::calc_position_with_interpolation(), blender::geometry::calc_position_without_interpolation(), blender::geometry::calc_radius_with_interpolation(), calculate_bezier_auto_handles(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::geometry::calculate_result_offsets(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::geometry::compute_curve_trim_parameters(), blender::nodes::node_geo_interpolate_curves_cc::compute_point_counts_per_child(), blender::nodes::node_geo_interpolate_curves_cc::compute_points_per_curve_by_group(), blender::ed::greasepencil::compute_topology_change(), blender::nodes::node_geo_input_spline_length_cc::construct_curve_point_count_gvarray(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::geometry::copy_or_defaults_for_unselected_curves(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::create_dashes(), blender::create_envelope_strokes(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::ed::greasepencil::curves_merge_by_distance(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::geometry::debug_randomize_curve_order(), blender::nodes::node_geo_deform_curves_on_surface_cc::deform_curves(), blender::deform_drawing(), blender::deform_drawing(), blender::deform_drawing_as_envelope(), blender::ed::sculpt_paint::greasepencil::deselect_stroke(), blender::io::alembic::ABCCurveWriter::do_write(), blender::draw::DRW_curves_batch_cache_create_requested(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::draw::CurvesEvalCache::ensure_common(), evaluated_normals(), evaluated_points_by_curve(), evaluated_positions(), evaluated_tangents(), blender::ed::greasepencil::execute_trim_on_drawing(), blender::ed::greasepencil::trim::expand_trim_segment_direction(), export_hair_curves(), export_hair_curves_motion(), blender::geometry::extend_curves(), blender::geometry::extract_curves(), blender::geometry::extract_greasepencil_layer_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fill_bezier_data(), blender::geometry::fill_nurbs_data(), blender::geometry::fillet_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::generate_curves(), blender::ed::greasepencil::get_boundary_bounds(), blender::get_factor_from_draw_speed(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::ed::sculpt_paint::greasepencil::get_single_stroke(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::ControlPointNeighborFieldInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::OffsetValidFieldInput::get_varray_for_context(), blender::ed::greasepencil::get_visible_boundary_strokes(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), init_curves_point_selection_status(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::geometry::interpolate_curves(), blender::geometry::interpolate_curves_with_samples(), blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth(), interpolate_to_evaluated(), blender::geometry::join_curves_ranges(), blender::geometry::mesh_faces_to_curves_convert(), blender::modify_curves(), blender::modify_curves(), blender::modify_drawing(), blender::modify_drawing(), blender::modify_fill_color(), blender::modify_fill_color(), blender::modify_opacity(), blender::modify_stroke_by_index(), blender::modify_stroke_by_layer(), blender::modify_stroke_by_material(), blender::modify_stroke_color(), blender::modify_stroke_color(), blender::modify_stroke_color(), blender::modify_stroke_random(), nurbs_custom_knots_by_curve(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::nodes::node_geo_interpolate_curves_cc::parameterize_guide_curves(), blender::point_counts_to_keep_concurrent(), point_to_curve_map(), blender::points_info_sequential(), blender::io::usd::populate_curve_props_for_nurbs(), blender::io::usd::populate_curve_verts(), blender::io::usd::populate_curve_verts_for_bezier(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::geometry::remove_points_and_split(), blender::reorder_cyclic_curve_points(), blender::reorder_strokes(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::geometry::sample_curve_attribute(), blender::geometry::sample_curve_padded(), blender::geometry::sample_curve_positions_and_handles(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), blender::ed::curves::select_linked_pick(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::simplify_drawing(), blender::simplify_fixed(), blender::geometry::smooth_curve_positions(), blender::ed::sculpt_paint::greasepencil::smooth_stroke(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::geometry::trim_attribute_linear(), blender::geometry::trim_bezier_curves(), blender::geometry::trim_catmull_rom_curves(), blender::ed::greasepencil::trim::trim_curve_segments(), blender::geometry::trim_curves(), blender::ed::sculpt_paint::greasepencil::trim_end_points(), blender::geometry::trim_evaluated_curves(), blender::geometry::trim_polygonal_curves(), update_custom_knots(), blender::io::hydra::CurvesData::write_curves(), blender::write_fill_transforms(), blender::bke::write_sharp_bezier_edges(), blender::write_stroke_transforms(), and blender::write_weights_for_drawing().

◆ points_num()

int CurvesGeometry::points_num ( ) const
inline

The total number of control points in all curves.

Definition at line 982 of file BKE_curves.hh.

References CurvesGeometry::point_num.

Referenced by blender::geometry::add_curves_on_mesh(), blender::ed::curves::append_primitive_curve(), blend_write_prepare(), blender::bke::build_mesh_positions(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::bke::compare_geometry::compare_curves(), blender::create_envelope_strokes(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::nodes::node_geo_curve_to_mesh_cc::curve_to_mesh(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::ed::greasepencil::curves_merge_by_distance(), blender::nodes::node_geo_curve_to_points_cc::curves_to_points(), blender::deform_drawing(), blender::io::alembic::ABCCurveWriter::do_write(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::duplicate_strokes(), blender::draw::ensure_control_point_attribute(), evaluated_points_by_curve(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::geometry::execute_realize_curve_task(), blender::ed::greasepencil::execute_trim_on_drawing(), blender::geometry::extend_curves(), blender::io::grease_pencil::extend_curves_geometry(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::nodes::node_geo_curve_fillet_cc::fillet_curve(), blender::geometry::fillet_curves(), blender::geometry::fillet_curves_bezier(), blender::geometry::fit_poly_to_bezier_curves(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::get_factor_from_draw_speed(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::ControlPointNeighborFieldInput::get_varray_for_context(), blender::ed::greasepencil::grease_pencil_copy_strokes_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves(), blender::geometry::interpolate_curves_with_samples(), blender::geometry::join_curves_ranges(), blender::modify_curves(), blender::modify_drawing(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), point_to_curve_map(), points_range(), blender::bke::remember_deformed_grease_pencil_if_necessary(), blender::geometry::remove_points_and_split(), blender::geometry::reorder_curves_geometry(), blender::reorder_cyclic_curve_points(), blender::geometry::resample_to_uniform(), resize(), blender::ed::greasepencil::select_random_exec(), blender::nodes::node_geo_curve_set_handle_type_cc::set_handle_type(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::simplify_drawing(), blender::ed::sculpt_paint::greasepencil::simplify_stroke(), blender::geometry::smooth_curve_positions(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), stats_object(), stats_object_edit(), stats_object_sculpt(), blender::geometry::subdivide_curves(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_curves(), blender::subdivide_drawing(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_grease_pencil_curves(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::transform_grease_pencil_edit_hints(), blender::ed::greasepencil::trim::trim_curve_segments(), and blender::io::hydra::CurvesData::write_curves().

◆ points_range()

◆ positions()

Span< float3 > CurvesGeometry::positions ( ) const

Definition at line 314 of file curves_geometry.cc.

References blender::bke::ATTR_POSITION, CurvesGeometry::attribute_storage, blender::bke::get_span_attribute(), and blender::bke::Point.

Referenced by blender::geometry::add_curves_on_mesh(), bounds_min_max(), blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions(), calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_or_defaults_for_unselected_curves(), blender::ed::greasepencil::create_curves_outline(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::io::alembic::ABCCurveWriter::do_write(), blender::draw::CurvesEvalCache::ensure_bezier(), blender::draw::CurvesEvalCache::ensure_positions(), evaluated_positions(), evaluated_tangents(), blender::geometry::execute_realize_curve_task(), export_hair_curves(), export_hair_curves_motion(), blender::ed::curves::pen_tool::extrude_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::bke::crazyspace::get_evaluated_grease_pencil_drawing_deformation(), blender::nodes::node_geo_string_to_curves_cc::get_pivot_point(), blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput::get_varray_for_context(), init_curves_point_selection_status(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::modify_curves(), blender::modify_drawing(), blender::modify_fill_color(), blender::modify_stroke_color(), blender::ed::sculpt_paint::greasepencil::outline_stroke(), blender::io::usd::populate_curve_props(), blender::io::usd::populate_curve_props_for_bezier(), blender::io::usd::populate_curve_props_for_nurbs(), blender::reorder_strokes(), blender::io::obj::OBJCurvesTest::run_nurbs_test(), blender::geometry::sample_curve_padded(), blender::geometry::sample_curve_positions_and_handles(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::simplify_drawing(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), blender::bke::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::geometry::trim_bezier_curves(), blender::geometry::trim_catmull_rom_curves(), blender::geometry::trim_polygonal_curves(), blender::io::hydra::CurvesData::write_curves(), blender::write_fill_transforms(), and blender::write_weights_for_drawing().

◆ positions_for_write()

MutableSpan< float3 > CurvesGeometry::positions_for_write ( )

Definition at line 319 of file curves_geometry.cc.

References blender::bke::ATTR_POSITION, CurvesGeometry::attribute_storage, blender::bke::get_mutable_attribute(), and blender::bke::Point.

Referenced by apply_to_curves_point_selection(), blender::geometry::calc_position_with_interpolation(), blender::geometry::calc_position_without_interpolation(), blender::geometry::calc_radius_with_interpolation(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::ed::object::convert_grease_pencil_to_mesh(), blender::geometry::copy_or_defaults_for_unselected_curves(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_radius(), blender::nodes::node_geo_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), blender::io::obj::OBJCurvesTest::create_curves(), blender::nodes::node_geo_curve_primitive_line_cc::create_direction_line_curve(), blender::nodes::node_geo_curve_primitive_circle_cc::create_point_circle_curve(), blender::nodes::node_geo_curve_primitive_line_cc::create_point_line_curve(), blender::nodes::node_geo_curve_primitive_quadratic_bezier_cc::create_quadratic_bezier_curve(), blender::nodes::node_geo_curve_primitive_circle_cc::create_radius_circle_curve(), blender::nodes::node_geo_curve_primitive_spiral_cc::create_spiral_curve(), blender::nodes::node_geo_curve_primitive_star_cc::create_star_curve(), blender::deform_drawing(), blender::deform_drawing(), blender::deform_drawing_as_envelope(), blender::geometry::execute_realize_curve_task(), blender::geometry::extend_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::generate_curves(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::geometry::interpolate_curves_with_samples(), blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth(), blender::ed::object::mesh_data_to_grease_pencil(), MOD_lineart_gpencil_generate_v3(), blender::modify_curves(), blender::modify_curves(), blender::modify_drawing(), blender::modify_stroke_by_index(), blender::modify_stroke_by_layer(), blender::modify_stroke_by_material(), blender::modify_stroke_random(), blender::ed::space_node::node_draw_zones_and_frames(), blender::nodes::node_geo_curve_primitive_quadrilateral_cc::node_geo_exec(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::ed::sculpt_paint::greasepencil::outline_stroke(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), transform(), translate(), blender::geometry::trim_bezier_curves(), blender::geometry::trim_catmull_rom_curves(), blender::geometry::trim_evaluated_curves(), and blender::geometry::trim_polygonal_curves().

◆ radius()

◆ radius_for_write()

◆ remove_attributes_based_on_types()

◆ remove_curves()

◆ remove_points()

◆ resize()

void CurvesGeometry::resize ( int points_num,
int curves_num )

Change the number of curves and/or points.

Warning
To avoid redundant writes, newly created attribute values are not initialized. They must be initialized by the caller afterwards.

Definition at line 1198 of file curves_geometry.cc.

References CurvesGeometry::attribute_storage, BLI_assert, blender::bke::Curve, CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, curves_num(), CustomData_realloc(), blender::bke::Point, CurvesGeometry::point_data, CurvesGeometry::point_num, points_num(), blender::implicit_sharing::resize_trivial_array(), and tag_topology_changed().

Referenced by blender::geometry::add_curves_on_mesh(), blender::ed::greasepencil::compute_topology_change(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::create_curves_for_faces(), blender::bke::curves_copy_curve_selection(), blender::geometry::extend_curves(), blender::io::grease_pencil::extend_curves_geometry(), blender::geometry::extract_greasepencil_layer_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::extrude_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::nodes::node_geo_interpolate_curves_cc::generate_interpolated_curves(), blender::ed::object::mesh_data_to_grease_pencil(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), remove_curves(), remove_points(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::geometry::subdivide_curves(), blender::ed::greasepencil::tests::TEST(), and blender::geometry::trim_curves().

◆ resolution()

◆ resolution_for_write()

◆ reverse_curves()

◆ surface_uv_coords()

std::optional< Span< float2 > > CurvesGeometry::surface_uv_coords ( ) const

◆ surface_uv_coords_for_write()

◆ tag_material_index_changed()

void CurvesGeometry::tag_material_index_changed ( )

Call after changing the "material_index" attribute.

Definition at line 1249 of file curves_geometry.cc.

References blender::bke::CurvesGeometryRuntime::max_material_index_cache, and blender::SharedCache< T >::tag_dirty().

◆ tag_normals_changed()

void CurvesGeometry::tag_normals_changed ( )

Call after changing the "tilt" or "up" attributes.

Definition at line 1241 of file curves_geometry.cc.

References blender::bke::CurvesGeometryRuntime::evaluated_normal_cache.

Referenced by blender::nodes::node_geo_set_curve_normal_cc::set_curve_normal().

◆ tag_positions_changed()

◆ tag_radii_changed()

void CurvesGeometry::tag_radii_changed ( )

Call when making manual changes to the "radius" attribute. The attribute API will also call this in #finish() calls.

Definition at line 1245 of file curves_geometry.cc.

References blender::bke::CurvesGeometryRuntime::bounds_with_radius_cache.

Referenced by blender::geometry::calc_radius_without_interpolation(), blender::deform_drawing_as_envelope(), and blender::io::grease_pencil::shape_attributes_to_curves().

◆ tag_topology_changed()

◆ tilt()

VArray< float > CurvesGeometry::tilt ( ) const

The angle used to rotate evaluated normals around the tangents after their calculation. Call tag_normals_changed after changes.

Definition at line 386 of file curves_geometry.cc.

References blender::bke::ATTR_TILT, CurvesGeometry::attribute_storage, blender::bke::get_varray_attribute(), and blender::bke::Point.

Referenced by evaluated_normals(), and init_curves_point_selection_status().

◆ tilt_for_write()

◆ transform()

◆ translate()

◆ update_curve_types()


The documentation for this class was generated from the following files: