From d5df23d7581230da7ab5cfd5764a46f7f7941759 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 15 Sep 2022 13:14:31 -0500 Subject: Cleanup: Rename attribute required functions Avoid "customdata" in the name, since that's an implementation detail in this context. --- source/blender/blenkernel/BKE_curves.h | 2 +- source/blender/blenkernel/BKE_pointcloud.h | 2 +- source/blender/blenkernel/intern/attribute.cc | 10 ++++------ source/blender/blenkernel/intern/curves.cc | 2 +- source/blender/blenkernel/intern/pointcloud.cc | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_curves.h b/source/blender/blenkernel/BKE_curves.h index c3302c6d2aa..71a0562e1df 100644 --- a/source/blender/blenkernel/BKE_curves.h +++ b/source/blender/blenkernel/BKE_curves.h @@ -25,7 +25,7 @@ void *BKE_curves_add(struct Main *bmain, const char *name); struct BoundBox *BKE_curves_boundbox_get(struct Object *ob); -bool BKE_curves_customdata_required(const struct Curves *curves, const char *name); +bool BKE_curves_attribute_required(const struct Curves *curves, const char *name); /* Depsgraph */ diff --git a/source/blender/blenkernel/BKE_pointcloud.h b/source/blender/blenkernel/BKE_pointcloud.h index 5fd601e4332..d6367ac5a61 100644 --- a/source/blender/blenkernel/BKE_pointcloud.h +++ b/source/blender/blenkernel/BKE_pointcloud.h @@ -32,7 +32,7 @@ void BKE_pointcloud_nomain_to_pointcloud(struct PointCloud *pointcloud_src, struct BoundBox *BKE_pointcloud_boundbox_get(struct Object *ob); bool BKE_pointcloud_minmax(const struct PointCloud *pointcloud, float r_min[3], float r_max[3]); -bool BKE_pointcloud_customdata_required(const struct PointCloud *pointcloud, const char *name); +bool BKE_pointcloud_attribute_required(const struct PointCloud *pointcloud, const char *name); /* Dependency Graph */ diff --git a/source/blender/blenkernel/intern/attribute.cc b/source/blender/blenkernel/intern/attribute.cc index f66a1f9ee93..bd3e452b7f2 100644 --- a/source/blender/blenkernel/intern/attribute.cc +++ b/source/blender/blenkernel/intern/attribute.cc @@ -452,12 +452,10 @@ int BKE_id_attribute_data_length(ID *id, CustomDataLayer *layer) bool BKE_id_attribute_required(const ID *id, const char *name) { switch (GS(id->name)) { - case ID_PT: { - return BKE_pointcloud_customdata_required((const PointCloud *)id, name); - } - case ID_CV: { - return BKE_curves_customdata_required((const Curves *)id, name); - } + case ID_PT: + return BKE_pointcloud_attribute_required((const PointCloud *)id, name); + case ID_CV: + return BKE_curves_attribute_required((const Curves *)id, name); default: return false; } diff --git a/source/blender/blenkernel/intern/curves.cc b/source/blender/blenkernel/intern/curves.cc index e729fed050b..d801484de62 100644 --- a/source/blender/blenkernel/intern/curves.cc +++ b/source/blender/blenkernel/intern/curves.cc @@ -263,7 +263,7 @@ BoundBox *BKE_curves_boundbox_get(Object *ob) return ob->runtime.bb; } -bool BKE_curves_customdata_required(const Curves *UNUSED(curves), const char *name) +bool BKE_curves_attribute_required(const Curves *UNUSED(curves), const char *name) { return STREQ(name, ATTR_POSITION); } diff --git a/source/blender/blenkernel/intern/pointcloud.cc b/source/blender/blenkernel/intern/pointcloud.cc index a17ca1447f6..5c935bf6daf 100644 --- a/source/blender/blenkernel/intern/pointcloud.cc +++ b/source/blender/blenkernel/intern/pointcloud.cc @@ -339,7 +339,7 @@ BoundBox *BKE_pointcloud_boundbox_get(Object *ob) return ob->runtime.bb; } -bool BKE_pointcloud_customdata_required(const PointCloud *UNUSED(pointcloud), const char *name) +bool BKE_pointcloud_attribute_required(const PointCloud *UNUSED(pointcloud), const char *name) { return STREQ(name, POINTCLOUD_ATTR_POSITION); } -- cgit v1.2.3