18# include <fmt/format.h>
40 return pointcloud->positions_for_write().data();
43static const float3 *get_pointcloud_positions_const(
const PointCloud *pointcloud)
45 return pointcloud->positions().data();
52 const float3 *positions = get_pointcloud_positions_const(pointcloud);
53 return int(co - positions);
58 return rna_Point_index_get_const(
ptr);
72 get_pointcloud_positions(pointcloud),
82 if (index < 0 || index >= pointcloud->
totpoint) {
86 *
ptr, &RNA_Point, &get_pointcloud_positions(pointcloud)[index], *r_ptr);
90static void rna_Point_location_get(
PointerRNA *
ptr,
float value[3])
95static void rna_Point_location_set(
PointerRNA *
ptr,
const float value[3])
103 return pointcloud->radius().get(rna_Point_index_get_const(
ptr));
106static void rna_Point_radius_set(
PointerRNA *
ptr,
float value)
109 pointcloud->radius_for_write()[rna_Point_index_get_const(
ptr)] = value;
112static std::optional<std::string> rna_Point_path(
const PointerRNA *
ptr)
114 return fmt::format(
"points[{}]", rna_Point_index_get_const(
ptr));
119 ID *
id =
ptr->owner_id;
170 "rna_PointCloud_points_begin",
171 "rna_iterator_array_next",
172 "rna_iterator_array_end",
173 "rna_iterator_array_get",
174 "rna_PointCloud_points_length",
175 "rna_PointCloud_points_lookup_int",
194 "rna_IDMaterials_assign_int");
Generic geometry attributes built on CustomData.
CustomData interface, see also DNA_customdata_types.h.
General operations for point clouds.
MINLINE void copy_v3_v3(float r[3], const float a[3])
void DEG_id_tag_update(ID *id, unsigned int flags)
VecBase< float, 3 > float3
VecBase< float, 3 > float3
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, size_t itemsize, int64_t length, bool free_ptr, IteratorSkipFunc skip)
void rna_pointer_create_with_ancestors(const PointerRNA &parent, StructRNA *type, void *data, PointerRNA &r_ptr)
void rna_def_animdata_common(StructRNA *srna)
void rna_def_attributes_common(StructRNA *srna, const AttributeOwnerType type)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
static void rna_def_point(BlenderRNA *brna)
void RNA_def_pointcloud(BlenderRNA *brna)
static void rna_def_pointcloud(BlenderRNA *brna)
void WM_main_add_notifier(uint type, void *reference)