databpy 0.11.0
  • Home
  • Attributes
  • API
  • Changelog
  1. Objects
  2. BlenderObjectBase
  • 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

  • BlenderObjectBase
    • Attributes
  1. Objects
  2. BlenderObjectBase

BlenderObjectBase

BlenderObjectBase(obj=None)

Minimal base class for Blender objects with name and object access.

Tracks an object in Blender’s database and gives access to the object and its name. A direct reference to an object can raise ReferenceError, as Blender can reallocate data-blocks without warning, so the object is tracked in two ways:

  • Within a session, by the object’s session_uid, which stays the same across renames and internal reallocations. Duplicates of the object get a new session_uid, so they are never mistaken for the original. If the object is removed, accessing it raises a LinkedObjectError.
  • Across sessions (after loading a .blend file, or in a new Python process), by a persistent uuid stored on the object as a custom property. On first access in a new session the object is found by its uuid and then tracked by its new session_uid.

Attributes

Name Type Description
object bpy.types.Object The wrapped Blender object.
uuid str Unique identifier for this object instance.
name str Name of the Blender object.
BlenderObjectAttribute
DatabpyError