remove_named_attribute(obj, name)
Remove a named attribute from an object.
Parameters
obj |
bpy.types.Object |
The Blender object. |
required |
name |
str |
Name of the attribute to remove. |
required |
Raises
|
AttributeError |
If the named attribute does not exist on the mesh. |
Examples
import bpy
import numpy as np
from databpy import remove_named_attribute, list_attributes, store_named_attribute
obj = bpy.data.objects["Cube"]
store_named_attribute(obj, np.random.rand(8, 3), "random_numbers")
print(f"{list_attributes(obj)=}")
remove_named_attribute(obj, "random_numbers")
print(f"{list_attributes(obj)=}")
list_attributes(obj)=['position', 'random_numbers', '.select_vert', '.edge_verts', '.select_edge', '.select_poly', 'sharp_face', '.corner_vert', '.corner_edge', 'UVMap']
list_attributes(obj)=['position', '.select_vert', '.edge_verts', '.select_edge', '.select_poly', 'sharp_face', '.corner_vert', '.corner_edge', 'UVMap']