23 type.fill_assign_n(value.get(), dst.
slice(points).
data(), points.size());
37 const std::array<int, CURVE_TYPES_NUM> &type_counts,
42 if (type_counts[type] == types.size()) {
45 if (types.is_single()) {
50 return types_span[index] == type;
55 const std::array<int, CURVE_TYPES_NUM> &counts,
65 if (!mask.is_empty()) {
83 const OffsetIndices points_by_curve = curves.points_by_curve();
85 const Span<float3> handle_positions_left = curves.handle_positions_left();
86 const Span<float3> handle_positions_right = curves.handle_positions_right();
91 for (
const int point : points) {
92 const int index = point * 3;
93 all_positions[index] = handle_positions_left[
point];
94 all_positions[index + 1] = positions[
point];
95 all_positions[index + 2] = handle_positions_right[
point];
106 if (curves_selection.
is_empty() || curves.curves_num() == 0 ||
113 const OffsetIndices points_by_curve = curves.points_by_curve();
120 for (
const int point : points) {
121 const int index = point * 3;
122 handle_positions_left[
point] = all_positions[index];
123 positions[
point] = all_positions[index + 1];
124 handle_positions_right[
point] = all_positions[index + 2];
Low-level operations for curves.
CustomData interface, see also DNA_customdata_types.h.
void CustomData_init_from(const CustomData *source, CustomData *dest, eCustomDataMask mask, int totelem)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
GMutableSpan slice(const int64_t start, int64_t size) const
const CPPType & type() const
constexpr int64_t size() const
static IndexMask from_predicate(const IndexMask &universe, GrainSize grain_size, IndexMaskMemory &memory, Fn &&predicate)
void foreach_index(Fn &&fn) const
Array< float3 > retrieve_all_positions(const bke::CurvesGeometry &curves, const IndexMask &curves_selection)
void write_all_positions(bke::CurvesGeometry &curves, const IndexMask &curves_selection, Span< float3 > all_positions)
bke::CurvesGeometry copy_only_curve_domain(const bke::CurvesGeometry &src_curves)
IndexMask indices_for_type(const VArray< int8_t > &types, const std::array< int, CURVE_TYPES_NUM > &type_counts, const CurveType type, const IndexMask &selection, IndexMaskMemory &memory)
void fill_points(OffsetIndices< int > points_by_curve, const IndexMask &curve_selection, GPointer value, GMutableSpan dst)
void foreach_curve_by_type(const VArray< int8_t > &types, const std::array< int, CURVE_TYPES_NUM > &type_counts, const IndexMask &selection, FunctionRef< void(IndexMask)> catmull_rom_fn, FunctionRef< void(IndexMask)> poly_fn, FunctionRef< void(IndexMask)> bezier_fn, FunctionRef< void(IndexMask)> nurbs_fn)
GPU_SHADER_INTERFACE_INFO(overlay_edit_curve_handle_iface, "vert").flat(Type pos vertex_in(1, Type::UINT, "data") .vertex_out(overlay_edit_curve_handle_iface) .geometry_layout(PrimitiveIn Frequency::GEOMETRY storage_buf(1, Qualifier::READ, "uint", "data[]", Frequency::GEOMETRY) .push_constant(Type Frequency::GEOMETRY selection[]
CurvesGeometryRuntimeHandle * runtime