44 pointcloud->attributes_for_write().remove(
".selection");
49 pointcloud->attributes_for_write().lookup_or_add_for_write_span<
bool>(
51 selection_attr.
span.take_back(selection.
size()).fill(
true);
62 ot->name =
"Duplicate";
63 ot->idname =
"POINTCLOUD_OT_duplicate";
64 ot->description =
"Copy selected points";
General operations for point clouds.
void BKE_pointcloud_nomain_to_pointcloud(PointCloud *pointcloud_src, PointCloud *pointcloud_dst)
PointCloud * BKE_pointcloud_new_nomain(int totpoint)
void DEG_id_tag_update(ID *id, unsigned int flags)
GMutableSpan take_front(const int64_t n) const
GMutableSpan take_back(const int64_t n) const
GAttributeReader get() const
GSpanAttributeWriter lookup_or_add_for_write_only_span(StringRef attribute_id, AttrDomain domain, AttrType data_type)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
void copy(const GVArray &src, GMutableSpan dst, int64_t grain_size=4096)
void gather(const GVArray &src, const IndexMask &indices, GMutableSpan dst, int64_t grain_size=4096)
bool editable_pointcloud_in_edit_mode_poll(bContext *C)
static wmOperatorStatus duplicate_exec(bContext *C, wmOperator *)
void POINTCLOUD_OT_duplicate(wmOperatorType *ot)
static void duplicate_points(PointCloud &pointcloud, const IndexMask &mask)
IndexMask retrieve_selected_points(const PointCloud &pointcloud, IndexMaskMemory &memory)
VectorSet< PointCloud * > get_unique_editable_pointclouds(const bContext &C)
MutableVArraySpan< T > span
void WM_event_add_notifier(const bContext *C, uint type, void *reference)