I want to store custom Vector attribute for each vertex (custom vertex positions). I want to get it through numpy as I have millions of vertices:
import bpy
import numpy
active_obj = bpy.context.active_object
active_obj.data.attributes.new(name='myAttribute', type='FLOAT_VECTOR', domain='POINT')
# set MAKES ERROR
test = numpy.empty(len(active_obj.data.vertices) * 3, dtype=numpy.float64)
active_obj.data.vertices.foreach_set('myAttribute', test)
# get MAKES ERROR
test2 = numpy.empty(len(active_obj.data.vertices) * 3, dtype=numpy.float64)
active_obj.data.vertices.foreach_get('myAttribute', test2)
I also found AttributeGroup. https://docs.blender.org/api/current/bpy.types.AttributeGroup.html#bpy.types.AttributeGroup
attributes['name'].data.foreach_get('vector', array)
. Other ways could be repurposing shape keys (if its a custom position). $\endgroup$