Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/pointcloud.cc')
-rw-r--r--source/blender/blenkernel/intern/pointcloud.cc27
1 files changed, 2 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/pointcloud.cc b/source/blender/blenkernel/intern/pointcloud.cc
index 426ad797cef..14ca3f58db9 100644
--- a/source/blender/blenkernel/intern/pointcloud.cc
+++ b/source/blender/blenkernel/intern/pointcloud.cc
@@ -64,7 +64,7 @@ static void pointcloud_init_data(ID *id)
CustomData_reset(&pointcloud->pdata);
CustomData_add_layer_named(&pointcloud->pdata,
CD_PROP_FLOAT3,
- CD_CALLOC,
+ CD_SET_DEFAULT,
nullptr,
pointcloud->totpoint,
POINTCLOUD_ATTR_POSITION);
@@ -228,13 +228,6 @@ void *BKE_pointcloud_add_default(Main *bmain, const char *name)
PointCloud *pointcloud = static_cast<PointCloud *>(BKE_libblock_alloc(bmain, ID_PT, name, 0));
pointcloud_init_data(&pointcloud->id);
-
- CustomData_add_layer_named(&pointcloud->pdata,
- CD_PROP_FLOAT,
- CD_CALLOC,
- nullptr,
- pointcloud->totpoint,
- POINTCLOUD_ATTR_RADIUS);
pointcloud_random(pointcloud);
return pointcloud;
@@ -251,7 +244,7 @@ PointCloud *BKE_pointcloud_new_nomain(const int totpoint)
CustomData_add_layer_named(&pointcloud->pdata,
CD_PROP_FLOAT,
- CD_CALLOC,
+ CD_SET_DEFAULT,
nullptr,
pointcloud->totpoint,
POINTCLOUD_ATTR_RADIUS);
@@ -325,22 +318,6 @@ bool BKE_pointcloud_customdata_required(const PointCloud *UNUSED(pointcloud), co
/* Dependency Graph */
-PointCloud *BKE_pointcloud_new_for_eval(const PointCloud *pointcloud_src, int totpoint)
-{
- PointCloud *pointcloud_dst = static_cast<PointCloud *>(BKE_id_new_nomain(ID_PT, nullptr));
- CustomData_free(&pointcloud_dst->pdata, pointcloud_dst->totpoint);
-
- STRNCPY(pointcloud_dst->id.name, pointcloud_src->id.name);
- pointcloud_dst->mat = static_cast<Material **>(MEM_dupallocN(pointcloud_src->mat));
- pointcloud_dst->totcol = pointcloud_src->totcol;
-
- pointcloud_dst->totpoint = totpoint;
- CustomData_copy(
- &pointcloud_src->pdata, &pointcloud_dst->pdata, CD_MASK_ALL, CD_CALLOC, totpoint);
-
- return pointcloud_dst;
-}
-
PointCloud *BKE_pointcloud_copy_for_eval(struct PointCloud *pointcloud_src, bool reference)
{
int flags = LIB_ID_COPY_LOCALIZE;