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:
Diffstat (limited to 'source/blender/blenkernel/intern/attribute.c')
-rw-r--r--source/blender/blenkernel/intern/attribute.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/attribute.c b/source/blender/blenkernel/intern/attribute.c
index 9b8ae4b3804..0cb0704ff80 100644
--- a/source/blender/blenkernel/intern/attribute.c
+++ b/source/blender/blenkernel/intern/attribute.c
@@ -311,6 +311,20 @@ AttributeDomain BKE_id_attribute_domain(const ID *id, const CustomDataLayer *lay
int BKE_id_attribute_data_length(ID *id, CustomDataLayer *layer)
{
+ /* When in mesh editmode, attributes point to bmesh customdata layers, the attribute data is
+ * empty since custom data is stored per element instead of a single array there (same es UVs
+ * etc.), see D11998. */
+ switch (GS(id->name)) {
+ case ID_ME: {
+ Mesh *mesh = (Mesh *)id;
+ if (mesh->edit_mesh != NULL) {
+ return 0;
+ }
+ }
+ default:
+ break;
+ }
+
DomainInfo info[ATTR_DOMAIN_NUM];
get_domains(id, info);