Cleanup: Rename attribute required functions
Avoid "customdata" in the name, since that's an implementation detail in this context.
This commit is contained in:
parent
0945ae338b
commit
d5df23d758
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue