21 points.tag_positions_changed();
27 points.tag_radii_changed();
39 static auto attributes = []() {
47 map.
add_new(
"radius", std::move(radius));
63 fn.domain_supported = [](
const void * ,
const AttrDomain domain) {
66 fn.domain_size = [](
const void *owner,
const AttrDomain domain) {
69 fn.builtin_domain_and_type = [](
const void * ,
70 const StringRef name) -> std::optional<AttributeDomainAndType> {
81 fn.lookup_meta_data = [](
const void *owner,
StringRef name) -> std::optional<AttributeMetaData> {
99 fn.adapt_domain = [](
const void * ,
108 fn.foreach_attribute = [](
const void *owner,
114 const auto get_fn = [&]() {
143 fn.remove = [](
void *owner,
const StringRef name) ->
bool {
147 if (!info->deletable) {
151 const std::optional<AttrUpdateOnChange>
fn =
changed_tags().lookup_try(name);
152 const bool removed =
storage.remove(name);
161 fn.add = [](
void *owner,
167 const int domain_size = pointcloud.
totpoint;
170 if (info->domain != domain || info->type != type) {
181 if (
const std::optional<AttrUpdateOnChange>
fn =
changed_tags().lookup_try(name)) {
187 fn.rename = [](
void *owner,
213 if (
const std::optional<AttrUpdateOnChange>
fn =
changed_tags().lookup_try(name)) {
General operations for point clouds.
void add_new(const Key &key, const Value &value)
std::optional< AttrStorageType > storage_type
const AttributeAccessor * accessor
std::variant< ArrayData, SingleData > DataVariant
AttrDomain domain() const
void assign_data(DataVariant &&data)
AttrType data_type() const
#define storage(slot, qualifiers)
static constexpr AttributeAccessorFunctions get_pointcloud_accessor_functions()
GAttributeReader attribute_to_reader(const Attribute &attribute, const AttrDomain domain, const int64_t domain_size)
static const auto & array_storage_required()
Set< StringRef > rename_attributes(AttributeStorage &storage, const Map< StringRef, StringRef > &name_map, const bool overwrite, const Map< StringRef, AttrBuiltinInfo > &builtin_attributes, const Set< StringRef > &array_storage_required, const FunctionRef< int(AttrDomain)> domain_size_fn, std::optional< ListBaseT< bDeformGroup > * > vertex_groups, FunctionRef< MutableSpan< MDeformVert >()> get_mutable_dverts)
GAttributeWriter attribute_to_writer(void *owner, const Map< StringRef, AttrUpdateOnChange > &changed_tags, const int64_t domain_size, Attribute &attribute)
static const auto & builtin_attributes()
const AttributeAccessorFunctions & pointcloud_attribute_accessor_functions()
Attribute::DataVariant attribute_init_to_data(const bke::AttrType data_type, const int64_t domain_size, const AttributeInit &initializer, const bool require_array_data)
static void tag_radius_changed(void *owner)
static const auto & changed_tags()
static void tag_position_changed(void *owner)
BMesh const char void * data
struct AttributeStorage attribute_storage
AttributeValidator validator