forked from blender/blender
index-of-nearest-104619 #2
@ -70,8 +70,7 @@ void *BKE_pointcloud_add(struct Main *bmain, const char *name);
|
||||
void *BKE_pointcloud_add_default(struct Main *bmain, const char *name);
|
||||
struct PointCloud *BKE_pointcloud_new_nomain(int totpoint);
|
||||
void BKE_pointcloud_nomain_to_pointcloud(struct PointCloud *pointcloud_src,
|
||||
struct PointCloud *pointcloud_dst,
|
||||
bool take_ownership);
|
||||
struct PointCloud *pointcloud_dst);
|
||||
|
||||
struct BoundBox *BKE_pointcloud_boundbox_get(struct Object *ob);
|
||||
|
||||
|
@ -249,9 +249,7 @@ PointCloud *BKE_pointcloud_new_nomain(const int totpoint)
|
||||
return pointcloud;
|
||||
}
|
||||
|
||||
void BKE_pointcloud_nomain_to_pointcloud(PointCloud *pointcloud_src,
|
||||
PointCloud *pointcloud_dst,
|
||||
bool take_ownership)
|
||||
void BKE_pointcloud_nomain_to_pointcloud(PointCloud *pointcloud_src, PointCloud *pointcloud_dst)
|
||||
{
|
||||
BLI_assert(pointcloud_src->id.tag & LIB_TAG_NO_MAIN);
|
||||
|
||||
@ -260,10 +258,8 @@ void BKE_pointcloud_nomain_to_pointcloud(PointCloud *pointcloud_src,
|
||||
const int totpoint = pointcloud_dst->totpoint = pointcloud_src->totpoint;
|
||||
CustomData_copy(&pointcloud_src->pdata, &pointcloud_dst->pdata, CD_MASK_ALL, totpoint);
|
||||
|
||||
if (take_ownership) {
|
||||
BKE_id_free(nullptr, pointcloud_src);
|
||||
}
|
||||
}
|
||||
|
||||
bool PointCloud::bounds_min_max(blender::float3 &min, blender::float3 &max) const
|
||||
{
|
||||
|
@ -1107,7 +1107,7 @@ static bool modifier_apply_obdata(
|
||||
/* Copy the relevant information to the original. */
|
||||
Main *bmain = DEG_get_bmain(depsgraph);
|
||||
BKE_object_material_from_eval_data(bmain, ob, &pointcloud_eval->id);
|
||||
BKE_pointcloud_nomain_to_pointcloud(pointcloud_eval, &points, true);
|
||||
BKE_pointcloud_nomain_to_pointcloud(pointcloud_eval, &points);
|
||||
}
|
||||
else {
|
||||
/* TODO: implement for volumes. */
|
||||
|
Loading…
Reference in New Issue
Block a user