0
$\begingroup$

Re Manually setting custom attributes per edge / vertex / etc

TLDR : In edit mode, the regular interface to access and edit attributes, mesh.attributes["MyAttribute"].data yields an empty sequence.

Fortunately, one can access the attributes through the edit mode bmesh. layer = bm.verts.layers.float.get("MyAttribute") Unfortunately, AFAIK the only supported data types through this interface are color, deform, float, float_color, float_vector, int, shape, skin and string. Source

I'm trying to access a boolean attribute. How can I do that ?

This begs the question for other supported attributes like byte color, 2D vector, 8-bit integer, 2D integer vector and Quaternion.

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Coincidentally I am developing a similar add-on. Can't I just use the temporary change to object mode? blender.stackexchange.com/questions/269330/… $\endgroup$
    – mml
    Commented Apr 12 at 10:03
  • 1
    $\begingroup$ @mml This is indeed a solution. But for performance reason this is not possible for me. This will be queried in a panel and run several dozen times per seconds. I need to stay in edit mode. Going in and out of edit mode when your mesh is extremely dense can take several seconds up to several minutes. Cheers $\endgroup$
    – Gorgious
    Commented Apr 12 at 12:53
  • 1
    $\begingroup$ I see. This is certainly not a smart way to do it. It seems that attribute editing will be available in the future, but it has not been realized yet.Cheers $\endgroup$
    – mml
    Commented Apr 12 at 22:36

0

You must log in to answer this question.

Browse other questions tagged .