Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-06-01 07:38:06 +0300
committerCampbell Barton <campbell@blender.org>2022-06-01 08:38:48 +0300
commit44bac4c8ccf19cb5941435115b8f89a9d14e9c23 (patch)
tree2bd7698ca3e1e382b078e274566dbad0ae82214c /source/blender/draw
parentca346d2176737b6aa296617452a8a6cacb7a970a (diff)
Cleanup: use 'e' prefix for enum types
- CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_attributes.cc4
-rw-r--r--source/blender/draw/intern/draw_attributes.h8
-rw-r--r--source/blender/draw/intern/draw_cache_impl_curves.cc4
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c4
-rw-r--r--source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc8
-rw-r--r--source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc4
6 files changed, 16 insertions, 16 deletions
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<MPropCol, gpuMeshCol> {
};
/* 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<VColRef> get_vcol_refs(const CustomData *cd_vdata,
blender::Vector<VColRef> 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;