The attribute data, as a numpy array or anything convertible to one, with one value per element of the domain. A single value is stored for every element when it is a plain scalar such as 1.0, or a typed array of one value such as db.color([1, 0.5, 0, 1]).
The attribute type to store the data as, converting the values if needed. If None, a typed array such as vec3 is stored as its own type, other data as the type of an existing attribute, and otherwise the type is inferred from the data.
The domain of the attribute. If None, the domain of an existing attribute is used, otherwise ‘POINT’. New attributes on grease pencil objects need the ‘LAYER’ domain, as their points and strokes are on each layer’s drawings and can’t be accessed from the object; any other domain raises a NamedAttributeError.
Whether to write to an existing attribute with the same name, by default True. If False, a new attribute is created, which Blender gives a unique name such as name.001.
If the object doesn’t hold attributes, the name is empty, the data size doesn’t match the domain, the atype or domain conflict with an existing attribute, or the attribute can’t be created on the domain.