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:
authorHans Goudey <h.goudey@me.com>2022-06-08 11:42:21 +0300
committerHans Goudey <h.goudey@me.com>2022-06-08 11:48:19 +0300
commit6eea5f70e3b79e3c6683b7bc0e3e2998b67955d6 (patch)
tree94cce89b472021d174349477303a3faeab9cb73d /source/blender/blenkernel/intern/pointcloud.cc
parent1af652d42eb917e257d0f4f2773258f4f6ad2a45 (diff)
Attributes: Use names instead of layers for some functions
This mirrors the C++ attribute API better, separates the implementation of attributes from CustomData slightly, and makes functions simpler, clearer, and safer. Also fix an issue with removing an attribute caused by 97712b018df71c meant the first attribute with the given type was removed instead of the attribute with the given name.
Diffstat (limited to 'source/blender/blenkernel/intern/pointcloud.cc')
-rw-r--r--source/blender/blenkernel/intern/pointcloud.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/pointcloud.cc b/source/blender/blenkernel/intern/pointcloud.cc
index 3e94a865de3..e38c20d8eb7 100644
--- a/source/blender/blenkernel/intern/pointcloud.cc
+++ b/source/blender/blenkernel/intern/pointcloud.cc
@@ -315,10 +315,9 @@ void BKE_pointcloud_update_customdata_pointers(PointCloud *pointcloud)
CustomData_get_layer_named(&pointcloud->pdata, CD_PROP_FLOAT, POINTCLOUD_ATTR_RADIUS));
}
-bool BKE_pointcloud_customdata_required(const PointCloud *UNUSED(pointcloud),
- CustomDataLayer *layer)
+bool BKE_pointcloud_customdata_required(const PointCloud *UNUSED(pointcloud), const char *name)
{
- return layer->type == CD_PROP_FLOAT3 && STREQ(layer->name, POINTCLOUD_ATTR_POSITION);
+ return STREQ(name, POINTCLOUD_ATTR_POSITION);
}
/* Dependency Graph */