BlenderObjectBase
BlenderObjectBase(obj= None )
Minimal base class for Blender objects with attribute access.
This class provides core functionality for storing and accessing named attributes on Blender objects. It can be inherited by other packages that need attribute management without the full BlenderObject feature set.
Attributes
object
bpy.types .Object
The wrapped Blender object.
uuid
str
Unique identifier for this object instance.
name
str
Name of the Blender object.
position
AttributeArray
Position attribute of the object’s vertices/points.
data
bpy.types .Mesh | bpy.types .Curves | bpy.types .PointCloud
The data block associated with this object.
attributes
Get the attributes collection of the Blender object.
Methods
evaluate
BlenderObjectBase.evaluate()
Return a version of the object with all modifiers applied.
Returns
Object
A new Object that isn’t yet registered with the database
list_attributes
BlenderObjectBase.list_attributes(evaluate= False , drop_hidden= False )
Returns a list of attribute names for the object.
Parameters
evaluate
bool
Whether to first evaluate the modifiers on the object before listing the available attributes.
False
drop_hidden
bool
Whether to drop hidden attributes (those starting with a dot). Defaults to False.
False
Returns
list [str ] | None
A list of attribute names if the molecule object exists, None otherwise.
named_attribute
BlenderObjectBase.named_attribute(name, evaluate= False )
Retrieve a named attribute from the object.
Optionally, evaluate the object before reading the named attribute
Parameters
name
str
Name of the attribute to get.
required
evaluate
bool
Whether to evaluate the object before reading the attribute (default is False).
False
Returns
np .ndarray
The attribute read from the mesh as a numpy array.
remove_named_attribute
BlenderObjectBase.remove_named_attribute(name)
Remove a named attribute from the object.
Parameters
name
str
The name of the attribute to remove.
required
store_named_attribute
BlenderObjectBase.store_named_attribute(
data,
name,
atype= None ,
domain= AttributeDomains.POINT,
)
Store a named attribute on the Blender object.
Parameters
data
np .ndarray
The data to be stored as an attribute.
required
name
str
The name for the attribute. Will overwrite an already existing attribute.
required
atype
str or AttributeType or None
The attribute type to store the data as. Either string or selection from the AttributeTypes enum. None will attempt to infer the attribute type from the input array.
None
domain
str or AttributeDomain
The domain to store the attribute on. Defaults to Domains.POINT.
AttributeDomains.POINT