[Bf-blender-cvs] [d5df23d7581] master: Cleanup: Rename attribute required functions

Hans Goudey noreply at git.blender.org
Thu Sep 15 20:14:38 CEST 2022


Commit: d5df23d7581230da7ab5cfd5764a46f7f7941759
Author: Hans Goudey
Date:   Thu Sep 15 13:14:31 2022 -0500
Branches: master
https://developer.blender.org/rBd5df23d7581230da7ab5cfd5764a46f7f7941759

Cleanup: Rename attribute required functions

Avoid "customdata" in the name, since that's an implementation detail
in this context.

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

M	source/blender/blenkernel/BKE_curves.h
M	source/blender/blenkernel/BKE_pointcloud.h
M	source/blender/blenkernel/intern/attribute.cc
M	source/blender/blenkernel/intern/curves.cc
M	source/blender/blenkernel/intern/pointcloud.cc

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

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);
 }



More information about the Bf-blender-cvs mailing list