Blender V5.0
blender::ed::transform::curves Namespace Reference

Functions

void curve_populate_trans_data_structs (const TransInfo &t, TransDataContainer &tc, bke::CurvesGeometry &curves, const float4x4 &transform, const bke::crazyspace::GeometryDeformation &deformation, std::optional< MutableSpan< float > > value_attribute, Span< IndexMask > points_to_transform_per_attr, const IndexMask &affected_curves, bool use_connected_only, const IndexMask &bezier_curves, void *extra=nullptr)
CurvesTransformDatacreate_curves_transform_custom_data (TransCustomData &custom_data)
void copy_positions_from_curves_transform_custom_data (const TransCustomData &custom_data, int layer, MutableSpan< float3 > positions_dst)
void create_aligned_handles_masks (const bke::CurvesGeometry &curves, Span< IndexMask > points_to_transform_per_attr, int curve_index, TransCustomData &custom_data)
void calculate_aligned_handles (const TransCustomData &custom_data, bke::CurvesGeometry &curves, int curve_index)
bool update_handle_types_for_transform (eTfmMode mode, const std::array< IndexMask, 3 > &selection_per_attribute, const IndexMask &bezier_points, bke::CurvesGeometry &curves)
static void curve_connected_point_distances (const Span< float3 > positions, MutableSpan< float > r_distances)
static void cyclic_curve_connected_point_distances (const Span< float3 > positions, MutableSpan< float > r_distances)
static IndexMask handles_by_type (const IndexMask &handles, const VArray< int8_t > &types, const HandleType type, IndexMaskMemory &memory)
static bool update_auto_handle_types (bke::CurvesGeometry &curves, const IndexMask &auto_handles, const IndexMask &auto_handles_opposite, const IndexMask &selected_handles, const IndexMask &selected_handles_opposite, const StringRef handle_type_name, IndexMaskMemory &memory)
static bool update_vector_handle_types (bke::CurvesGeometry &curves, const IndexMask &selected_handles, const StringRef handle_type_name)
static MutableSpan< float3append_positions_to_custom_data (const IndexMask selection, Span< float3 > positions, TransCustomData &custom_data)
static void createTransCurvesVerts (bContext *C, TransInfo *t)
static void recalcData_curves (TransInfo *t)
static OffsetIndices< int > recent_position_offsets (TransCustomData &custom_data, int num)
static void fill_map (const CurveType curve_type, const IndexRange curve_points, const OffsetIndices< int > position_offsets_in_td, const int handles_offset, MutableSpan< int > map)

Variables

TransConvertTypeInfo TransConvertType_Curves

Function Documentation

◆ append_positions_to_custom_data()

◆ calculate_aligned_handles()

◆ copy_positions_from_curves_transform_custom_data()

◆ create_aligned_handles_masks()

◆ create_curves_transform_custom_data()

◆ createTransCurvesVerts()

void blender::ed::transform::curves::createTransCurvesVerts ( bContext * C,
TransInfo * t )
static

Definition at line 283 of file transform_convert_curves.cc.

References blender::ed::transform::CurvesTransformData::aligned_with_left, blender::ed::transform::CurvesTransformData::aligned_with_right, C, create_aligned_handles_masks(), create_curves_transform_custom_data(), createTransCurvesVerts(), CTX_data_ensure_evaluated_depsgraph(), curve_populate_trans_data_structs(), blender::bke::curves::curve_to_point_selection(), CURVE_TYPE_BEZIER, blender::ed::transform::TransDataContainer::custom, blender::ed::transform::TransCustomData::data, blender::ed::transform::TransDataContainer::data, Object::data, blender::ed::transform::TransInfo::data_container, blender::ed::transform::TransInfo::data_container_len, blender::ed::transform::TransDataContainer::data_len, depsgraph, blender::bke::SpanAttributeWriter< T >::finish(), blender::ed::transform::TransInfo::flag, blender::ed::transform::TransCustomData::free_cb, blender::VArray< T >::from_single(), Curves::geometry, blender::ed::curves::get_curves_selection_attribute_names(), blender::bke::crazyspace::get_evaluated_curves_deformation(), i, blender::MutableSpan< T >::index_range(), blender::Span< T >::index_range(), blender::bke::curves::indices_for_type(), blender::index_mask::ExprBuilder::intersect(), blender::index_mask::IndexMask::is_empty(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), MEM_calloc_arrayN(), blender::ed::transform::CurvesTransformData::memory, blender::index_mask::ExprBuilder::merge(), blender::ed::transform::TransInfo::mode, blender::ed::transform::TransDataContainer::obedit, blender::bke::Point, blender::ed::transform::CurvesTransformData::positions, blender::ed::curves::retrieve_selected_points(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::index_mask::IndexMask::size(), blender::Span< T >::size(), blender::bke::SpanAttributeWriter< T >::span, blender::ed::transform::T_PROP_CONNECTED, T_PROP_EDIT_ALL, blender::ed::transform::TFM_CURVE_SHRINKFATTEN, blender::ed::transform::TFM_TILT, blender::ed::transform::TransCustomDataContainer::type, and update_handle_types_for_transform().

Referenced by createTransCurvesVerts().

◆ curve_connected_point_distances()

◆ curve_populate_trans_data_structs()

void blender::ed::transform::curves::curve_populate_trans_data_structs ( const TransInfo & t,
TransDataContainer & tc,
bke::CurvesGeometry & curves,
const float4x4 & transform,
const bke::crazyspace::GeometryDeformation & deformation,
std::optional< MutableSpan< float > > value_attribute,
Span< IndexMask > points_to_transform_per_attr,
const IndexMask & affected_curves,
bool use_connected_only,
const IndexMask & bezier_curves,
void * extra = nullptr )

Used for both curves and Grease Pencil objects.

Definition at line 534 of file transform_convert_curves.cc.

References blender::offset_indices::accumulate_counts_to_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), append_positions_to_custom_data(), blender::ed::transform::TransInfo::around, blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::ed::transform::TransDataBasic::center, blender::offset_indices::copy_group_sizes(), copy_m3_m3(), copy_v3_v3(), curve_connected_point_distances(), CURVE_HANDLE_NONE, curve_populate_trans_data_structs(), CURVE_TYPE_BEZIER, blender::ed::transform::TransDataContainer::custom, cyclic_curve_connected_point_distances(), blender::ed::transform::TransDataContainer::data, blender::ed::transform::TransDataContainer::data_len, blender::bke::crazyspace::GeometryDeformation::deform_mats, blender::ed::transform::TransData::dist, blender::ed::transform::TransDataBasic::extra, blender::Array< T, InlineBufferCapacity, Allocator >::fill(), fill_map(), blender::index_mask::IndexMask::first(), blender::Span< T >::first(), blender::ed::transform::TransDataBasic::flag, blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::foreach_segment(), IndexMask::from_bools(), blender::ed::curves::get_curves_selection_attribute_names(), View3DOverlay::handle_display, blender::ed::curves::has_anything_selected(), i, blender::ed::transform::TransDataBasic::iloc, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::Span< T >::index_range(), blender::index_mask::IndexMask::is_empty(), blender::ed::transform::TransDataBasic::ival, blender::ed::transform::TransDataBasic::loc, blender::ed::transform::TransData::mtx, View3D::overlay, blender::bke::Point, blender::math::pseudo_invert(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), recent_position_offsets(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::index_mask::IndexMask::size(), blender::IndexRange::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), blender::index_mask::IndexMask::slice_content(), blender::ed::transform::TransData::smtx, blender::ed::transform::TD_SELECTED, blender::ed::transform::TD_SKIP, blender::ed::transform::TransCustomDataContainer::type, V3D_AROUND_LOCAL_ORIGINS, blender::ed::transform::TransDataBasic::val, and blender::ed::transform::TransInfo::view.

Referenced by createTransCurvesVerts(), blender::ed::transform::greasepencil::createTransGreasePencilVerts(), and curve_populate_trans_data_structs().

◆ cyclic_curve_connected_point_distances()

◆ fill_map()

void blender::ed::transform::curves::fill_map ( const CurveType curve_type,
const IndexRange curve_points,
const OffsetIndices< int > position_offsets_in_td,
const int handles_offset,
MutableSpan< int > map )
static

Creates map of indices to tc.data representing the curves. For bezier curves it uses the layout [L0, P0, R0, L1, P1, R1, L2, P2, R2], where [P0, P1, P2], [L0, L1, L2] and [R0, R1, R2] are positions, left handles and right handles respectively. Other curve types just use the positions [P0, P1, ..., Pn] of the control points directly.

Definition at line 484 of file transform_convert_curves.cc.

References CURVE_TYPE_BEZIER, fill_map(), blender::IndexRange::index_range(), blender::threading::parallel_for(), and blender::IndexRange::start().

Referenced by curve_populate_trans_data_structs(), and fill_map().

◆ handles_by_type()

IndexMask blender::ed::transform::curves::handles_by_type ( const IndexMask & handles,
const VArray< int8_t > & types,
const HandleType type,
IndexMaskMemory & memory )
static

◆ recalcData_curves()

◆ recent_position_offsets()

◆ update_auto_handle_types()

bool blender::ed::transform::curves::update_auto_handle_types ( bke::CurvesGeometry & curves,
const IndexMask & auto_handles,
const IndexMask & auto_handles_opposite,
const IndexMask & selected_handles,
const IndexMask & selected_handles_opposite,
const StringRef handle_type_name,
IndexMaskMemory & memory )
static

◆ update_handle_types_for_transform()

◆ update_vector_handle_types()

Variable Documentation

◆ TransConvertType_Curves