Calculate the weighted or unweighted centroid of the object’s positions.
Parameters
Name
Type
Description
Default
weight
str | np.ndarray | None
The weights or indices for calculating the centroid: - If str: Name of attribute to use as weights - If np.ndarray with float dtype: Weights for each position - If np.ndarray with int dtype: Indices of positions to include - If None: Use all positions equally weighted Defaults to None.
None
Returns
Name
Type
Description
np.ndarray
A 3D vector representing the centroid position.
evaluate
BlenderObject.evaluate()
Return a version of the object with all modifiers applied.
Returns
Name
Type
Description
Object
A new Object that isn’t yet registered with the database
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.