I would like to add a custom property to a vertice to hold data from a simulation. The data is a vector of three values.
I know that for an object I can make a custom property like:
bpy.types.Object.Velocity = bpy.props.FloatVectorProperty(name="Velocity", subtype="VELOCITY") myObject.Velocity = [1.0, 2.0, 3.0]
However, for a meshVertex, it doesn’t seem to work. If I do:
bpy.types.MeshVertex.Velocity = bpy.props.FloatVectorProperty(name="Velocity", subtype="VELOCITY") myVertex = bpy.data.meshes['Cube'].vertices myVertex.Velocity = [1.0, 2.0, 3.0]
I get the result:
AttributeError: ‘MeshVertex’ object attribute ‘Velocity’ is read-only.
It seems like blender is happy to create the custom property for the MeshVertex object, but it won’t let me change it. Any ideas on how to set it?