diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-01 07:38:06 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-01 08:38:48 +0300 |
commit | 44bac4c8ccf19cb5941435115b8f89a9d14e9c23 (patch) | |
tree | 2bd7698ca3e1e382b078e274566dbad0ae82214c /source/blender/editors/geometry/geometry_attributes.cc | |
parent | ca346d2176737b6aa296617452a8a6cacb7a970a (diff) |
Cleanup: use 'e' prefix for enum types
- CustomDataType -> eCustomDataType
- CustomDataMask -> eCustomDataMask
- AttributeDomain -> eAttrDomain
- NamedAttributeUsage -> eNamedAttrUsage
Diffstat (limited to 'source/blender/editors/geometry/geometry_attributes.cc')
-rw-r--r-- | source/blender/editors/geometry/geometry_attributes.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc index 814c2639169..c9677da1af5 100644 --- a/source/blender/editors/geometry/geometry_attributes.cc +++ b/source/blender/editors/geometry/geometry_attributes.cc @@ -90,8 +90,8 @@ static int geometry_attribute_add_exec(bContext *C, wmOperator *op) char name[MAX_NAME]; RNA_string_get(op->ptr, "name", name); - CustomDataType type = (CustomDataType)RNA_enum_get(op->ptr, "data_type"); - AttributeDomain domain = (AttributeDomain)RNA_enum_get(op->ptr, "domain"); + eCustomDataType type = (eCustomDataType)RNA_enum_get(op->ptr, "data_type"); + eAttrDomain domain = (eAttrDomain)RNA_enum_get(op->ptr, "domain"); CustomDataLayer *layer = BKE_id_attribute_new(id, name, type, domain, op->reports); if (layer == nullptr) { @@ -219,8 +219,8 @@ static int geometry_color_attribute_add_exec(bContext *C, wmOperator *op) char name[MAX_NAME]; RNA_string_get(op->ptr, "name", name); - CustomDataType type = (CustomDataType)RNA_enum_get(op->ptr, "data_type"); - AttributeDomain domain = (AttributeDomain)RNA_enum_get(op->ptr, "domain"); + eCustomDataType type = (eCustomDataType)RNA_enum_get(op->ptr, "data_type"); + eAttrDomain domain = (eAttrDomain)RNA_enum_get(op->ptr, "domain"); CustomDataLayer *layer = BKE_id_attribute_new(id, name, type, domain, op->reports); float color[4]; @@ -289,9 +289,8 @@ static int geometry_attribute_convert_exec(bContext *C, wmOperator *op) * 4. Create a new attribute based on the previously copied data. */ switch (mode) { case ConvertAttributeMode::Generic: { - const AttributeDomain dst_domain = static_cast<AttributeDomain>( - RNA_enum_get(op->ptr, "domain")); - const CustomDataType dst_type = static_cast<CustomDataType>( + const eAttrDomain dst_domain = static_cast<eAttrDomain>(RNA_enum_get(op->ptr, "domain")); + const eCustomDataType dst_type = static_cast<eCustomDataType>( RNA_enum_get(op->ptr, "data_type")); if (ELEM(dst_type, CD_PROP_STRING)) { @@ -579,10 +578,10 @@ using blender::GVArray; bool ED_geometry_attribute_convert(Mesh *mesh, const char *layer_name, - CustomDataType old_type, - AttributeDomain old_domain, - CustomDataType new_type, - AttributeDomain new_domain) + eCustomDataType old_type, + eAttrDomain old_domain, + eCustomDataType new_type, + eAttrDomain new_domain) { CustomDataLayer *layer = BKE_id_attribute_find(&mesh->id, layer_name, old_type, old_domain); const std::string name = layer->name; |