bpy.types.Object
https://docs.blender.org/api/current/bpy.types.Object.html
empty
import bpy
o = bpy.data.objects.new("empty", None)
bpy.context.scene.collection.objects.link(o)
active object
# これ
bpy.context.active_object # readonly
# active_object と object 同じぽい?
bpy.context.object # readonly
# change
bpy.context.scene.objects.active
https://blender.stackexchange.com/questions/31759/are-bpy-context-object-and-bpy-context-active-object-still-the-same
context.object == context.active_object ?
# 2.80
bpy.context.view_layer.objects.active = obj
# 2.79
bpy.context.scene.objects.active = obj
selected object
bpy.context.selected_objects
# 2.8
obj.select_set(True)
# 2.79
obj.select = True
select all
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.select_all(action='DESELECT')