databpy 0.11.0
  • Home
  • Attributes
  • API
  • Changelog
  1. Objects
  2. create_bob
  • Function reference
  • Attribute
    • named_attribute
    • store_named_attribute
    • remove_named_attribute
    • list_attributes
    • AttributeDomains
    • AttributeTypes
    • AttributeArray
    • Attribute
    • attribute.guess_atype_from_array
  • Collections
    • create_collection
    • move_to_collection
  • Objects
    • create_object
    • create_mesh_object
    • create_curves_object
    • create_pointcloud_object
    • create_bob
    • evaluate_object
    • GeometrySet
    • BlenderObject
    • BlenderObjectAttribute
    • BlenderObjectBase
  • Errors
    • DatabpyError
    • NamedAttributeError
    • AttributeNotFoundError
    • AttributeMismatchError
    • LinkedObjectError
  • Utilities
    • require
    • require_data
    • mesh_data
    • curves_data
    • pointcloud_data
    • volume_data
    • active_scene
    • active_object
    • centre
    • lerp
  • Nodes (deprecated)
    • nodes.new_tree
    • nodes.swap_tree
    • nodes.custom_string_iswitch
    • nodes.append_from_blend
    • nodes.new_socket
    • nodes.tree_interface
    • nodes.input_socket
    • nodes.output_socket
    • nodes.socket_value
    • nodes.set_socket_value
    • nodes.MaintainConnections
    • nodes.DuplicatePrevention

On this page

  • create_bob
    • Parameters
    • Returns
    • Raises
  1. Objects
  2. create_bob

create_bob

create_bob(
    vertices=None,
    edges=None,
    faces=None,
    name='NewObject',
    collection=None,
    uuid=None,
)

Create a BlenderObject wrapper around a new Blender mesh object.

Parameters

Name Type Description Default
vertices ndarray or None Array of vertex coordinates with shape (N, 3). Default is None. None
edges ndarray or None Vertex indices of each edge, with shape (M, 2). Default is None. None
faces ndarray or None Vertex indices of each face. Default is None. None
name str Name of the created object. Default is “NewObject”. 'NewObject'
collection bpy.types.Collection or None Blender collection to link the object to. None links it to a collection named “Collection”, created if needed. Default is None. None
uuid str or None The UUID to store on the object and use for the BlenderObject. None generates a new UUID. Default is None. None

Returns

Name Type Description
BlenderObject A wrapped Blender mesh object.

Raises

Name Type Description
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.
create_pointcloud_object
evaluate_object