Page MenuHome

Fix T100747: Cannot add "String" attribute to mesh
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Sep 2 2022, 12:00 PM.

Details

Summary

Caused by rB31365c6b9e4c: Attributes: Use new API for C-API functions.

The new API CustomDataAttributeProvider just did not support
CD_MASK_PROP_STRING...

If there are deeper reasons why this is not supported anymore, we should
remove it from the enum in the UI when adding a new attribute.

However, adding Strings to the supported types seems to survive just
fine, see attached example file.

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Sep 2 2022, 12:00 PM
Philipp Oeser (lichtwerk) created this revision.
Hans Goudey (HooglyBoogly) accepted this revision.EditedSep 6 2022, 6:28 AM

Thanks for the patch. We haven't supported string attributes in geometry nodes yet because the way they're stored is very inefficient. At 256 bytes per element, they just don't scale at all.
However, sadly we can't just ignore their existence, since they've been exposed with the attribute API for a while. So exposing them in the attribute API but not geometry nodes seems fine to me for now.

source/blender/blenkernel/intern/attribute_access_intern.hh
127–128

I think this is the same as CD_MASK_PROP_ALL now.

use CD_MASK_PROP_ALL

Philipp Oeser (lichtwerk) marked an inline comment as done.Sep 6 2022, 9:42 AM
This revision is now accepted and ready to land.Sep 6 2022, 10:09 AM