[Bf-blender-cvs] [59414e6a6f0] geometry-nodes-point-separate-node: Point Separate Node: Revert earlier change to point cloud creation

Hans Goudey noreply at git.blender.org
Wed Dec 2 04:35:05 CET 2020


Commit: 59414e6a6f032e38008d4a1e935e9d6926fe3831
Author: Hans Goudey
Date:   Tue Dec 1 22:29:55 2020 -0500
Branches: geometry-nodes-point-separate-node
https://developer.blender.org/rB59414e6a6f032e38008d4a1e935e9d6926fe3831

Point Separate Node: Revert earlier change to point cloud creation

I'm not quite sure creating the "radius" attribute in here is necessary
when any other attribute can be created later, but without this the
original radius attribute didn't pass to the new point cloud components
properly.

This should be investigated though, because the "radius" attribute
of pointclouds currently exists in some "semi-built-in" space that
doesn't really make sense.

===================================================================

M	source/blender/blenkernel/intern/pointcloud.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/pointcloud.cc b/source/blender/blenkernel/intern/pointcloud.cc
index 1d38b69462a..5f6685817b9 100644
--- a/source/blender/blenkernel/intern/pointcloud.cc
+++ b/source/blender/blenkernel/intern/pointcloud.cc
@@ -243,6 +243,13 @@ PointCloud *BKE_pointcloud_new_nomain(const int totpoint)
 
   pointcloud->totpoint = totpoint;
 
+  CustomData_add_layer_named(&pointcloud->pdata,
+                             CD_PROP_FLOAT,
+                             CD_CALLOC,
+                             nullptr,
+                             pointcloud->totpoint,
+                             POINTCLOUD_ATTR_RADIUS);
+
   pointcloud->totpoint = totpoint;
   CustomData_realloc(&pointcloud->pdata, pointcloud->totpoint);
   BKE_pointcloud_update_customdata_pointers(pointcloud);



More information about the Bf-blender-cvs mailing list