create_object
create_object(
vertices=None,
edges=None,
faces=None,
name='NewObject',
collection=None,
)
Create a new Blender mesh object.
The same as create_mesh_object(), with a default name of ‘NewObject’.
Parameters
| vertices |
np.ndarray |
The vertices as a numpy array with shape (N, 3). Defaults to None. |
None |
| edges |
np.ndarray |
Vertex indices of each edge, with shape (M, 2). Defaults to None. |
None |
| faces |
np.ndarray |
Vertex indices of each face. Defaults to None. |
None |
| name |
str |
The name of the object. Defaults to ‘NewObject’. |
'NewObject' |
| collection |
bpy.types.Collection |
The collection to link the object to. Defaults to None, which links it to a collection named “Collection”, created if needed. |
None |
Returns
|
Object |
The created mesh object. |
Raises
|
ValueError |
If vertices doesn’t have the shape (N, 3), an edge doesn’t have exactly 2 vertex indices, or an index is outside of the vertices. |
|
TypeError |
If edge or face indices aren’t integers. |