38 PointCloud &active_pointcloud = *id_cast<PointCloud *>(active_object->
data);
39 const float4x4 &world_to_active = active_object->world_to_object();
42 bool active_object_selected =
false;
44 if (
object == active_object) {
45 active_object_selected =
true;
55 if (!active_object_selected) {
66 transforms[i] = world_to_active * objects[i]->object_to_world();
67 const PointCloud *orig_points = id_cast<const PointCloud *>(objects[i]->
data);
68 references[i] = reference_by_orig_points.
lookup_or_add_cb(orig_points, [&]() {
#define CTX_DATA_BEGIN(C, Type, instance, member)
General operations for point clouds.
Value & lookup_or_add_cb(const Key &key, const CreateValueF &create_value)
void append(const T &value)
IndexRange index_range() const
Span< T > as_span() const
MutableSpan< int > reference_handles_for_write()
int add_new_reference(InstanceReference reference)
MutableSpan< float4x4 > transforms_for_write()
void base_free_and_unlink(Main *bmain, Scene *scene, Object *ob)
wmOperatorStatus join_objects_exec(bContext *C, wmOperator *op)
RealizeInstancesResult realize_instances(bke::GeometrySet geometry_set, const RealizeInstancesOptions &options)
PointCloud * BKE_pointcloud_copy_for_eval(const PointCloud *pointcloud_src)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BKE_pointcloud_nomain_to_pointcloud(PointCloud *pointcloud_src, PointCloud *pointcloud_dst)
MatBase< float, 4, 4 > float4x4
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
BMesh const char void * data
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
Main * CTX_data_main(const bContext *C)
void DEG_relations_tag_update(Main *bmain)
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
GeometryComponent & get_component_for_write(GeometryComponent::Type component_type)
bool has_pointcloud() const
static GeometrySet from_instances(std::unique_ptr< Instances > instances)
static GeometrySet from_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
bke::GeometrySet geometry
struct ReportList * reports