databpy 0.9.0
  • Home
  • Attributes
  • API
  • Changelog
  1. Utilities
  2. active_object
  • Function reference
  • Attribute
    • named_attribute
    • store_named_attribute
    • remove_named_attribute
    • AttributeDomains
    • AttributeTypes
    • AttributeArray
  • 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
    • LinkedObjectError
  • Utilities
    • require
    • require_data
    • mesh_data
    • curves_data
    • pointcloud_data
    • volume_data
    • active_scene
    • active_object
    • centre
    • lerp
  • Nodes
    • 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

  • active_object
    • Parameters
    • Returns
    • Raises
  1. Utilities
  2. active_object

active_object

active_object(context=None)

Return the active object, raising an error if there is none.

Parameters

Name Type Description Default
context bpy.types.Context | None The context to read the active object from. Defaults to bpy.context. None

Returns

Name Type Description
bpy.types.Object The active object.

Raises

Name Type Description
ValueError If the context has no active object.
active_scene
centre