22 positions_per_attribute.
append(
curves.positions_for_write());
24 positions_per_attribute.
append(
curves.handle_positions_left_for_write());
25 positions_per_attribute.
append(
curves.handle_positions_right_for_write());
27 return positions_per_attribute;
34 const std::optional<Span<float3>> handles_left =
curves.handle_positions_left();
35 const std::optional<Span<float3>> handles_right =
curves.handle_positions_right();
36 if (handles_left && handles_right) {
37 positions_per_attribute.
append(*handles_left);
38 positions_per_attribute.
append(*handles_right);
40 return positions_per_attribute;
44 const bool skip_handles,
47 std::array<IndexMask, 3> selection;
49 if (selection_names.
size() == 1) {
58 curves, selection_names[i], bezier_points, memory);
73 const bool skip_handles)
77 const int size = selection[0].size() + selection[1].size() + selection[2].size();
86 for (
const int attribute_i : positions.
index_range()) {
87 selection[attribute_i].foreach_index(
90 tv.
loc = positions[attribute_i][i];
96 offset += selection[attribute_i].size();
102 const bool skip_handles)
106 const int size = selection[0].size() + selection[1].size() + selection[2].size();
114 for (
const int attribute_i : positions.
index_range()) {
116 selection[attribute_i].size());
117 selection[attribute_i].foreach_index(
124 offset += selection[attribute_i].
size();
127 curves.tag_positions_changed();
128 curves.calculate_bezier_auto_handles();
134 const int size =
curves.points_num();
137 return reinterpret_cast<float (*)[3]
>(
data);
Low-level operations for curves.
Low-level operations for curves.
Object is a sort of wrapper for general info.
static IndexMask from_difference(const IndexMask &mask_a, const IndexMask &mask_b, LinearAllocator<> &memory)
constexpr Span slice_safe(const int64_t start, const int64_t size) const
constexpr int64_t size() const
constexpr IndexRange index_range() const
void append(const T &value)
IndexRange index_range() const
IndexMask curve_type_point_selection(const bke::CurvesGeometry &curves, CurveType curve_type, LinearAllocator<> &memory)
void curves_normals_point_domain_calc(const CurvesGeometry &curves, MutableSpan< float3 > normals)
void transverts_from_curves_positions_create(bke::CurvesGeometry &curves, TransVertStore *tvs, const bool skip_handles)
static std::array< IndexMask, 3 > transverts_curves_selection(const bke::CurvesGeometry &curves, const bool skip_handles, IndexMaskMemory &memory)
IndexMask retrieve_selected_points(const bke::CurvesGeometry &curves, LinearAllocator<> &memory)
Vector< Span< float3 > > get_curves_positions(const bke::CurvesGeometry &curves)
float(* point_normals_array_create(const Curves *curves_id))[3]
Vector< MutableSpan< float3 > > get_curves_positions_for_write(bke::CurvesGeometry &curves)
Span< StringRef > get_curves_selection_attribute_names(const bke::CurvesGeometry &curves)
void transverts_update_curves(bke::CurvesGeometry &curves, const TransVertStore *tvs, const bool skip_handles)
constexpr ParallelGrainSize grain_size(int grain_size)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
BMesh const char void * data
VecBase< float, 3 > float3
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float