diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-18 12:48:51 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-18 12:48:51 +0300 |
commit | 3c2a2a6c9659dd66f1a1d3a5e4153d1d2f8243eb (patch) | |
tree | 187df41cf88419bf6f0b47a863aa7967baf73cb3 /source/blender/draw/intern/mesh_extractors | |
parent | 8a3ff496a737daa9ce5a33c2699ac0b20e52e8f0 (diff) |
Cleanup: Always store attribute name in attribute request
Previously the attribute name was only stored in the request for curves.
Instead, pass it as part of the "add request" function, so that it is
always used. Since the whole attribute pipeline is name-based,
this can simplify code in a few places.
Diffstat (limited to 'source/blender/draw/intern/mesh_extractors')
-rw-r--r-- | source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc | 5 |
1 files changed, 1 insertions, 4 deletions
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 fb6b5e1904b..c8fb677c5ac 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 @@ -132,11 +132,8 @@ static void init_vbo_for_attribute(const MeshRenderData *mr, /* We should not be here if the attribute type is not supported. */ BLI_assert(comp_size != 0); - const CustomData *custom_data = get_custom_data_for_domain(mr, request.domain); char attr_name[32], attr_safe_name[GPU_MAX_SAFE_ATTR_NAME]; - const char *layer_name = CustomData_get_layer_name( - custom_data, request.cd_type, request.layer_index); - GPU_vertformat_safe_attr_name(layer_name, attr_safe_name, GPU_MAX_SAFE_ATTR_NAME); + GPU_vertformat_safe_attr_name(request.attribute_name, attr_safe_name, GPU_MAX_SAFE_ATTR_NAME); /* Attributes use auto-name. */ BLI_snprintf(attr_name, sizeof(attr_name), "a%s", attr_safe_name); |