From 44bac4c8ccf19cb5941435115b8f89a9d14e9c23 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 Jun 2022 14:38:06 +1000 Subject: Cleanup: use 'e' prefix for enum types - CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage --- source/blender/draw/intern/draw_attributes.cc | 4 ++-- source/blender/draw/intern/draw_attributes.h | 8 ++++---- source/blender/draw/intern/draw_cache_impl_curves.cc | 4 ++-- source/blender/draw/intern/draw_cache_impl_mesh.c | 4 ++-- .../draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc | 8 ++++---- .../blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) (limited to 'source/blender/draw') diff --git a/source/blender/draw/intern/draw_attributes.cc b/source/blender/draw/intern/draw_attributes.cc index 714f1dbb3d1..f84a6c86fac 100644 --- a/source/blender/draw/intern/draw_attributes.cc +++ b/source/blender/draw/intern/draw_attributes.cc @@ -65,9 +65,9 @@ bool drw_attributes_overlap(const DRW_Attributes *a, const DRW_Attributes *b) } DRW_AttributeRequest *drw_attributes_add_request(DRW_Attributes *attrs, - CustomDataType type, + eCustomDataType type, int layer, - AttributeDomain domain) + eAttrDomain domain) { if (attrs->num_requests >= GPU_MAX_ATTR) { return nullptr; diff --git a/source/blender/draw/intern/draw_attributes.h b/source/blender/draw/intern/draw_attributes.h index 192ffa43337..c375670cd70 100644 --- a/source/blender/draw/intern/draw_attributes.h +++ b/source/blender/draw/intern/draw_attributes.h @@ -25,9 +25,9 @@ extern "C" { #endif typedef struct DRW_AttributeRequest { - CustomDataType cd_type; + eCustomDataType cd_type; int layer_index; - AttributeDomain domain; + eAttrDomain domain; char attribute_name[64]; } DRW_AttributeRequest; @@ -46,9 +46,9 @@ void drw_attributes_merge(DRW_Attributes *dst, bool drw_attributes_overlap(const DRW_Attributes *a, const DRW_Attributes *b); DRW_AttributeRequest *drw_attributes_add_request(DRW_Attributes *attrs, - CustomDataType type, + eCustomDataType type, int layer, - AttributeDomain domain); + eAttrDomain domain); bool drw_custom_data_match_attribute(const CustomData *custom_data, const char *name, diff --git a/source/blender/draw/intern/draw_cache_impl_curves.cc b/source/blender/draw/intern/draw_cache_impl_curves.cc index f9cf0021fcd..68f210105b0 100644 --- a/source/blender/draw/intern/draw_cache_impl_curves.cc +++ b/source/blender/draw/intern/draw_cache_impl_curves.cc @@ -514,7 +514,7 @@ static bool curves_ensure_attributes(const Curves &curves, const char *name = gpu_attr->name; int type = gpu_attr->type; int layer = -1; - AttributeDomain domain; + eAttrDomain domain; if (drw_custom_data_match_attribute(cd_curve, name, &layer, &type)) { domain = ATTR_DOMAIN_CURVE; @@ -538,7 +538,7 @@ static bool curves_ensure_attributes(const Curves &curves, case CD_PROP_COLOR: { if (layer != -1) { DRW_AttributeRequest *req = drw_attributes_add_request( - &attrs_needed, (CustomDataType)type, layer, domain); + &attrs_needed, (eCustomDataType)type, layer, domain); if (req) { BLI_strncpy(req->attribute_name, name, sizeof(req->attribute_name)); } diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index a6ab2176d16..a7fd484c72f 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -396,7 +396,7 @@ static uint mesh_cd_calc_gpu_layers_vcol_used(const Mesh *me_query, const char name[]) { CustomDataLayer *layer = NULL; - AttributeDomain domain; + eAttrDomain domain; if (name[0]) { int layer_i = 0; @@ -469,7 +469,7 @@ static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers(const Object *object, int type = gpu_attr->type; int layer = -1; /* ATTR_DOMAIN_NUM is standard for "invalid value". */ - AttributeDomain domain = ATTR_DOMAIN_NUM; + eAttrDomain domain = ATTR_DOMAIN_NUM; if (type == CD_AUTO_FROM_NAME) { /* We need to deduce what exact layer is used. diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc index d595abc6dd3..fa41facb751 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc @@ -24,7 +24,7 @@ namespace blender::draw { /** \name Extract Attributes * \{ */ -static CustomData *get_custom_data_for_domain(const MeshRenderData *mr, AttributeDomain domain) +static CustomData *get_custom_data_for_domain(const MeshRenderData *mr, eAttrDomain domain) { switch (domain) { default: { @@ -80,7 +80,7 @@ template<> struct attribute_type_converter { }; /* Return the number of component for the attribute's value type, or 0 if is it unsupported. */ -static uint gpu_component_size_for_attribute_type(CustomDataType type) +static uint gpu_component_size_for_attribute_type(eCustomDataType type) { switch (type) { case CD_PROP_BOOL: @@ -106,7 +106,7 @@ static uint gpu_component_size_for_attribute_type(CustomDataType type) } } -static GPUVertFetchMode get_fetch_mode_for_type(CustomDataType type) +static GPUVertFetchMode get_fetch_mode_for_type(eCustomDataType type) { switch (type) { case CD_PROP_INT32: { @@ -121,7 +121,7 @@ static GPUVertFetchMode get_fetch_mode_for_type(CustomDataType type) } } -static GPUVertCompType get_comp_type_for_type(CustomDataType type) +static GPUVertCompType get_comp_type_for_type(eCustomDataType type) { switch (type) { case CD_PROP_INT32: { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc index 717d81d6b52..91ac3f22617 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc @@ -16,7 +16,7 @@ struct VColRef { const CustomDataLayer *layer; - AttributeDomain domain; + eAttrDomain domain; }; /** Get all vcol layers as AttributeRefs. @@ -32,7 +32,7 @@ static blender::Vector get_vcol_refs(const CustomData *cd_vdata, blender::Vector refs; uint layeri = 0; - auto buildList = [&](const CustomData *cdata, AttributeDomain domain) { + auto buildList = [&](const CustomData *cdata, eAttrDomain domain) { for (int i = 0; i < cdata->totlayer; i++) { const CustomDataLayer *layer = cdata->layers + i; -- cgit v1.2.3