databpy 0.11.0
  • Home
  • Attributes
  • API
  • Changelog
  1. Collections
  2. create_collection
  • 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_collection
    • Parameters
    • Returns
    • Raises
  1. Collections
  2. create_collection

create_collection

create_collection(name='NewCollection', parent=None)

Create a new Blender collection or get an existing one.

A collection that doesn’t exist yet is created and linked to the active scene’s collection. An existing collection is returned without changing where it is linked, unless a parent is given.

Parameters

Name Type Description Default
name str The name of the collection to create or get. Default is “NewCollection”. 'NewCollection'
parent Collection or str or None The collection to link the collection into, which also unlinks it from the scene’s collection. A string is the name of the parent collection, which is created and linked to the scene if it doesn’t exist. Default is None, which leaves the collection where it is. None

Returns

Name Type Description
Collection The created or existing collection.

Raises

Name Type Description
TypeError If parent is not a Collection, string or None.
attribute.guess_atype_from_array
move_to_collection